I don’t agree that it’s common place. Many things don’t use this. But when people want to do this, they reach for Next, Nuxt or Sapper.
That being said, after using all three, I am moving further away from it being a good idea.
Many front end things don’t work on node. Try making a isomorphic app without bailing out of google maps.
You still end up with server vs frontend. Next originally didn’t have that clean of a seperation and has more to making it clearer in the preload lifecycle.
Harder to debug.
Arguable slightly larger bundle on client. Some server code leaks. Period. Even if it’s behind a conditional.
Much higher complexity. Trade off is we can use component based development.
I actually think people don’t do it, because it’s difficult to do in general, even before you get to the trade off and side effects. Hence the use of tooling to solve it.
Next, Nuxt, Sapper are great products. Though Sapper is very much weaker in term of features and maturity.
But the other trade offs are kind of ignored.
I think it’s a great concept for DX when it works and things work well. But users do not care. And the extra complications can lead to more bugs and less desirable outcomes.
That being said. Keeping a frontend and a backend code base seperate can also, because you may arguable have more code. Every situation is different. I like to start with the needs of the user experience and let that guide decisions.
Yeah. It’s better and can be worth it for sure. But it can make things more complex. Your really have to go in and do things the way the tooling allows.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don’t agree that it’s common place. Many things don’t use this. But when people want to do this, they reach for Next, Nuxt or Sapper.
That being said, after using all three, I am moving further away from it being a good idea.
That's a very comprehensive answer :)
Ok, so people either don't do it - because of these difficulties - or when they do they reach for a tool that provides this.
I actually think people don’t do it, because it’s difficult to do in general, even before you get to the trade off and side effects. Hence the use of tooling to solve it.
Next, Nuxt, Sapper are great products. Though Sapper is very much weaker in term of features and maturity.
But the other trade offs are kind of ignored.
I think it’s a great concept for DX when it works and things work well. But users do not care. And the extra complications can lead to more bugs and less desirable outcomes.
That being said. Keeping a frontend and a backend code base seperate can also, because you may arguable have more code. Every situation is different. I like to start with the needs of the user experience and let that guide decisions.
So then the problem is not "solved", it's still a challenge and whether or not it's worth it can only be decided on a case by case basis 👍.
Yeah. It’s better and can be worth it for sure. But it can make things more complex. Your really have to go in and do things the way the tooling allows.