SlideShare a Scribd company logo
Five agile principles that should
guide you every time you write code
by Talevski Igor
Talevski
Igor
L 5 : N E W T H I N G S - Q U I C K R E V I E W
STRUCTURE Default namespace: App
app/models=> null
app/start => null
NEW => app/Providers
Controllers => app/Http
Middleware => app/Http
Requests => app/Http
Route filters=> middleware
language files => resources
directory
views => resources directory
L 5 : N E W T H I N G S - Q U I C K R E V I E W
Contracts:
illuminate/contracts
Controller Method
Injection
Event Objects
Commands / Queueing
Route Middleware (Filters)
Form Requests /
Controller Request
Validation
Route Cache
Database Queue
Laravel Scheduler
Elixir
Socialite
Filesystem abstraction:
Flysystem
DotEnv
Authentication Scaffolding
Configuration Cache
New Generators
Tinker
Symfony VarDumper
L 5 : N E W T H I N G S - Q U I C K R E V I E W
NOMORE…
S O L I D
SINGLE RESPONSIBILITY PRINCIPLE
OPEN/CLOSED PRINCIPLE
LISKOV SUBSTITUTION PRINCIPLE
INTERFACE SEGREGATION PRINCIPLE
DEPENDENCY INVERSION PRINCIPLE
SINGLE RESPONSIBILITY PRINCIPLE
A class should have only one reason to
change.
SINGLERESPONSIBILITYPRINCIPLE
SINGLERESPONSIBILITYPRINCIPLE
SINGLERESPONSIBILITYPRINCIPLE
SINGLERESPONSIBILITYPRINCIPLE
SINGLERESPONSIBILITYPRINCIPLE
SINGLERESPONSIBILITYPRINCIPLE
SINGLERESPONSIBILITYPRINCIPLE
SINGLERESPONSIBILITYPRINCIPLE
SINGLERESPONSIBILITYPRINCIPLE
S O L I D
SINGLE RESPONSIBILITY PRINCIPLE
OPEN/CLOSED PRINCIPLE
LISKOV SUBSTITUTION PRINCIPLE
INTERFACE SEGREGATION PRINCIPLE
DEPENDENCY INVERSION PRINCIPLE
Software entities (classes, modules, functions,
etc.) should be open for extension,
but closed for modification.
OPEN/CLOSED PRINCIPLE
Separate extensible behavior behind an interface, and flip the
dependencies
OPEN/CLOSEDPRINCIPLE
S O L I D
SINGLE RESPONSIBILITY PRINCIPLE
OPEN/CLOSED PRINCIPLE
LISKOV SUBSTITUTION PRINCIPLE
INTERFACE SEGREGATION PRINCIPLE
DEPENDENCY INVERSION PRINCIPLE
Let q(x) be a property provable about objects
x of type T.
Then q(y) should be provable for objects y of
type S
where S is a subtype of T.
LISKOV SUBSTITUTION PRINCIPLE
LISKOVSUBSTITUTIONPRINCIPLE
LISKOVSUBSTITUTIONPRINCIPLE
LISKOVSUBSTITUTIONPRINCIPLE
S O L I D
SINGLE RESPONSIBILITY PRINCIPLE
OPEN/CLOSED PRINCIPLE
LISKOV SUBSTITUTION PRINCIPLE
INTERFACE SEGREGATION PRINCIPLE
DEPENDENCY INVERSION PRINCIPLE
A client should never be forced to
implement an interface that it
doesn’t use
INTERFACE SEGREGATION PRINCIPLE
INTERFACESEGREGATIONPRINCIPLE
INTERFACESEGREGATIONPRINCIPLE
INTERFACESEGREGATIONPRINCIPLE
S O L I D
SINGLE RESPONSIBILITY PRINCIPLE
OPEN/CLOSED PRINCIPLE
LISKOV SUBSTITUTION PRINCIPLE
INTERFACE SEGREGATION PRINCIPLE
DEPENDENCY INVERSION PRINCIPLE
A. High-level modules should not depend
on low-level modules. Both should depend
on abstractions.
B. Abstractions should not depend upon
details. Details should depend upon
DEPENDENCYINVERSIONPRINCIPLE
Dependency inversion
principle
DEPENDENCYINVERSIONPRINCIPLE
DEPENDENCYINVERSIONPRINCIPLE
S O L I D
SINGLE RESPONSIBILITY PRINCIPLE
OPEN/CLOSED PRINCIPLE
LISKOV SUBSTITUTION PRINCIPLE
INTERFACE SEGREGATION PRINCIPLE
DEPENDENCY INVERSION PRINCIPLE
Laravel 5 and SOLID
…
Laravel 5 and SOLID

