SlideShare ist ein Scribd-Unternehmen logo
1 von 43
Downloaden Sie, um offline zu lesen
The
Lucid
Architecture
Building Scalable Applications
Abed Halawi - Tech Lead at Vinelab
@mulkave
What is an Architecture?
What is an Architecture?
Pattern of connected Structures
Structure & Architecture
Structure
Architecture
An expression
of a
What is an architecture?
viewpoint
Why Do We Have Them?
Why Do We Have Them?
Communicate Structures
Controller ✅
Model ✅
View ✅
Service ⁉
Domain ⁉
Why Do We Have Them?
Eradecate Homelessness
of Code
0
25
50
75
100
0
25
50
75
100
v1.0 v1.2
😈👺
Why Do We Have Them?
Eradecate Homelessness
of Code
Why Do We Have Them?
Illustrate Structures
Request
Http
Kernel
Closure
Controller
Route
Process
&
Respond
DDD?
Technical
Debt 🤑
SOA?
Legacy Code
• No More Legacy Code
• Defines Terminology
• Comprehensive, No Limitations
• Complements Laravel’s Design
• Simple, Yet Sophisticated
• Performs at Scale
What?
How? 🤔
Lucid
Lucid
Lucid • Components
Feature
Job
Service
Lucid • Feature
• As described in business, as a class name
• Runs Jobs - Steps in the process of accomplishment
CreateArticleFeature
LoginUserFeature
Controller
Process
&
Respond
Feature
serve
Lucid • Feature
• Controllers serve Features
Lucid • Job
A class that does one thing; responsible for the
business logic
• CreateArticleFeature
• Validate Article Input
• Generate Slug
• Upload Files To Cdn
• Save Article
• Respond With Json
Lucid • Job
A class that does one thing; responsible for the
business logic
• CreateArticleFeature
• ValidateArticleInputJob
• GenerateSlugJob
• UploadFilesToCdnJob
• SaveArticleJob
• RespondWithJsonJob
Lucid • Job
A class that does one thing; responsible for the
business logic
Controller Feature
serve
Validate Input
Generate Slug
Upload Files To CDN
Save Article
Respond With JSON
]Process
&
] Respond
1
3
2
1 2 3
Lucid • Service
Implements Features and serves them through
controllers
Website
Api
Backend
Lucid • Service
• Website
• ListArticlesFeature
• GetPublishedArticlesJob
• RespondWithViewJob
• Api
• ListArticlesFeature
• GetPublishedArticlesJob
• RespondWithJsonJob
• Backend
• CreateArticleFeature
• ValidateArticleInputJob
• SaveArticleJob
• RespondWithViewJob
Lucid • Service
• Website
• ListArticlesFeature
• GetPublishedArticlesJob
• RespondWithViewJob
• Api
• ListArticlesFeature
• GetPublishedArticlesJob
• RespondWithJsonJob
• Backend
• CreateArticleFeature
• ValidateArticleInputJob
• SaveArticleJob
• RespondWithViewJob
Lucid • Service
• Website
• ListArticlesFeature
• GetPublishedArticlesJob
• RespondWithViewJob
• Api
• ListArticlesFeature
• GetPublishedArticlesJob
• RespondWithJsonJob
• Backend
• CreateArticleFeature
• ValidateArticleInputJob
• SaveArticleJob
• RespondWithViewJob
Lucid • Service
Http
Kernel
Which
Service?
Controller Feature
Website
Route
Controller Feature
Api
Route
Controller Feature
Backend
Route
example.com
api.example.com OR example.com/api
admin…com OR example.com/api
Domains
Lucid • Domains
Responsible for the entities; exposing their
functionalities through Jobs
Lucid • Domains
• Article
• GetPublishedArticlesJob
• SaveArticleJob
• ValidateArticleInputJob
• Cdn
• UploadFilesToCdnJob
• Http
• RespondWithJsonJob
Lucid • Layers
Service Domain Data
F
A
T
U
R
E
E
J
O
B
M
D
E
L
O
Lucid • Principles ✍
1. Controllers serve Features
2. Avoid Cross-Domain Communication
3. Avoid Cross-Job Communication
Getting Started
> composer create-project lucid-arch/laravel my-project
1. Init a project
> lucid make:service Api
2. Scaffold a Service
> lucid make:feature Api LoginUser
3. Generate a Feature
> lucid make:job User CheckCredentials
4. Generate a Job
Lucid • Console

