Part 2 — Laravel Vue Inertia — Explaining Why We Choose Them?

Nur Sabilly
4 min readJul 18, 2022

--

Photo by Lawless Capture on Unsplash

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!

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

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?

Vue

Vue is a JavaScript framework for building user interfaces. It builds on top of standard HTML, CSS and JavaScript, and provides a declarative and component-based programming model that helps you efficiently develop user interfaces, be it simple or complex³. It was created by Evan You in 2014 as personal side project and now it’s a free and open source project released under the MIT License.

Vue is a mature and battle-tested framework. It is one of the most widely used JavaScript frameworks in production today, with over 1.5 million users worldwide, and is downloaded close to 10 million times a month on npm. In stress-testing scenarios, Vue out-performs React and Angular by a decent margin in the js-framework-benchmark. It also goes neck-and-neck against some of the fastest production-level non-Virtual-DOM frameworks in the benchmark.⁴

Inertia.js

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!

Why Laravel?

  1. Most popular PHP framework and PHP is widely-used programming language for building web application.
  2. A large community.
  3. Provides a set of ready-to-use components to speed up development with expressive and elegant syntax.

Why Vue?

  1. Most widely used JavaScript frameworks in production.
  2. Out-performs another Javascript frameworks such as React and Angular.
  3. Lightweight and easy to write, suitable for beginner.

Why Inertia.js

  1. Build fully client-side rendered, single-page apps, without much of the complexity that comes with modern SPAs.
  2. 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?

  1. Laravel, Vue, Inertia in a simple way.
  2. 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.

[1]: Laravel Official Documentation. Installation. https://laravel.com/docs/9.x#meet-laravel

[2]: Kinsta. PHP Market Share in 2022. https://kinsta.com/php-market-share/

[3]: Vue Official Documentation. Introduction. https://vuejs.org/guide/introduction.html

[4]: Vue Official Documentation. Frequently Asked Questions. https://vuejs.org/about/faq.html#is-vue-fast

[5]: Inertia Official Documentation. Introduction. https://inertiajs.com/

--

--

Nur Sabilly
Nur Sabilly

Written by Nur Sabilly

Full Stack Web Developer. Arch Linux User. Learn, Share, Socialize.

No responses yet