3 Reasons for Use Laravel
3 Reasons for Use Laravel
I’m a web developer and I wish to talk about Laravel. Laravel is PHP framework, developed by Taylor Otwell in 2011 immediately finds a great consensus from the developers, why?
1. Laravel implements the MVC pattern
The MVC is an architectural pattern using for developing UI, that divides an application into three interconnected parts; Model, View, Controller. The Model is the core of this pattern. It is not directly connected to UI and this means that the Model directly manages the data from the Database and the inputs recived from the Controller. The View is simply the visualization of the Model’s Data. Laravel use the Blade template to paginate the Data. The Controller is “The man in the Middle”, It encoding the View’s data for the model and organize the Model’s raw data for the View. This pattern have the Advantage of avoiding the code reuse, this reduces the time of Refactor and Debugging. In laravel, thanks to artisan comand, create a Model with the Controller is very fast:
php artisan make:model Easy --controller
2. Front-end
Laravel offers two way to develop very quickly you Front-end the Blade tempalate or the integration With Vue.js. Vue.js is a JavaScript framework, then it is logically separate from Laravel, for this reason is necessary a bundle of API to render the Back-end Data. But the real vantages of Vue.js is the possibilty to reuse some component with no fatigue and the possibility to create fully reactive View. On the other hand Blade is based on php, for this reason is not necessary the API approch to render the Back-end Data in this way you lose the reactivity of the View.
3. Authentication
Laravel also offers the possibility to create pure API application using a single command:
php artisan passport:install
Laravel passport is a native package, developed for the api authentication, is very easy to use, it have all the necessary to setup the token and create the AuthMiddleware indipendenty. It have also the option to create some Vue component if you front-end is integrated in Laravel.
php artisan vendor:publish --tag=passport-components
Laravel by default implement the RESTFull standard for the API, for this the Laravel apps are much faster than apps that use SOAP standard and in these contexts every seconds is important.For these reason Laravel has become the used and supported framework, on stackoverflow there are currently 122 455 questions about laravel against the 62 872 questions about Symfony.If I could not convice you it will be necessary you googled laravel’s weak points
References