More Related Content

What's hot (20)

PPTX
ANT
guestd845f0
 
PDF
Your First Scala Web Application using Play 2.1
Matthew Barlocker
 
PDF
Leveraging a distributed architecture to your advantage
Michelangelo van Dam
 
PPTX
Prairie DevCon 2015 - Crafting Evolvable API Responses
darrelmiller71
 
PDF
Hexagonal Architecture - PHP Barcelona Monthly Talk (DDD)
Carlos Buenosvinos
 
PPTX
Relay: Seamless Syncing for React (VanJS)
Brooklyn Zelenka
 
PPT
Mock objectsinaction paulo_caroli_and_sudhindra_rao_agile2009_final
releasebeta
 
PPTX
C# advanced topics and future - C#5
Peter Gfader
 
PDF
Lecture 3 - ES6 Script Advanced for React-Native
Kobkrit Viriyayudhakorn
 
PPTX
ISI work
dgarijo
 
PDF
Graphql
Neven Rakonić
 
PDF
Xtend - better java with -less- noise
Neeraj Bhusare
 
PDF
Scaling business app development with Play and Scala
Peter Hilton
 
PDF
Functional Programming in Java
Premanand Chandrasekaran
 
PPTX
API Documentation Workshop tcworld India 2015
Tom Johnson
 
PPTX
Introduction to testing in Rails
benlcollins
 
PDF
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
Codemotion
 
PPTX
API workshop: Deep dive into Java
Tom Johnson
 
PDF
Building Desktop RIAs With PHP And JavaScript
funkatron
 
PPTX
API Documentation -- Presentation to East Bay STC Chapter
Tom Johnson
 
Your First Scala Web Application using Play 2.1
Matthew Barlocker
 
Leveraging a distributed architecture to your advantage
Michelangelo van Dam
 
Prairie DevCon 2015 - Crafting Evolvable API Responses
darrelmiller71
 
Hexagonal Architecture - PHP Barcelona Monthly Talk (DDD)
Carlos Buenosvinos
 
Relay: Seamless Syncing for React (VanJS)
Brooklyn Zelenka
 
Mock objectsinaction paulo_caroli_and_sudhindra_rao_agile2009_final
releasebeta
 
C# advanced topics and future - C#5
Peter Gfader
 
Lecture 3 - ES6 Script Advanced for React-Native
Kobkrit Viriyayudhakorn
 
ISI work
dgarijo
 
Xtend - better java with -less- noise
Neeraj Bhusare
 
Scaling business app development with Play and Scala
Peter Hilton
 
Functional Programming in Java
Premanand Chandrasekaran
 
API Documentation Workshop tcworld India 2015
Tom Johnson
 
Introduction to testing in Rails
benlcollins
 
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
Codemotion
 
API workshop: Deep dive into Java
Tom Johnson
 
Building Desktop RIAs With PHP And JavaScript
funkatron
 
API Documentation -- Presentation to East Bay STC Chapter
Tom Johnson
 

Viewers also liked (20)

PDF
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
Mats Kindahl
 
PDF
MySQL Enterprise Cloud
Mark Swarbrick
 
PDF
Building Scalable High Availability Systems using MySQL Fabric
Mats Kindahl
 
PPTX
MEAN Stack
José Moreno
 
PDF
[스마트스터디]MongoDB 의 역습
smartstudy_official
 
