O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Laravel 5 and SOLID

8.504 visualizações

Publicada em

L5 SOLID - Five agile principles that should guide you every time you write code

Part:1. Laravel 5 NEW things - quick review
Part: 2. SOLID
- - -

S - Single Responsibility (SRP)
O - Open/Close
L - Liskov's Substitution
I - Interface Segregation
D - Dependency Inversion

Publicada em: Software
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui

Laravel 5 and SOLID

  1. 1. Five agile principles that should guide you every time you write code by Talevski Igor
  2. 2. Talevski Igor
  3. 3. 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
  4. 4. 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
  5. 5. L 5 : N E W T H I N G S - Q U I C K R E V I E W NOMORE…
  6. 6. S O L I D SINGLE RESPONSIBILITY PRINCIPLE OPEN/CLOSED PRINCIPLE LISKOV SUBSTITUTION PRINCIPLE INTERFACE SEGREGATION PRINCIPLE DEPENDENCY INVERSION PRINCIPLE
  7. 7. SINGLE RESPONSIBILITY PRINCIPLE A class should have only one reason to change.
  8. 8. SINGLERESPONSIBILITYPRINCIPLE
  9. 9. SINGLERESPONSIBILITYPRINCIPLE
  10. 10. SINGLERESPONSIBILITYPRINCIPLE
  11. 11. SINGLERESPONSIBILITYPRINCIPLE
  12. 12. SINGLERESPONSIBILITYPRINCIPLE
  13. 13. SINGLERESPONSIBILITYPRINCIPLE
  14. 14. SINGLERESPONSIBILITYPRINCIPLE
  15. 15. SINGLERESPONSIBILITYPRINCIPLE
  16. 16. SINGLERESPONSIBILITYPRINCIPLE
  17. 17. S O L I D SINGLE RESPONSIBILITY PRINCIPLE OPEN/CLOSED PRINCIPLE LISKOV SUBSTITUTION PRINCIPLE INTERFACE SEGREGATION PRINCIPLE DEPENDENCY INVERSION PRINCIPLE
  18. 18. Software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification. OPEN/CLOSED PRINCIPLE
  19. 19. Separate extensible behavior behind an interface, and flip the dependencies OPEN/CLOSEDPRINCIPLE
  20. 20. S O L I D SINGLE RESPONSIBILITY PRINCIPLE OPEN/CLOSED PRINCIPLE LISKOV SUBSTITUTION PRINCIPLE INTERFACE SEGREGATION PRINCIPLE DEPENDENCY INVERSION PRINCIPLE
  21. 21. 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
  22. 22. LISKOVSUBSTITUTIONPRINCIPLE
  23. 23. LISKOVSUBSTITUTIONPRINCIPLE
  24. 24. LISKOVSUBSTITUTIONPRINCIPLE
  25. 25. S O L I D SINGLE RESPONSIBILITY PRINCIPLE OPEN/CLOSED PRINCIPLE LISKOV SUBSTITUTION PRINCIPLE INTERFACE SEGREGATION PRINCIPLE DEPENDENCY INVERSION PRINCIPLE
  26. 26. A client should never be forced to implement an interface that it doesn’t use INTERFACE SEGREGATION PRINCIPLE
  27. 27. INTERFACESEGREGATIONPRINCIPLE
  28. 28. INTERFACESEGREGATIONPRINCIPLE
  29. 29. INTERFACESEGREGATIONPRINCIPLE
  30. 30. S O L I D SINGLE RESPONSIBILITY PRINCIPLE OPEN/CLOSED PRINCIPLE LISKOV SUBSTITUTION PRINCIPLE INTERFACE SEGREGATION PRINCIPLE DEPENDENCY INVERSION PRINCIPLE
  31. 31. 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
  32. 32. DEPENDENCYINVERSIONPRINCIPLE
  33. 33. DEPENDENCYINVERSIONPRINCIPLE
  34. 34. S O L I D SINGLE RESPONSIBILITY PRINCIPLE OPEN/CLOSED PRINCIPLE LISKOV SUBSTITUTION PRINCIPLE INTERFACE SEGREGATION PRINCIPLE DEPENDENCY INVERSION PRINCIPLE
  35. 35.

×