Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Software Design Patterns in Laravel by Phill Sparks

265,714 views

Published on

Laravel makes use of quite a few well-established design patterns that promote reusable object-oriented code. Together, we will investigate the design patterns used in the core of Laravel 4 and discuss how they encourage reusable software.

Published in: Technology, Design
  • DOWNLOAD FULL. BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y8nn3gmc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Nice Slides Mate, Check these tutorials if you like to build application from scratch using Laravel 5.1, You can even download and setup on your local machine, http://infidigisolutions.com/larb/index1.html
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • very good -
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Nice slide..
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Software designs are most important from developers point of view. However when someone thinks from a business point of view that how laravel can be beneficial to business. I got answer on https://goo.gl/YZ4Amb
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Software Design Patterns in Laravel by Phill Sparks

  1. 1. Software Design Patterns in Laravel 4 by Phill Sparks
  2. 2. Credits • Rosalind Goodall - Graphics • Taylor Otwell - Laravel
  3. 3. @PhillSparks
  4. 4. @PhillSparks •API Engineer at CrowdLab
  5. 5. @PhillSparks •API Engineer at CrowdLab •From Leicester, UK
  6. 6. @PhillSparks •API Engineer at CrowdLab •From Leicester, UK •Climbing Instructor
  7. 7. @PhillSparks •API Engineer at CrowdLab •From Leicester, UK •Climbing Instructor •Scout
  8. 8. @PhillSparks •API Engineer at CrowdLab •From Leicester, UK •Climbing Instructor •Scout •Laravel Core Team
  9. 9. Laravel • With Laravel since 1.5.9 • Core Team Member • Past: Quality Team • Now: Community engagement and support
  10. 10. Laravel • With Laravel since 1.5.9 • Core Team Member • Past: Quality Team • Now: Community engagement and support • Dayle still owes me 9000 support points!
  11. 11. Software Design Patterns Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice. -- Christopher Alexander, AIS+77 “ ”
  12. 12. Software Design Patterns
  13. 13. Software Design Patterns
  14. 14. The Patterns • Builder • Chain of Responsibility • Command • Facade • Factory • Iterator • Mediator • Observer • Presenter • Repository • Singleton • Strategy
  15. 15. Notations
  16. 16. Class Notations
  17. 17. Sub-class Notations
  18. 18. Abstract Class Notations
  19. 19. Class Instance Notations
  20. 20. Implementation Notations
  21. 21. Building Blocks
  22. 22. Interfaces namespace IlluminateAuth; interface UserInterface { public function getAuthIdentifier(); public function getAuthPassword(); } class GenericUser implements UserInterface {
  23. 23. • 244 interfaces in Laravel (including vendors) • 25 from Laravel Core • 65 from Symfony • 73 from Swiftmailer Interface
  24. 24. Abstract Classes namespace IlluminateDatabaseEloquentRelations; abstract class Relation { abstract public function addConstraints(); abstract public function getResults(); } class BelongsTo extends Relation {
  25. 25. Abstract Classes • 128 abstract classes in Laravel (including vendors) • 14 from Laravel Core • 15 from Swiftmailer • 40 from Symfony
  26. 26. Iterator
  27. 27. PHP’s Iterator Interface
  28. 28. Laravel’s Iterators • Collection • Paginator
  29. 29. Observer
  30. 30. Dispatcher namespace IlluminateEvents;
  31. 31. Dispatcher namespace IlluminateEvents; class LoginHandler { function handle($user) { // do something with $data } } Event::listen(‘user.login’, ‘LoginHandler’); Event::fire(‘user.login’, $user);
  32. 32. Singleton
  33. 33. AliasLoader namespace IlluminateFoundation;
  34. 34. Multiton
  35. 35. DatabaseManager namespace IlluminateDatabase;
  36. 36. Facade
  37. 37. Facade namespace IlluminateSupportFacades;
  38. 38. Input namespace IlluminateSupportFacades;
  39. 39. Route namespace IlluminateSupportFacades;
  40. 40. Response namespace IlluminateSupportFacades;
  41. 41. Str namespace IlluminateSupport;
  42. 42. Facade vs Singleton
  43. 43. Decorator
  44. 44. BootstrapPresenter namespace IlluminatePagination;
  45. 45. BootstrapPresenter namespace IlluminatePagination;
  46. 46. Repository • Examples: • IlluminateCacheRepository • IlluminateConfigRepository
  47. 47. Builder (aka Manager) • Examples: • IlluminateAuthAuthManager • IlluminateCacheCacheManager • IlluminateQueueQueueManager • IlluminateSessionSessionManager
  48. 48. Factory • Examples: • IlluminateDatabaseDatabaseManager • IlluminateDatabaseConnectors ConnectionFactory • IlluminateValidationFactory
  49. 49. Service Provider • Core to Laravel’s IoC • See IlluminateSupportServiceProvider • Examples: • IlluminateAuthAuthServiceProvider • IlluminateHashHashServiceProvider • IlluminateLogLogServiceProvider
  50. 50. Strategy • Examples: • IlluminateCacheStoreInterface • IlluminateConfigLoaderInterface • IlluminateDatabase - Builders & Grammars • IlluminateTranslationLoaderInterface • IlluminateViewViewFinderInterface
  51. 51. s/PhillSparks//

×