Comment

Comment by aeze

If you just need to host a static page, then sure something like Express is a much better fit. But most web applications have at least some if not all of the following:

- Auth, sessions, secure cookie handling, etc.

- DB interaction

- View templates, layouts, etc.

- SPA-like interactivity

- Form handling & validation

- File uploads

- Asset handling

- Emails

- Background jobs

- Security (CSRF, XSS, SQL injection, etc.)

- Logging

- Internationalization

- Testing

- Real-time functionality

With Node/Express, you're either searching for other people's libraries to use and integrate, which aren't guaranteed to synergize, or writing it yourself. You have all of that baked into Rails, tucked away neatly so you only have to write and focus on what matters. You also have an opinionated architecture so you know exactly where all the custom business logic should go.

I think if you have extremely simple requirements, or you're at a stage where you want to learn all these things by doing it yourself, it would make sense not to use Rails. But if you want to focus on delivering value ASAP, Rails (or similar frameworks like Django) are for sure the way to go.

parent aeze 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton