Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Laravel Offline Sharing (March 2023) at Ho Chi ...
Search
Dinh Quoc Han
March 25, 2023
Technology
63
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Laravel Offline Sharing (March 2023) at Ho Chi Minh City, Vietnam
Dinh Quoc Han
March 25, 2023
Transcript
72 slides
Laravel Việt Nam - 19 Tháng 3, 2023 Laravel Offline
Sharing Hồ Chí Minh, Việt Nam
Được Tổ Chức Bởi Laravel Việt Nam
Nhà Tại Trợ Địa Điểm
Lịch trình sự kiện • TechTalk 😎 • Các cấu
trúc thường gặp khi triển khai ứng dụng trên Laravel • Những cách triển khai nghiệp vụ logic phổ biến trên Laravel • Triển khai dynamic route trong Laravel • … • Beer Party 🥳
Discuss; Sharing TL;DR
1. Các bạn thường cấu trúc ứng dụng Laravel như
thế nào?
“Cho sao để vậy, thay đổi chi?” Giữ Nguyên
Không có gì phải bàn 🥲
“Phá luật thì lúc nào cũng sẽ vui hơn tí
:)” Bóc Tách
App in App Design
None
None
None
Packages Design
None
Đọc kỹ HDSD trước khi dùng https://laravel.com/docs/10.x/packages
None
None
None
CMS-like & Plugins/Addons
Botble CMS
None
Plugins Loader & Theme Loader
Domain-oriented Design
Domain-driven Design • Application • Domain • Infrastucture • Interface
(UI)
None
Tham khảo mô hình hướng miền https://github.com/qh-8/skeleton
…
Vậy có nên thay đổi cấu trúc mặc định khi
triển khai ứng dụng?
Nên hoặc không tùy vào quy mô ứng dụng của
bạn
Q&A “Giải lao tí trước khi vào section 2 nha
các bạn 🥶”
2. Triển khai logic trong Laravel
- một ai đó đã từng nói vậy và tôi
thấy nó đúng “Controller không nên chứa bất kỳ nghiệp vụ logic nào.”
“chỗ này năm ngoái (2022) mình có nói rồi hihi”
Tại Sao?
Fat model & Thin controller
$user->changePassword($request->input(‘password’)); “Dễ nhất, nhanh nhất, gọn nhất. Cái gì khó
để model lo, controller gọi là xong 😅”
None
Service Classes
$userService->create($userStoreRequest); “Đại khái là gom cụm tính năng của 1
thằng vô 1 lớp.” $userService->update($currentUser, $userUpdateRequest);
None
Action/Command Classes
$createUser->handle($userStoreRequest); “Tách riêng từng nghiệp vụ một thành 1 lớp.”
$updateUser->handle($currentUser, $userUpdateRequest);
None
None
“Nhớ tận dụng dependency injection & service container của Laravel”
“Sẵn tiện giải lao vài phút trước khi vào phần
3 nha 🥹” Còn bạn?
3. Triển khai thực tiễn tính năng dynamic route trong
Laravel
Đặt vấn đề
SlugHandlerManager
/blog/abc-xyz-123 SlugController SlugHandlerManager BlogSlugHandler
Database Scheme
None
Hình dung cách sử dụng
None
SlugController
None
None
Create interfaces
None
None
Implementation
None
None
None
/sp/{year}/{month}/{name}-{id}.html
`findHandler(…)`
Template Regexr Find Handler
None
… đa ngôn ngữ 🤪
Hết
Q&A / Sharing
Cảm ơn mọi người đã lắng nghe và chia sẻ
Thanks
More Decks by Dinh Quoc Han
See All by Dinh Quoc Han
Laravel Vietnam Meetup 2022: Your code is simplify or complexity?
dinhquochan
0
140
Laravel Live Vietnam 2022: Laravel Eloquent Performance
dinhquochan
0
79
Other Decks in Technology
See All in Technology
AWS Blocksで AIエージェント作れるの知ってます?
kmiya84377
1
170
品質を積み上げられるようにする
goyoki
6
2.7k
Kiro のリモートワークスペース: IDE は手元のままで、ワークスペースをクラウド、コンテナ、自前のマシンに置く
inariku
PRO
2
280
IVRy における AI 時代のデータプロダクトと事業開発
ivry_presentationmaterials
0
140
AIエージェントのアーキテクチャ設計
nsatoh
0
610
テスト自動化の先、テスト自律化に向けて
mineo_matsuya
4
1.6k
本の挿絵に困ったから挿絵メーカーを自作した
yoshimura_datam
1
140
一口馬主の募集馬をAIで診断してみた
yoshimura_datam
0
130
リリースしたで終わらない。 観測できるフロントエンド開発
yamakenji24
4
2k
AIエージェントの認証がまとめて進化! ~pre:Inventで来た3つのアップデート~
minorun365
PRO
2
300
Webメール開発を大幅に変えたJMAPというゲームチェンジャー
tascript
10
6.4k
Amazon Bedrock AgentCore の基礎とセキュリティ・ガバナンス
ren8k
0
300
Featured
See All Featured
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
73
43k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
540
First, design no harm
axbom
PRO
2
1.4k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
710
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
310
Designing for humans not robots
tammielis
254
26k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
650
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.9k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.3k
Paper Plane (Part 1)
katiecoart
PRO
3
12k
[SF Ruby Conf 2025] Rails X
palkan
3
1.6k
Mind Mapping
helmedeiros
1
460