5 ms·
Comparing Rails to Express is not apples to apples. You should compare Rails to something like Next.js that has a lot of the magic and plumbing taken care of fo
by pyrrhotech 5y ago
Comparing Rails to Express is not apples to apples. You should compare Rails to something like Next.js that has a lot of the magic and plumbing taken care of for you on both the front end and the back end.
I agree that for side projects, underfunded startups and especially for product/business-focused founders, using the quickest magical prototyping framework is definitely the best idea so I agree with the overall sentiment of the post, just not the specific conclusion that Rails is the best way to go in 2021. I still believe strongly that having the same language on the front end and backend is paramount to developer productivity.
- leodriesch 5y agoNext.js is cool but the framework part of it just applies to the frontend. The backend is as raw as it gets, it is very comparable to Express.js. No authentication built in, no ORM, no ActiveStorage, ActionMailer, no nothing really there.
- midrus 5y agoNext.js is extremely limited compared to Rails, so you're still not comparing apples to apples. Add to next.js a librarydatabase access, background jobs, csrf and related security stuff, migrations, server side caching of data, *validation*, email sending, email receiving, testing, and I could spend an entire day listing things Rails gives you that Next.js won't give you. Web development is not just rendering html, unless you're building just landing pages, there's a lot more going on.
- jerrygoyal 5y agoNot next.js, but nest.js is a better opponent for rails
- midrus 5y agoHow to do an unique validation in a full stack framework (Laravel): https://laravel.com/docs/8.x/validation#rule-unique https://laravel.com/docs/8.x/validation#rule-unique How to do a unique validation in nestjs (didn't find it in the docs, so had to Google it): https://gist.github.com/zarv1k/3ce359af1a3b2a7f1d99b4f66a17f1bc https://gist.github.com/zarv1k/3ce359af1a3b2a7f1d99b4f66a17f... No thanks. This is still apples vs molecules to mount your own apples.
- andyfleming 5y agoThe commenter you replied to did provide a fair correction as far as the right layer to be comparing. They didn't specifically suggest that Nest.js (started in 2017) is as mature as Rails (created in 2004) or Laravel (created in 2011).
- midrus 5y ago>Not next.js, but nest.js is a better opponent for rails What part of that comment says anything about layers or maturity? By that rule I could compare rails to express and say they are about the same.
- chaostheory 5y agoTotally agree since I went in the opposite direction. Express is closer to something like either Sinatra or Cuba in the Ruby world. A much better comparison would be either Blitzjs, Nestjs, redwoodjs, featherjs, or several other full stack js / ts frameworks. I'm pretty sure these frameworks were inspired and influenced by Rails
- fizx 5y ago5 years on Rails, 6 months on next.js+prisma. React is way better on the view side than ERb/HAML/whatever. I miss ActiveRecord. Prisma is relatively clunky. I like having fat models integrated with the DB. It also feels like I'm fighting with the type system because every variation of a row with different joins becomes a different type. I'd rather be lazy about joins.
- muhammadusman 5y agoWorking with Prisma on a side project, migrations are a pain. Rails' migrations were so easy to use. I am in the early stages of working on the side project so might even consider flipping over to Rails if this keeps getting messier.
- ksubedi 5y agoI feel like something like Blitz.js is a better comparison instead of Next.js. Next.js is still very frontend focused and does not have a lot of key components needed by a full framework like ORM, Authentication etc.
- lta 5y agoI'm not sure I buy the "same language front and back" thing. Counting the number of efforts across the industry to improve js or replace it I think that many people would like to avoid using js at all. I'm the developing a rails backend with a Vue front-end, and the more I work with js, the more I'm happy that I don't have it everywhere.