Live data from Hacker News

I Miss Rails

chanind.github.io

41–50 of 522 posts

Re: I Miss Rails

#41
post #20
post #16

Earlier quoted context omitted.

Here are two of the most popular books on Rails on Amazon, along with their page counts: "The Rails 5 Way" (1088 pages) "Ruby on Rails Tutorial: Learn Web Development with Rail" (816 pages) Rails is enterprise.

What does this enterprise slur even mean ? Is it like saying a band sold out when they had a hit record? Do we only use undiscovered indie frameworks now?

It means it's everything but the kitchen sink: heavyweight, difficult to learn and use, and full of features you don't need.

It has nothing to do with popularity being bad. In general that's good a thing, because support is better (and rails does have terrific support), but it does exert a feature-accretion force.

Re: I Miss Rails

#42
post #7

What’s the harm in using rails purely as an API? You’ll still get a lot of functionality out of the box and maybe have to write just a little bit more glue code for the JS-backed front end than what rails provides out of the box.

Nothing at all. But you lose a lot of the productivity benefits of building the whole stack in rails.

True. You’ll loose some productivity but not as much as jumping ship to a complete JS stack. And I’m saying that as a full time JS Dev. The author is completely tearing out rails for JS without giving a solid reason or context for it.

Re: I Miss Rails

#43
post #34
post #25

Yep, 100%. In the process of converting a node/typescript API to rails. I'll never make this mistake again.

You’re going from TypeScript to Ruby? Having tasted the joys of static type checks combined with a unified front/back data model, IMHO, that’s unthinkable.

> joys of static type checks combined with a unified front/back data model

Would you mind elaborating on the specific benefits?

Re: I Miss Rails

#44

> if the modern equivalent of Rails already exists, please let me know! You're in luck. Rails 5.2.3 was released 20 hours ago. More seriously, I feel rails is still excellent and I'm happy to work with it every day. I'd be interested to hear more about what makes rails not modern? I find it a very productive framework. EDIT: If you're talking about missing a JS equivalent of rails, do you know about Loopback? https:/…

LoopBack 3 was terrible - complicated, added no value, encouraged creating vulnerabilities, had lots of obvious vulnerabilities in official components. LoopBack 4 looks pretty different, but I wouldn’t trust it to be good unless the entire team and philosophy behind it has been replaced.

Re: I Miss Rails

#45
I personally don't missed Rails mostly because boilerplate doesn't really bother me. I'm more afraid of using the wrong abstraction.

Rails (v4 was my last experience) was hard for me and I think my reasoning is as follow:

- I like to dig deep into the framework I work with but Rails have so much meta programming (a.k.a magic) that I struggle real hard figuring out stuff. You often have to go into runtime, hit method and see where it lead you to and after a while, I realise that I'm not going to see the bottom.

- If you are someone who like to dig deep, the documentation wasn't helpful for me at all.

- ActiveRecord for a while discourage using foreign key. When I move away from Rails, I tried SQLAlchemy and love that its unopinionated. Then I move to node and agree its ORM are less powerful but I learnt to love SQL. ActiveRecord for me shouldn't be any more than just convenience ORM and shouldn't replace SQL, that goes against Rails' ActiveRecord philosophy which claim these constraints should be at the model side rather than DB side. https://guides.rubyonrails.org/active_record_migrations.html...

- Lastly, I firmly believe MVC is a leaky abstraction. Any variations of MVC is just shifting the complexity around, not reducing it. I worked on Rails, worked on iOS (which uses M-V-VC). The pattern I see is that almost every year, someone will get bitten by vanilla MVC, tried some variants unsuccessfully and conjure a new variant; the cycle goes on. MVC is a 20 year old pattern, it have amazing insight into how we should build application, but its implementation always fall short after so many years.

Ultimately, I don't think Rails was optimised for someone like me. I think there's just fundamental differences in philosophy between me and Rails.

Re: I Miss Rails

#46

> if the modern equivalent of Rails already exists, please let me know! You're in luck. Rails 5.2.3 was released 20 hours ago. More seriously, I feel rails is still excellent and I'm happy to work with it every day. I'd be interested to hear more about what makes rails not modern? I find it a very productive framework. EDIT: If you're talking about missing a JS equivalent of rails, do you know about Loopback? https:/…

I know this is the opposite of what you asked but I find Rails to be keeping pace with modernity much better than its conemporaries! Django seem to have given up on integrating websockets (ActionCable has been in Rails for literally years now), nor is there trivial integration for JS assets/asset pipeline functionality. I don't write much of either anymore, but I'd still reach for Rails the instant I need to get some…

Django has multiple good asset handling libraries. I like https://django-pipeline.readthedocs.io/.

And with django-channels (https://channels.readthedocs.io/) Django goes way beyond just WebSockets. You can now do fully asynchronous data processing pipelines.

I'm still happy working with Django (which is not something I can say about the JS ecosystem). Especially when doing APIs with Django REST Framework.

Re: I Miss Rails

#47
post #27
post #7

What’s the harm in using rails purely as an API? You’ll still get a lot of functionality out of the box and maybe have to write just a little bit more glue code for the JS-backed front end than what rails provides out of the box.

That's what we do. Rails mostly just a json api, with a React front end. Devise handles auth. Useful gems in models and services, sidekiq doing its thing... Happy with the setup.

Why not Sinatra + ORM in that case?

Re: I Miss Rails

#48
post #16

Earlier quoted context omitted.

Here are two of the most popular books on Rails on Amazon, along with their page counts: "The Rails 5 Way" (1088 pages) "Ruby on Rails Tutorial: Learn Web Development with Rail" (816 pages) Rails is enterprise.

Confirmed, Chicago has multiple billion and hundred-million-dollar businesses built on Ruby on Rails. A lot of it stems from Basecamp being based here, so Chicago had a lot of early adopters. But those early adopters have spawned new companies using the latest versions of Rails decades later.

That may have been intended as hyperbole, but Rails is only 15 years old...

https://en.wikipedia.org/wiki/Ruby_on_Rails#History

Re: I Miss Rails

#49
I believe we are at a turning point for the future of web apps and servers. After using Firebase and serverless (I hate this term) technologies in the last few, I didn't miss doing all what's said in the blog at all.

Need authentication? Just turn the feature on in Firebase and use it. Need storage? Need analytics? Just do the same. The future is bright and we are heading in the right direction. With this, we can get started on our apps with zero configuration and just focus on features.

Re: I Miss Rails

#50
I'll take a mildly unpopular opinion and say that I really despise code-gen-style web frameworks, like Rails or ASP.NET MVC or Django, and would rather reinvent the wheel than use them.

I definitely see the appeal of these frameworks, but I feel that a side effect of having them is that there's a metric ton of code generated and you really have no idea how it works. I remember spending almost 30 minutes digging through the C# object being used to parse JSON, generated by ASP.NET, to see why a field mapping was being done incorrectly, simply because I had traverse through four different files to see the logic.

Granted, part of the problem there is intrinsic to how C#/Java are structured, and the massive number of files needed by them, but I still feel that the code generation made it worse.

Even if the code weren't generated, the amount of ceremony to add an endpoint, add a new type to be parsed, and perform updates just does my head in. That aforementioned C# app was about ~1000 LOC, across a few dozen files. I rewrote the system, from scratch, using Clojure and http-kit in around 100 LOC, without losing any features.

I'm probably just old now, but I suppose I really dislike magic in my codebase, which is why I tend to prefer the lower-level things.

(Also, just a note, I'm a total hypocrite, since I actually wrote an MVC-ish framework in Node.js 5 years ago, then ported it over to Erlang).

Post reply on HN