Lwin Maung Maung

My Notes and Blogs

Home Laravel Linux
<-

Laravel Blade, when to use it?

Published on  Aug 27th, 2023Updated:  May 23rd, 2024
2 mins Read

Blade is one built-in feature of Laravel, known as Laravel Blade. It is known as the template engine of the framework. Due to the massive release of JS frameworks, Laravel works with VueJS and ReactJS.

 

I am familiar with Laravel Blade and a fan of simple monolith architecture. I have a belief. I like decoupling Frontend and Backend completely rather than mixing them all. 

 

 

The reason is the system has to decouple completely to handle the load independently. It counts when millions of users access multiple nodes per second.

 

If Server-Side Rendering is mandatory in your project, but you do not fully decouple between Frontend and Backend, you are in a modern monolith hell.

 

We struggled with PHP for the monolith, dynamic rendering and decoupling. Why do we face the circle again with other Languages?

 

Laravel Blade, Pros and Cons?

  1. One file per request, minimal response. After serving the file and related contents, the server becomes idle.
  2. When some pages need to be dynamic, use the TALL stack.
  3. You do not have many userbases for your application, especially on MVP.

 

Otherwise, choose the JS frameworks when:

 

  1. Load Balancing
  2. Client API
  3. Decoupled Frontend and Backend

 

It may be short, but I hope this helps if you are thinking about your new projects.

 

© lwinmaungmaung MMXXIII. All Rights Reserved.