News for hackers. Stuff that matters.
Re:How to Build a Web App with and Without Rails Libraries by blizkreeg on Wednesday March 31, 2021 @11:44AM (#26648707)
Has anyone here extensively worked with Rails and then gone on to work heavily with Node/Express, or vice versa? Would love to hear your overall experience and thoughts between the two.
Re:How to Build a Web App with and Without Rails Libraries by jkcorrea on Wednesday March 31, 2021 @12:01PM (#26648918)
Learned to dev in Rails, went to work in big tech building internal tools in Python (mostly Flask), Node, and Go, and am now happily building my own startup in Rails.

I honestly am baffled as to why anyone would not choose rails for most web apps, let alone basic CRUD apps. Maybe Django would be an alright substitute, I just dislike Python as a language/ecosystem. And the Rails core and gem ecosystem is just so mature at this point, any new feature you need is just a gem install away (hyperbole a bit).

In the end, it's not a huge deal which stack you go with and great, successful companies have been built on all of these and even weirder stacks. Just wish the world settled on one so we could double down on the tooling around it :)

Re:How to Build a Web App with and Without Rails Libraries by jkcorrea on Wednesday March 31, 2021 @12:10PM (#26649038)
"Baffled" was a bit strong I guess. I enjoy a lot of different language/ecosystems (.net, erlang, typescript if you can call it an ecosystem) and see lots of reasons why you may build on them.

Also recognize starting a project with what language/tools you know best is often more important than picking the most optimal one for the job.

Re:How to Build a Web App with and Without Rails Libraries by mehphp on Wednesday March 31, 2021 @02:38PM (#26651200)
Well, same reason you don't like Django, I just dislike Rails (ruby is aight).
Re:How to Build a Web App with and Without Rails Libraries by cutler on Wednesday March 31, 2021 @12:53PM (#26649689)
> I honestly am baffled as to why anyone would not choose rails for most web apps

Maybe it's the insane memory requirements of Rails leading ot large AWS bills. It can be worse than running a JVM for a fraction of the performance. Rails didn't go out of fashion for nothing.

Re:How to Build a Web App with and Without Rails Libraries by ronyfadel on Wednesday March 31, 2021 @12:05PM (#26648969)
I worked with Node/Express for a hobby site, and I'm building my next project in Rails.

The difference is.. Oh my!

Rails makes developing so much easier and faster. Maybe I'm dumb, but I'm so much more comfortable with batteries included and developing products the idiomatic way.

With Node, I felt like I was reinventing the wheel for every feature I wanted to add.

Re:How to Build a Web App with and Without Rails Libraries by TheRealDunkirk on Wednesday March 31, 2021 @12:20PM (#26649179)
I've been with Rails since about the beginning. I prototyped a rewrite of a production web app in the 0.x days, and decided it wasn't ready yet. (Hey, it WAS pre-1.0.) I got back to it in the 2.x days, and it's been my main tool ever since.

I just looked at the page for Express, and the sticking point is in the title: "unopinionated." I WANT a HEAVILY opinionated stack. I LOVE that I can write 1 line of code in 3 specific places in the Rails directory tree to accomplish something that would take me literally 300 lines of raw Java and Typescript in an Angular world. Some people hate it; that's their prerogative. But this is the difference between Rails and so many other stacks: opinionation.

Yes, it takes time to learn where to put stuff. If that irks you, I'd recommend staying away from Rails. The opinionation is what allows me to leverage the stack to be as productive as whole teams of people banging away on Java.

Re:How to Build a Web App with and Without Rails Libraries by bhahn on Wednesday March 31, 2021 @12:32PM (#26649329)
I agree. I believe the phrase they tend to use more is convention over configuration.
Re:How to Build a Web App with and Without Rails Libraries by cutler on Wednesday March 31, 2021 @01:06PM (#26649884)
Re:How to Build a Web App with and Without Rails Libraries by thesimon on Wednesday March 31, 2021 @12:25PM (#26649236)
Regarding Java: Spring Boot is highly opinionated and also allows you to do stuff with very little LoC.
Re:How to Build a Web App with and Without Rails Libraries by TheRealDunkirk on Wednesday March 31, 2021 @01:33PM (#26650269)
I was USING Spring, and it was STILL taking 100x the code to write a simple CRUD app in Java/Angular than Rails. You can say, "You were doing it wrong," and you may be right, but I researched examples so hard that I finally emailed the author of jHipster, and got a lead to a GitHub repo I hadn't found in months of looking. It was great, except that it was so out of date, it wouldn't work in current versions of Angular. If Spring is what passes for "opinionated" in the Java world, boy, do I have a bridge to sell to you.
Re:How to Build a Web App with and Without Rails Libraries by blizkreeg on Wednesday March 31, 2021 @02:29PM (#26651082)
Does anyone have an opinion that's strongly in favor of Node/Express and why? May be once past the MVP stage, Node/Express was a better choice for xyz reasons - I'd love to hear what they are.
Re:How to Build a Web App with and Without Rails Libraries by midrus on Tuesday April 06, 2021 @03:03PM (#26715935)
I like node, but the only arguments I can find for it are 1) just one language/ecosystem for frontend and backend and 2) node can handle more concurrent connections per MB of ram.

I agree rails is better in every other aspect.