Is it correct and or indicated to merge in a 5.x Laravel project with the components developed in Vuejs 2 all within the same directory?

Asked

Viewed 78 times

3

It is known that the integration between Laravel and Vue is good, however it would be indicated to use the Vue components within a Modular project? each time the application grows will be more tied to each other, the right would not be to separate these responsibilities even using different machines to host front and back.

2 answers

1

It all depends on how you develop it. If it is something large I do not recommend using the standard structure of Laravel + Vuejs but use Laravel only as API (Backend, JWT, etc) and use Vuejs Puro (+Webpack). This way you can have 100% control of your application, Load Balance and Scale as needed. However if it is something small, it is OK to use the already ready structure that comes in Laravel.

1

It depends a lot on your scenario but...

Applications Laravel + Vue are excellent, you can communicate with the Laravel through the props of Vue.

But as has been said it unifies front and back, what is a common and not scary practice, by the way if you separate the front and turn the back into a API REST, your application will be a single page application, what requires a lot of study and depending on the scenario is not something very recommended...

If your focus is not so much the front o webpack mix of the message account because it compiles pure javascript, ES6 and other things according to your need, also covers the whole part of minification...

But of course depending on your project a single page application is a good one, usually the initial build is longer but the application is very fluid and fast, among several other benefits of UX...

Regarding load balancing, this can all be configured on your server or on clusters.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.