DEV Community

loading...

Discussion on: Why is Isomorphic JavaScript not longer talked about?

Collapse
khrome83 profile image
Zane Milakovic

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.

  1. Many front end things don’t work on node. Try making a isomorphic app without bailing out of google maps.
  2. 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.
  3. Harder to debug.
  4. Arguable slightly larger bundle on client. Some server code leaks. Period. Even if it’s behind a conditional.
  5. Much higher complexity. Trade off is we can use component based development.
Collapse
arobu profile image
Andrei D. Robu Author

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.

Collapse
khrome83 profile image
Zane Milakovic

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.

Thread Thread
arobu profile image
Andrei D. Robu Author

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 👍.

Thread Thread
khrome83 profile image
Zane Milakovic

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.