SlideShare uma empresa Scribd logo
1 de 37
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

Mais conteúdo relacionado

Mais procurados

Building Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScriptBuilding Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScript
funkatron
 

Mais procurados (20)

ANT
ANTANT
ANT
 
Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1Your First Scala Web Application using Play 2.1
Your First Scala Web Application using Play 2.1
 
Leveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageLeveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantage
 
Prairie DevCon 2015 - Crafting Evolvable API Responses
Prairie DevCon 2015 - Crafting Evolvable API ResponsesPrairie DevCon 2015 - Crafting Evolvable API Responses
Prairie DevCon 2015 - Crafting Evolvable API Responses
 
Hexagonal Architecture - PHP Barcelona Monthly Talk (DDD)
Hexagonal Architecture - PHP Barcelona Monthly Talk (DDD)Hexagonal Architecture - PHP Barcelona Monthly Talk (DDD)
Hexagonal Architecture - PHP Barcelona Monthly Talk (DDD)
 
Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)Relay: Seamless Syncing for React (VanJS)
Relay: Seamless Syncing for React (VanJS)
 
Mock objectsinaction paulo_caroli_and_sudhindra_rao_agile2009_final
Mock objectsinaction paulo_caroli_and_sudhindra_rao_agile2009_finalMock objectsinaction paulo_caroli_and_sudhindra_rao_agile2009_final
Mock objectsinaction paulo_caroli_and_sudhindra_rao_agile2009_final
 
C# advanced topics and future - C#5
C# advanced topics and future - C#5C# advanced topics and future - C#5
C# advanced topics and future - C#5
 
Lecture 3 - ES6 Script Advanced for React-Native
Lecture 3 - ES6 Script Advanced for React-NativeLecture 3 - ES6 Script Advanced for React-Native
Lecture 3 - ES6 Script Advanced for React-Native
 
ISI work
ISI workISI work
ISI work
 
Graphql
GraphqlGraphql
Graphql
 
Xtend - better java with -less- noise
Xtend - better java with -less- noiseXtend - better java with -less- noise
Xtend - better java with -less- noise
 
Scaling business app development with Play and Scala
Scaling business app development with Play and ScalaScaling business app development with Play and Scala
Scaling business app development with Play and Scala
 
Functional Programming in Java
Functional Programming in JavaFunctional Programming in Java
Functional Programming in Java
 
API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015API Documentation Workshop tcworld India 2015
API Documentation Workshop tcworld India 2015
 
Introduction to testing in Rails
Introduction to testing in RailsIntroduction to testing in Rails
Introduction to testing in Rails
 
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
How To Structure Go Applications - Paul Bellamy - Codemotion Milan 2016
 
API workshop: Deep dive into Java
API workshop: Deep dive into JavaAPI workshop: Deep dive into Java
API workshop: Deep dive into Java
 
Building Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScriptBuilding Desktop RIAs With PHP And JavaScript
Building Desktop RIAs With PHP And JavaScript
 
API Documentation -- Presentation to East Bay STC Chapter
API Documentation -- Presentation to East Bay STC ChapterAPI Documentation -- Presentation to East Bay STC Chapter
API Documentation -- Presentation to East Bay STC Chapter
 

Destaque

Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ivan Zoratti
 

Destaque (20)

MySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal ScalingMySQL Sharding: Tools and Best Practices for Horizontal Scaling
MySQL Sharding: Tools and Best Practices for Horizontal Scaling
 
MySQL Enterprise Cloud
MySQL Enterprise Cloud MySQL Enterprise Cloud
MySQL Enterprise Cloud
 
Building Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL FabricBuilding Scalable High Availability Systems using MySQL Fabric
Building Scalable High Availability Systems using MySQL Fabric
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
[스마트스터디]MongoDB 의 역습
[스마트스터디]MongoDB 의 역습[스마트스터디]MongoDB 의 역습
[스마트스터디]MongoDB 의 역습
 
SunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQLSunshinePHP 2017 - Making the most out of MySQL
SunshinePHP 2017 - Making the most out of MySQL
 
Mongodb
MongodbMongodb
Mongodb
 
MySQL Cluster Whats New
MySQL Cluster Whats NewMySQL Cluster Whats New
MySQL Cluster Whats New
 
LaravelSP - MySQL 5.7: introdução ao JSON Data Type
LaravelSP - MySQL 5.7: introdução ao JSON Data TypeLaravelSP - MySQL 5.7: introdução ao JSON Data Type
LaravelSP - MySQL 5.7: introdução ao JSON Data Type
 
Strip your TEXT fields - Exeter Web Feb/2016
Strip your TEXT fields - Exeter Web Feb/2016Strip your TEXT fields - Exeter Web Feb/2016
Strip your TEXT fields - Exeter Web Feb/2016
 
The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016The MySQL Server Ecosystem in 2016
The MySQL Server Ecosystem in 2016
 
Sharding using MySQL and PHP
Sharding using MySQL and PHPSharding using MySQL and PHP
Sharding using MySQL and PHP
 
Exploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better TogetherExploring MongoDB & Elasticsearch: Better Together
Exploring MongoDB & Elasticsearch: Better Together
 
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
Inexpensive Datamasking for MySQL with ProxySQL — Data Anonymization for Deve...
 
LAMP: Desenvolvendo além do trivial
LAMP: Desenvolvendo além do trivialLAMP: Desenvolvendo além do trivial
LAMP: Desenvolvendo além do trivial
 
