3 ms·
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 expe
by lxcid 8y ago
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#active-record-and-referential-integrity 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.
- kbp 8y ago> MVC is a 20 year old pattern More like 40; it's from late 70s Smalltalk.
- gilbetron 8y agoCan confirm, I worked at a Smalltalk firm in 1995 and was taught MVC then, and was explained to how it was an old pattern.
- e12e 8y agoIndeed. The original paper is still well worth a read: http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html
- jp_sc 8y ago> - Lastly, I firmly believe MVC is a leaky abstraction Then what is the abstraction that you think it should replace it?
- return0 8y agomaybe there is no fitting abstraction
- seandoe 8y agoI agree with the magic complaint. As a newer dev, I don't like how difficult it is to reason about core rails features and added gems... inheritance from hidden classes, etc.