by jeppester · 2y ago · 0 comments
I'd recommend anyone who'd be interested in "Rails, but in TS" to give it a go.
It feels much more similar to rails (or Laravel) than the most popular TS stacks, and also has "batteries included" instead of leaving you to decide on every part of your stack (or trust a template from a third party).
Recently, I've been fascinated by the "batteries included" back end frameworks of Rails, Laravel, and Django, but I've written TypeScript for pretty much my entire career, and it's just easier to keep it that way than to switch now.
What are your thoughts so far in your testing? Could you compare it to any of those other frameworks I mentioned?
Rails is definitely more mature. It has a larger ecosystem and much more documentation. If you don't see any benefit from having types and sharing the programming language between the backend and frontend, then you are probably better off with rails.
That being said AdonisJS has been working out surprisingly well thus far. I've found the documentation to cover pretty much anything we'd usually want an app to do, which is refreshing in the world of TS.
You are also not locked in any way. While you can use the in-house ORM, validation library etc., it's easy to use something else if you prefer that.
There are a few more rough edges than what you'd be used to from Rails, but nothing big so far and the source code is easy enough to get around, which I wouldn't say is always the case with rails. There's also a discord channel that seems fairly active and helpful.
For a recent personal project I went with NestJS but soon after discovered Adonis. I've actually been considering switching.
To me it seemed more interested in being a smart dependency injection engine, and enforcing an - IMO not very JavaScripty - module pattern rather than being a useful tool.
You can do everything you want, but you will have to make all the decisions yourself, and you will have to make everything play by nestjs's rules. And from my experience the seemingly comprehensive docs often don't get you very far.
Follow the guide for Prisma and you won't be able to extend the Prisma client unless you refactor the service you've just made.
Follow the guide for file upload and you will have a file in your controller, but very little information about how to store that file.
That being said, I can see that lots of people really like nestjs, so maybe I'm just not getting it.