How does having two separate projects for frontend and backend affect performance?
Currently learning Laravel.
I'm working with blade as the frontend so the entire project is sort of "united" in the sense that the frontend and the backend are on the same folder and seem to quickly access each other (for example authentication sessions, xhr requests, etc..)
But what if I use some JS framework such as Vue or React to separate my frontend and use Laravel as backend(So two folders - one is Laravel backend and second is the JS frontend)?
I'm just curious if it's really going to spend more resources when talking about a large scale app, or it's just something that is an illusion because seeing everything in the same folder make it
But if it does use more resources, what are the causes for that? (In my thoughts it's stuff like - every page reload you have to connect via API to the server and get the auth user credentials which feels like something much "heavier")
it's just more complication for you, nothing else. And if you go for javascript rendered views then you have to define your own internal api so to have both sides communicate with each other.
It makes no odds if the frontend and backend are in the same project or not
@Ligonsker vue is being run on the client's computer so the amount of requests remain the same. And it sounds like premature scaling. Laravel can handle alot of requests out of the box, and you can always scale up. And when you start getting the size of Facebook you will have hired specialized engineers to handle the set up and must likely rewritten everything anyways
@Snapey I have no idea, I remember he said something about more opened connections because when your code is together (as in blade stack project), then there are less opened connections because the backend is sort of embedded (Sorry I'm no expert in this so I am using some wrong definitions)
But when I say two projects I specifically mean separate front + back (as Vue.js SPA + Laravel backend only for example)
@Sinnbeck That's true, I think he is just exaggerating or he is just really optimistic regarding the app (Although indeed we had more than 50,000 requests in short period of time which crashed the weak AWS machine, it was not expected haha)
*50,000 requests, not from users, but requests from another source that is supposed to send information