Weitere ähnliche Inhalte

Kürzlich hochgeladen

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Kürzlich hochgeladen (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 

Empfohlen

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

The Lucid Architecture for Building Scalable Applications at LaraconEU 2016

  • 1. The Lucid Architecture Building Scalable Applications Abed Halawi - Tech Lead at Vinelab @mulkave
  • 2. What is an Architecture?
  • 3. What is an Architecture? Pattern of connected Structures
  • 5.
  • 8. An expression of a What is an architecture? viewpoint
  • 9. Why Do We Have Them?
  • 10. Why Do We Have Them? Communicate Structures Controller ✅ Model ✅ View ✅ Service ⁉ Domain ⁉
  • 11. Why Do We Have Them? Eradecate Homelessness of Code 0 25 50 75 100 0 25 50 75 100 v1.0 v1.2 😈👺
  • 12. Why Do We Have Them? Eradecate Homelessness of Code
  • 13. Why Do We Have Them? Illustrate Structures Request Http Kernel Closure Controller Route Process & Respond DDD? Technical Debt 🤑 SOA?
  • 15. • No More Legacy Code • Defines Terminology • Comprehensive, No Limitations • Complements Laravel’s Design • Simple, Yet Sophisticated • Performs at Scale What? How? 🤔
  • 16. Lucid
  • 17. Lucid
  • 19. Lucid • Feature • As described in business, as a class name • Runs Jobs - Steps in the process of accomplishment CreateArticleFeature LoginUserFeature Controller Process & Respond Feature serve
  • 20. Lucid • Feature • Controllers serve Features
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. Lucid • Job A class that does one thing; responsible for the business logic • CreateArticleFeature • Validate Article Input • Generate Slug • Upload Files To Cdn • Save Article • Respond With Json
  • 26. Lucid • Job A class that does one thing; responsible for the business logic • CreateArticleFeature • ValidateArticleInputJob • GenerateSlugJob • UploadFilesToCdnJob • SaveArticleJob • RespondWithJsonJob
  • 27. Lucid • Job A class that does one thing; responsible for the business logic Controller Feature serve Validate Input Generate Slug Upload Files To CDN Save Article Respond With JSON ]Process & ] Respond
  • 28.
  • 29.
  • 30.
  • 31.
  • 33. Lucid • Service Implements Features and serves them through controllers Website Api Backend
  • 34. Lucid • Service • Website • ListArticlesFeature • GetPublishedArticlesJob • RespondWithViewJob • Api • ListArticlesFeature • GetPublishedArticlesJob • RespondWithJsonJob • Backend • CreateArticleFeature • ValidateArticleInputJob • SaveArticleJob • RespondWithViewJob
  • 35. Lucid • Service • Website • ListArticlesFeature • GetPublishedArticlesJob • RespondWithViewJob • Api • ListArticlesFeature • GetPublishedArticlesJob • RespondWithJsonJob • Backend • CreateArticleFeature • ValidateArticleInputJob • SaveArticleJob • RespondWithViewJob
  • 36. Lucid • Service • Website • ListArticlesFeature • GetPublishedArticlesJob • RespondWithViewJob • Api • ListArticlesFeature • GetPublishedArticlesJob • RespondWithJsonJob • Backend • CreateArticleFeature • ValidateArticleInputJob • SaveArticleJob • RespondWithViewJob
  • 37. Lucid • Service Http Kernel Which Service? Controller Feature Website Route Controller Feature Api Route Controller Feature Backend Route example.com api.example.com OR example.com/api admin…com OR example.com/api Domains
  • 38. Lucid • Domains Responsible for the entities; exposing their functionalities through Jobs
  • 39. Lucid • Domains • Article • GetPublishedArticlesJob • SaveArticleJob • ValidateArticleInputJob • Cdn • UploadFilesToCdnJob • Http • RespondWithJsonJob
  • 40. Lucid • Layers Service Domain Data F A T U R E E J O B M D E L O
  • 41. Lucid • Principles ✍ 1. Controllers serve Features 2. Avoid Cross-Domain Communication 3. Avoid Cross-Job Communication
  • 42. Getting Started > composer create-project lucid-arch/laravel my-project 1. Init a project > lucid make:service Api 2. Scaffold a Service > lucid make:feature Api LoginUser 3. Generate a Feature > lucid make:job User CheckCredentials 4. Generate a Job