by morbicer · 2y ago · 0 comments
Adonis/Redwood/Nest is something you will regret in few years because it will lock you down to "their" ways of doing things instead of something with replaceable components.
Admitted, Adonis looks most sensible out of these 3. Redwood is poisoned with needless GraphQL and Nest is written like 2008 java. In Adonis you can at least pick the db layer.
But even Adonis locks you to their validator instead of Zod or his cousins, they use their own Request/Response classes instead of the platform ones, has yucky inheritance and annotations magic etc.
Compare that to the wild west that is Javascript land. Multiple libraries that all do the same thing in different ways. Stuff being deprecated or completely changed.
Sure, if you want "choice", there's plenty of stuff out there for that. You can cobble together your own framework or pick a light framework pick and then add your "batteries" to it. I hope AdonisJS only has 1 way of doing things and that those ways are good, then it will truly go a long way.
As you say, js world is fickle and I wouldn't count on Adonis being here for a long time. Mix and match is more pragmatic in this setting.
Nor can you count on your JS library to survive until next winter.
Consider choosing Oracle as your database. It is a great database maintained by a big company so it will be around in future too. But you will be locked-in to very expensive licensing because when big businesses are "locked in" Oracle can and will raise their prices.
Until the next dev comes to the project and doesn’t agree with your opinions, right? I’ve seen this movie far too many times.
The main benefits of these frameworks is that they remove all the bike shedding decisions. And I trust more something used by a lot of people and battle proven even if I don’t 100% agree with everything.
What you think is the best library for validations is just an opinion as theirs, and for example I don’t think Zod is good at all. See? Now on a team of 5 people we have 6 different preferences and we have to schedule 10 meetings to decide what library is best. And next month we will regret using it anyways.
There is a reason Rails, Laravel, Django etc are so popular in their ecosystem.
I honestly don’t believe the “I can do better all of this by myself”. It’s usually an undocumented, unproven, buggy and insecure mess that only the main author knows how it works.
And/or are we talking minimum memory footprint?
i'm building https://www.plainweb.dev/, which uses htmx + react style components for templating.
We played a bit with Kita too and its great
- Locks you to their own Validator. Nope, Run npm install Zod and you have it working
- Their own Response/Request classes. Isn't it same with Fastify, Express and other frameworks?
- Annotations, Aren't they part of JavaScript?
Annotations are not part of Js, they are part of Ts and are a concession to OOP people coming from other languages. It's a personal opinion but I don't like them and I enjoy this opinion is not uncommon because only few libs are riddled with them.
Going to nitpick a little here
Hono docs language says, they wrap the standard Request object that you can access via HonoRequest.raw https://github.com/honojs/hono/blob/main/src/request.ts#L26
Annotations/Decorators are in stage3 of JavaScript. But I agree they are not super common in JS world except TS heavy libs or frameworks. Btw we aren't big fan of them and use them sparsely in models and commands only