PDF
SunshinePHP 2017 - Making the most out of MySQL
Gabriela Ferrara
 
PDF
Mongodb
Apurva Vyas
 
PDF
MySQL Cluster Whats New
Mark Swarbrick
 
PDF
LaravelSP - MySQL 5.7: introdução ao JSON Data Type
Gabriela Ferrara
 
PDF
Strip your TEXT fields - Exeter Web Feb/2016
Gabriela Ferrara
 
PDF
The MySQL Server Ecosystem in 2016
Colin Charles
 
PDF
Sharding using MySQL and PHP
Mats Kindahl
 
PPTX
Exploring MongoDB & Elasticsearch: Better Together
ObjectRocket
 
PDF
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Ontico
 
PDF
LAMP: Desenvolvendo além do trivial
Gabriela Ferrara
 
PDF
MySQL 5.7 - 
Tirando o Máximo Proveito
Gabriela Ferrara
 
PDF
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ivan Zoratti
 
PDF
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 
PDF
Coding like a girl - DjangoCon
Gabriela Ferrara
 
PDF
Strip your TEXT fields
Gabriela Ferrara
 
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
Mats Kindahl
 
MySQL Enterprise Cloud
Mark Swarbrick
 
Building Scalable High Availability Systems using MySQL Fabric
Mats Kindahl
 
MEAN Stack
José Moreno
 
[스마트스터디]MongoDB 의 역습
smartstudy_official
 
SunshinePHP 2017 - Making the most out of MySQL
Gabriela Ferrara
 
Mongodb
Apurva Vyas
 
MySQL Cluster Whats New
Mark Swarbrick
 
LaravelSP - MySQL 5.7: introdução ao JSON Data Type
Gabriela Ferrara
 
Strip your TEXT fields - Exeter Web Feb/2016
Gabriela Ferrara
 
The MySQL Server Ecosystem in 2016
Colin Charles
 
Sharding using MySQL and PHP
Mats Kindahl
 
Exploring MongoDB & Elasticsearch: Better Together
ObjectRocket
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Ontico
 
LAMP: Desenvolvendo além do trivial
Gabriela Ferrara
 
MySQL 5.7 - 
Tirando o Máximo Proveito
Gabriela Ferrara
 
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ivan Zoratti
 
20171104 hk-py con-mysql-documentstore_v1
Ivan Ma
 
Coding like a girl - DjangoCon
Gabriela Ferrara
 
Strip your TEXT fields
Gabriela Ferrara
 
Ad

Similar to Laravel 5 and SOLID (20)

KEY
SOLID Design Principles
Samuel Breed
 
PPTX
Becoming a better developer by using the SOLID design principles
Katerina Trajchevska
 
PPTX
From Good to SOLID: How to become a better PHP developer
Katerina Trajchevska
 
PPTX
An ultimate guide to SOLID Principles, developers must know.
ONE BCG
 
PPTX
The good, the bad and the SOLID
Frikkie van Biljon
 
PPTX
Solid principles
Monica Rodrigues
 
PDF
SOLID design principles applied in Java
Bucharest Java User Group
 
PDF
SOLID Design Principles applied in Java
Ionut Bilica
 
PPT
design-principles.ppt
WalidLahsiki
 
PPTX
From good to solid: How to become a better developer
Katerina Trajchevska
 
PPTX
SOLID
ferca_sl
 
PDF
Object Oriented Design Principles
Thang Tran Duc
 
PPTX
Solid
Hadi Ehterami
 
PPTX
Learning solid principles using c#
Aditya Kumar Rajan
 
PPTX
Improving The Quality of Existing Software
Steven Smith
 
PDF
SOLID design principles in Ruby
Anil Wadghule
 
PPTX
SOLID Principles
akbarashaikh
 
PPTX
Solid design principles
Mahmoud Asadi
 
PDF
S.O.L.I.D. Principles
Jad Salhani
 
SOLID Design Principles
Samuel Breed
 
