Hello, everyone. This is the second part of our journey to understand Laravel Vue Inertia. I will explain why we choose Laravel Vue Inertia? I hope by the end of this section you will understand why and convinced those stacks is a good tool for you to build web application. Let’s go!
Part 1 — Laravel Vue Inertia — See The Project We Will Build
Part 2 — Laravel Vue Inertia — Explaining Why We Choose Them←We’re here. Next part is coming soon!
Laravel Vue Inertia, What are they?
Some of you might already know those term and I presume you’re reading this right now is because you want to learn about those right? But, if you don’t have an idea about it, that’s all right. I will explain it in a simple way.
Laravel is a web application framework with expressive, elegant syntax¹. A web framework provides a set of tools that provides ready-made components or solutions that are customized in order to speed up development. Laravel handles almost everything the basic and cumbersome tasks so that we as developer just need to focus crafting the solution we’ve designed earlier. Laravel created by Taylor Otwell in 2011 as an alternative to Codeigniter framework.
Laravel uses PHP, which is one of the most popular programming language for building web application. By the end of 2021, market share for PHP is 79.2% all over the world and Laravel is the most popular PHP framework². This means the demand for PHP and Laravel developer is high. This also means the more popular it is, the more people talks about it. The community is large. If you face issues, go talk to forum, community will help you. So, you dare to say that PHP is dead?
Inertia is a new approach to building classic server-driven web apps. Inertia allows you to create fully client-side rendered, single-page apps, without much of the complexity that comes with modern SPAs. It does this by leveraging existing server-side frameworks. Inertia has no client-side routing, nor does it require an API⁵. It was created by Jonathan Reinink.
Inertia is not a framework. Instead you can think of it as a glue that connects Laravel and Vue. Actually, it’s not just those two. Currently, Inertia have three official client-side adapters such as React, Vue, and Svelte and two server-side adapters (Laravel and Rails). With these you can just build a web application with less headache because you only have to deal with controllers and page views, forget about restAPI!
“Yeah, it’s cool but why exactly?”
That’s the question I’ve been waiting for. Before I tell you why, please scroll to the top, and re-read the bold texts. If you’re already done, let’s summarize!
- Most popular PHP framework and PHP is widely-used programming language for building web application.
- A large community.
- Provides a set of ready-to-use components to speed up development with expressive and elegant syntax.
- Lightweight and easy to write, suitable for beginner.
- Build fully client-side rendered, single-page apps, without much of the complexity that comes with modern SPAs.
- Easily connects Vue and Laravel.
Of course, there are a lot of reasons why to choose them aside from mentioned above. You can explore and learn by yourself deeper in its documentation. Happy learn!
What we’ve studied in this section?
- Laravel, Vue, Inertia in a simple way.
- Why we choose them.
Next article we will learn how to set up that project and what’s good to have before you build this application.
If you have a feedback or question, please leave a comment below. If you find it useful, please share and like this article. Thank you.
Cheers, Nur Sabilly.
: Laravel Official Documentation. Installation. https://laravel.com/docs/9.x#meet-laravel
: Kinsta. PHP Market Share in 2022. https://kinsta.com/php-market-share/
: Vue Official Documentation. Introduction. https://vuejs.org/guide/introduction.html
: Vue Official Documentation. Frequently Asked Questions. https://vuejs.org/about/faq.html#is-vue-fast
: Inertia Official Documentation. Introduction. https://inertiajs.com/