MySQL 5.7 - 
Tirando o Máximo Proveito
MySQL 5.7 - 
Tirando o Máximo ProveitoMySQL 5.7 - 
Tirando o Máximo Proveito
MySQL 5.7 - 
Tirando o Máximo Proveito
 
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
Ora mysql bothGetting the best of both worlds with Oracle 11g and MySQL Enter...
 
20171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v120171104 hk-py con-mysql-documentstore_v1
20171104 hk-py con-mysql-documentstore_v1
 
Coding like a girl - DjangoCon
Coding like a girl - DjangoConCoding like a girl - DjangoCon
Coding like a girl - DjangoCon
 
Strip your TEXT fields
Strip your TEXT fieldsStrip your TEXT fields
Strip your TEXT fields
 

Semelhante a Laravel 5 and SOLID

Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypse
elliando dias
 
DSD-INT 2014 - OpenMI symposium - OpenMI and other model coupling standards, ...
DSD-INT 2014 - OpenMI symposium - OpenMI and other model coupling standards, ...DSD-INT 2014 - OpenMI symposium - OpenMI and other model coupling standards, ...
DSD-INT 2014 - OpenMI symposium - OpenMI and other model coupling standards, ...
Deltares
 
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, ParisSOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
OW2
 

Semelhante a Laravel 5 and SOLID (20)

Solid Deconstruction
Solid DeconstructionSolid Deconstruction
Solid Deconstruction
 
ApiOps Tampere meetup 17.11.2017- serverless_with_openfaas
ApiOps Tampere meetup 17.11.2017- serverless_with_openfaasApiOps Tampere meetup 17.11.2017- serverless_with_openfaas
ApiOps Tampere meetup 17.11.2017- serverless_with_openfaas
 
Clojure and The Robot Apocalypse
Clojure and The Robot ApocalypseClojure and The Robot Apocalypse
Clojure and The Robot Apocalypse
 
The tao of laravel
The tao of laravelThe tao of laravel
The tao of laravel
 
Hands-on Workshop on Building Digital Twin for Factory of the Future
Hands-on Workshop on Building Digital Twin for Factory of the FutureHands-on Workshop on Building Digital Twin for Factory of the Future
Hands-on Workshop on Building Digital Twin for Factory of the Future
 
Introduction to Level Zero API for Heterogeneous Programming : NOTES
Introduction to Level Zero API for Heterogeneous Programming : NOTESIntroduction to Level Zero API for Heterogeneous Programming : NOTES
Introduction to Level Zero API for Heterogeneous Programming : NOTES
 
vBACD- July 2012 - Crash Course in Open Source Cloud Computing
vBACD- July 2012 - Crash Course in Open Source Cloud ComputingvBACD- July 2012 - Crash Course in Open Source Cloud Computing
vBACD- July 2012 - Crash Course in Open Source Cloud Computing
 
Tech breakfast 18
Tech breakfast 18Tech breakfast 18
Tech breakfast 18
 
Rx Swift
Rx SwiftRx Swift
Rx Swift
 
DSD-INT 2014 - OpenMI symposium - OpenMI and other model coupling standards, ...
DSD-INT 2014 - OpenMI symposium - OpenMI and other model coupling standards, ...DSD-INT 2014 - OpenMI symposium - OpenMI and other model coupling standards, ...
DSD-INT 2014 - OpenMI symposium - OpenMI and other model coupling standards, ...
 
OSMC 2022 | Providing a Rich Interface to the Prometheus Operator by David Fl...
OSMC 2022 | Providing a Rich Interface to the Prometheus Operator by David Fl...OSMC 2022 | Providing a Rich Interface to the Prometheus Operator by David Fl...
OSMC 2022 | Providing a Rich Interface to the Prometheus Operator by David Fl...
 
New c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_ivNew c sharp3_features_(linq)_part_iv
New c sharp3_features_(linq)_part_iv
 
Presentation
PresentationPresentation
Presentation
 
PhD SDN Projects
PhD SDN ProjectsPhD SDN Projects
PhD SDN Projects
 
Inside Logic Apps
Inside Logic AppsInside Logic Apps
Inside Logic Apps
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
 
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, ParisSOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
SOA in the cloud with FraSCAti, OW2con11, Nov 24-25, Paris
 
final pl paper
final pl paperfinal pl paper
final pl paper
 
Building and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache AirflowBuilding and deploying LLM applications with Apache Airflow
Building and deploying LLM applications with Apache Airflow
 
Eclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ RheinjugEclipse RCP Overview @ Rheinjug
Eclipse RCP Overview @ Rheinjug
 

Último

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 

Laravel 5 and SOLID

Notas do Editor

  1.  app:name Artisan command
  2.  Tinker => Read-Eval-Print Loop
  3.  app:name Artisan command
  4. 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
  5. 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?
  6. hmmm… do we need Auth::check() in this controller? What if this was API? Or what if we run this from command line
  7. 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 ?
  8. 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..
  9. 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). 
  10. 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.
  11. - HTML implementation of the Interface
  12. TEXT implementation of the Interface And this hit the Open/Close principies
  13. 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, 
  14. Advantage of the Dynamic Nature of PHP *Strategy Design Pattern Template Method Design Pattern What do I need to do for PDF print?
  15. What is wrong here? Response…. Return type …. Collection vs Array … Exception hm…
  16. What is wrong here? Signature must match Preconditions CAN’T be greater Post conditions at least equal to Exception types must match
  17. 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.
  18. Depend on abstractions, not on concretions. All of this is about decoupling code.