959 karma · joined September 19, 2022
This is why you don’t use VC backed dependencies that are not easy to move away from.
This is why you don’t use VC backed dependencies that are not easy to move away from.
Exactly. It makes absolute no sense to deal with all of Next's artificially imposed limitations if you're running it on your own servers.
I think that when working with Node the "trick" is to pick libraries/dependencies/frameworks that are either 1) Well know, supported, big community, well maintained, many users, etc or 2) They're small and isolated enough that it wouldn't be a big deal to replace them or to just fork and maintain yourself.
At least that's my kind of unwritten rule about it.
This is exactly what I mean.
Compare that to using the ORMs from Django, Laravel or Rails or some of the Java ones. You can be sure than 3~4 years from now they'll still be around, well maintained and probably without big rewrites or API changes.
Not saying that it's not the best option in node land (I don't know), but what frustrates me is that there's no clear option for many core/basic things. And always "the best solution that's going to fix everything" seems to be the one that appeared last. Feels like building on top of mud to be honest.
Which one is it?
Or please, describe how are you doing in your super simple stack:
Authentication, authorization, background jobs, assets bundling, migrations, emails, security (csrf,rate limiting, timing protection, etc), and everything else provided by batteries included frameworks.
My problem with the ones you are mentioning (next, remix, svelte kit, etc) is that 1) they are not a full solution… you still have to figure out everything else, from authentication, authorization, sending emails, ORM, background jobs, etc… and 2) they’re in constant shuffle and rewrites and change of opinions so maintaining long running projects on these frameworks quickly becomes a nightmare.
If it’s for learning or a side project, then pick whatever. If it’s for business, pick tried and true and something g you’re confident in 2 years will be still maintained and not be a totally different beast (ehem, next).
But I’m skeptical they won’t fuck up as well. They have a reputation of breaking everything with react router.
We are using this approach in one of our projects at work and it’s been working great.
We moved a project at work and it’s been night and day for us. Not going back.
Once you get past the simple landing page or hello world app all those things you call “bloat” come in super handy. Otherwise you end up with a custom undocumented untested unproven probably insecure rushed out implementation of what the “bloated” solution gives you. Same applies for Unpoly vs htmx. Unless you’re building just a hello world landing page, as I said.
I can understand somebody compares a pixel to an iPhone… but the only advantage of a cheap/low tier android phone is that…. They’re cheap.
Unpoly also has many more features you’d have to add code for.
Moving from android was the best decision I’ve made tech-wise.
If you can afford it, it’s totally worth its value.
Unpoly is so much better in every way you look at it.
Most people seem to be using it just because “it’s popular” which ironically is the reason most people use React as well.
If you want something “safe”, nowadays the only option is to use one of the big MVC frameworks (django, laravel, rails, etc...) with inertia.js, if you want to use React or Vue.
Next.js is marketed as a super cool framework you can just install and run anywhere, and while that's mostly true... it has a lot of limitations and architectural decisions which make sens only on their hosting platform, but if you're running it on a different platform or your own servers, those limitations make no sense and feel super artificial, even if those are good trade offs for their "serverless" platform.
So everything mentioned in this post, plus all the shady behaviours I've noticed from them have driven me away from it, I'm so happy I did.
Some of the things I'm talking about:
* Middleware runtime artificial limitations because that would make it more difficult to move to their platform later. They don't even respond anymore in the issue: https://github.com/vercel/next.js/discussions/46722
* They refuse to add a config file option to disable the telemetry. Yes, you can do the env var or run the npm script, but they're betting on people forgetting to do it on every project, on every computer and on every server/environment they deploy to. A single boolean config would disable it everywhere, but they won't do it: https://github.com/vercel/next.js/issues/8851#issuecomment-9...
If you still choose to use it just because "it's the most popular one", then good for you. I prefer to make different trade offs.
In my own opinion, that's why.
This is not unfortunate. I've done this recently and I'm so glad I did. Remix is much, much, much simpler and pragmatic. And doesn't have all these artificial limitations Next.js has when you're running it on your own server. I can't recommend it enough.
That's the problem.