- Paperback: 106 pages
- Publisher: Packt Publishing Limited (24 July 2014)
- Language: English
- ISBN-10: 1783287985
- ISBN-13: 978-1783287987
- Product Dimensions: 19 x 0.6 x 23.5 cm
- Average Customer Review: Be the first to review this item
- Amazon Bestsellers Rank: #2,81,976 in Books (See Top 100 in Books)
Laravel Design Patterns and Best Practices Paperback – Import, 24 Jul 2014
Frequently bought together
Customers who bought this item also bought
About the Author
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter mobile phone number.
Most helpful customer reviews on Amazon.com
This book barely expands on what is already in the free documentation, but it has the downside of only being accessible through kindle
I regret buying it
You should know some theoretical things about design patterns and the terms surrounding it. If you don’t, you might have a little hard time reading the book. I know a little about design patterns (mostly MVC), and the first four chapters (of six in total) were no problem for me. The final two chapters were a little harder to understand, but with the complementary source code and a little attention, most of the code examples and the explanations were clear.
As stated in the preface of the book, it requires some knowledge of the Laravel Framework. So don’t expect a beginners manual for the Framework. However, without knowledge of the Framework, you can use this book, only then you have to do the preparations (installing, configuring, understanding the basics etc) yourself. From there this book covers the patterns.
As the book explains, you do need to have a decent knowledge of MVC and OOP concepts in PHP as a pre-requisite. The book has an excellent explanation of how models, views and controllers are implemented in Laravel's framework. In particular, the book helped me better understand how Active Record is used in Laravel, via it's Eloquent ORM class.
I particularly like the way the book takes us into Laravel's codebase, to demonstrate how the popular design patterns are used. Learning from the way the experts write code is very useful, so it is helpful to guided through this process in the book, rather than having to search through many libraries of code yourself. The chapter on the design patterns has a very useful section which explains the need for each particular pattern. This is very useful in understanding the purpose of it.
The final chapter looks at best practices in Laravel, and takes 4 design patterns and provides examples of how and why to use them, with some good real-life examples.
Laravel is becoming such a popular and ubiquitous MVC framework for PHP, so this book has come at a good time for Laravel developers who wish to improve their code design. I highly recommend it.
Link to the book: https://www.packtpub.com/web-development/laravel-design-patterns-and-best-practices
First as other reviewers mention this isn't a beginners book for Laravel and some prior knowledge is required, however this book still does a nice job of integrating users into the thought process required for building a decent MVC in Laravel. I've used Codeigniter and it's suited my needs rather well for a framework that didn't require much alteration, but performance wise Laravel has taken the center page, although it's not a huge increase that I was able to notice. The book is structured very nicely and easy to understand, the flow is great from one chapter to the next, and most importantly I didn't feel like I was reading information from the developers manual online.
The coverage on Builder (Manager) pattern, Factory pattern, Repository pattern, and Strategy pattern were well done. I've always liked the MVC pattern but the book continues to give you reusable design patterns that are practical and can be used in other programming projects as well. Loved the OOP approach and this book would have been useless otherwise.
Publisher Link: https://www.packtpub.com/web-development/laravel-design-patterns-and-best-practices
Examples of classes is already present in the framework that make use of a design pattern , this allows us to understand in a more visual way through the code and implemented in the framework.
Laravel uses the MVC architecture pattern software , so the author makes extensive explanation of how this is implemented in the framework , and as controllers , models and views work . It also gives us several recommendations which may be best practices that we can use in our code , to help our applications can grow properly, be in control and do things as they should be .
Look for similar items by category