Becoming a better developer by using the SOLID design principles
Katerina Trajchevska
 
From Good to SOLID: How to become a better PHP developer
Katerina Trajchevska
 
An ultimate guide to SOLID Principles, developers must know.
ONE BCG
 
The good, the bad and the SOLID
Frikkie van Biljon
 
Solid principles
Monica Rodrigues
 
SOLID design principles applied in Java
Bucharest Java User Group
 
SOLID Design Principles applied in Java
Ionut Bilica
 
design-principles.ppt
WalidLahsiki
 
From good to solid: How to become a better developer
Katerina Trajchevska
 
SOLID
ferca_sl
 
Object Oriented Design Principles
Thang Tran Duc
 
Learning solid principles using c#
Aditya Kumar Rajan
 
Improving The Quality of Existing Software
Steven Smith
 
SOLID design principles in Ruby
Anil Wadghule
 
SOLID Principles
akbarashaikh
 
Solid design principles
Mahmoud Asadi
 
S.O.L.I.D. Principles
Jad Salhani
 
Ad

Recently uploaded (20)

PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 

Laravel 5 and SOLID

Editor's Notes

  • #4:  app:name Artisan command
  • #5:  Tinker => Read-Eval-Print Loop
  • #6:  app:name Artisan command
  • #8: The Audience Persistence Module - Audience include DBAs and software architects. Reporting Module - Audience include clerks, accountants, and operations. Payment Computation Module for a Payroll System - Audience may include lawyers, managers, and accountants. Roles and Actors So a responsibility is a family of functions that serves one particular actor. (Robert C. Martin) Source of Change An actor for a responsibility is the single source of change for that responsibility. (Robert C. Martin
  • #9: Objects That Can "Print" Themselves Objects That Can "Save" Themselves do you have seen code like this? what is wrong here? is this a SOLID?
  • #10: hmmm… do we need Auth::check() in this controller? What if this was API? Or what if we run this from command line
  • #11: A database call ? Ask your self, do I need to this here? who will ask this to change? A business, designer or DBAdmin What if boss decide to switch database from MySQL to MongoDB ?
  • #12: hm…. HTML… A spaghetti code ? Who will ask to change this? Designer…are you the designer ? What if we have multiple implementation…. For example: Web/HTML, Console… or Mobile…iOS..
  • #14: hm…. Is this more clean…. What we have here… Repository PHP 5 introduces type hinting. Functions are now able to force parameters to be objects (by specifying the name of the class in the function prototype), interfaces, arrays (since PHP 5.1) or callable (since PHP 5.4). 
  • #15: Interface…yes, but for this example we don’t expect database changes. Repository will connect Factories with Gateways (persistence). Decoupled architecture Pros: Separation of concerns; the application need not know about or track any or all data sources. Allows easy unit testing as the repositories are bound to interfaces which are injected into classes at run time. DRY (Dont Repeat Yourself) design, the code to query and fetch data from data source(s) is not repeated. Cons: Adds another layer of abstraction which adds a certain level of complexity making it an overkill for small applications.
  • #16: - HTML implementation of the Interface
  • #17: TEXT implementation of the Interface And this hit the Open/Close principies
  • #19: The Open/Closed Principle, OCP in short, is credited to Bertrand Mayer, a French programmer, who first published it in his book n Object-Oriented Software Constructionin 1988. The principle rose in popularity in the early 2000s when it became one of the SOLID principles defined by Robert C. Martin in his book Agile Software Development, 
  • #20: Advantage of the Dynamic Nature of PHP *Strategy Design Pattern Template Method Design Pattern What do I need to do for PDF print?
  • #24: What is wrong here? Response…. Return type …. Collection vs Array … Exception hm…
  • #25: What is wrong here? Signature must match Preconditions CAN’T be greater Post conditions at least equal to Exception types must match
  • #30: ISP teaches us to respect our clients more than we thought necessary. Respecting their needs will make our code better and our lives as programmers easier.
  • #33: Depend on abstractions, not on concretions. All of this is about decoupling code.