PHP Classes
elePHPant
Icontem

Title: Mastering Laravel

Recommend this page to a friend!

  Latest classes All reviews   Mastering Laravel   Latest classes Latest reviews   Best sellers ranking Best sellers ranking  

Title

Mastering Laravel

Category

PHP books

Author

Christopher John Pecoraro

Publisher

Packt

Release date

July 30, 2015

ISBN

1785285025

Sales ranking

Week: Not ranked All time: 400

Reviews

July 27, 2016
  Post a comment Post a comment   See comments See comments   Find where to Buy Now Find where to Buy Now  

Lopo Lencastre de Almeida
linkedin.com/in...
I my last book review of "Laravel 5 Essentials" I made a thorough introduction to Laravel, so I won't be repeating it here.

This is a book intended to a more expert audience as well to developers that are used to the Laravel parlance.

In general, there are some useful things which will help your understanding of Laravel 5 if you come from Laravel 4 or if you already read other Laravel books and heard the Laracasts.

Nevertheless, some points were not took in proper consideration by the writer and those would have made the book better:

- We would like to see a greater explanation of the code on why/how things are done in a certain manner.

- Some parts are really confusing if you are not an experienced Laravel programmer.

- Part of the examples are wrong and the reviewers should have take care of that, even if PacktPub has a errata for all its books.

- Would it be nice if the author point out the pros/cons on building the code and possible alternative methods.

- More coverage of unit testing since TDD is covered in the book.


Even so, it covers some topics that other Laravel books don't cover such as BDD, PHPSpec and Behat, nested controllers, and the form builder and router annotation packages from the Laravel Collective. And the Continuous Delivery part was also very interesting.

Said this lets drive throughout the chapters for a more insightful review.

On chapter 1 you will get right away a new approach to building your applications.

And this is very interesting because usually we develop the application and unit testing comes afterward. The author proposes that we start by using PHPSpec to do it right from scratch.

This first chapter will guide you to install all the stuff required to use Laravel but also PHPSpec and PHPUnit.

In this you will also be got to know what is the DB structure for the project used as the basis. We will also start creating your project using Test Driven Development techniques with PHPSpec.

The second chapter deals with database migration and seeding. We will learn on how to use Laravel's Artisan command line tool to do several database activities and will learn on how to use soft-deletes to versioning our database.

This is probably one of the best ideas that you can find in Eloquent's Laravel ORM that we would find so useful in so many projects. Like in all other chapters you will use PHPUnit and PHPSpec to test all examples.

In Laravel 5 the framework moved from a model-view-controller structure into a more modern domain-driven design approach.

In chapter 3 you will learn what this approach is and how the controller connects to a command and to an event and how to use the event and command queue.

In this chapter the author also started with an Agile approach to the development so we will have user stories to help the reader's path along the books examples.

In chapter 4 we will learn how to work with RESTful APIs in Laravel. The first section is about all the types of RESTful commands Laravel accepts and the second section is about the CRUD interface.

The next section deals with more complex database relationships using the Eloquent relations and model casting. The last section is about route caching.

Chapter 5 is about using the Form Builder. Form Builder is no longer included in Laravel so you have to install it.

In this chapter you'll learn how to install the Laravel HTML package and how to use the templating system to build your pages and Form Builder to build simple and complex forms, even using form macros to avoid repeating dull form building tasks. The examples are very good and self explanatory so this should be a breeze.

On the next chapter, chapter 6, you'll learn how to use one of the neat features of Laravel 5: annotations.

Annotations are specific pieces of metadata included in the DocBlock that will help you perform routing with even less coding and this can be a faster and more organized way of doing collaborative programming.

The author does a great job in explaining what are Annotations, even using examples of other languages like C and Java and also in PHP. It also shows some examples of Annotations on other PHP frameworks like Symfony and Zend and compares them with Laravel.

The annotations package is not included in Laravel 5 but you can install the package easily with Composer. All instructions, as usual, are included. You have all information in this chapter to make an inform decision on using it or not and, as this is part of Laravel Collective like the HTML package, you can rest assured that support will continue to exist.

In the next chapter, chapter 7, you will learn how to use Laravel's middleware. Middleware is a mechanism used in the middle between route and the application.

This is a great mechanism to help separate a software application into separate layers, like protection layer in the core of the application. You will work with the HTTP kernel, learn how to make a basic middleware, how to use the Authenticate Middleware class, and hwo to use Contracts, which is a new way of using an interface to provide a non-croncrete class to separate the actual class from the calling class. You will build a custom middleware for logging.

In chapter 8 we will have a walk-through on Laravel's Eloquent ORM and will learn how to use it on a new application from scratch but also how to use it to port a legacy database to our new application.

About Eloquent ORM you can read more on my next review on "Learning Laravel's Eloquent" book by Francesco Malatesta.

Chapter 9, is about scaling Laravel. You will learn how to speed up your routing with caching and how to implement and use a master-slave strategy. You will also learn about Lumen, the lightweight version of Laravel and how it can speed even more your system.

The last chapter, chapter 10, deals with the current concept of continuous integration and building tools.

In this chapter you will learn how to install Node.js, Gulp and Elixir - Laravel's tool for continuous integration and delivery, runing Elixir, combining CSS and JavaScript, set up notifications, running tests with Elixir and PHPSpec and how to extend Elixir with your how custom tasks.

As I mentioned before, Laravel is one of the most exciting of the newer PHP frameworks and it will gain more market share in the near future. It's already the most starred PHP framework on Github and that says a lot about its popularity, so you should really consider to have it as one of your expertise areas.

With this new version you will also have a stable Long Term Support Laravel and you can be more confident on working with it.

This book is a natural follow up of the previous "Laravel 5 Essentials" book, also from PacktPub. If you are not anymore a newbie to Laravel this is a very good book to follow your path to mastering Laravel as a Pro.
  Post a comment Post a comment   See comments See comments   Find where to Buy Now Find where to Buy Now  

Comments

No comments were submitted yet.

Post a comment