Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven't actually used RoR, but I've used Django extensively and understand they are fairly similar. How do people build things that aren't just CRUD? Django calls itself a "web framework" but I think that's wrong, it's a CRUD app framework. Is RoR the same?

The main problem I have is the mixing up of low-level logic like web and database etc with high-level logic (ie. business rules). The easy path leads to a ball of mud with duplicated business rules across views and forms etc. How are people dealing with this? Does RoR fit into a larger application architecture where it does just the CRUD part and some other systems take over to do the business part?

It always seems to start well, you have your models, and views just doing CRUD stuff. But then someone says "I don't want to have to create an author before I create a book, let me enter new author details when I enter a book", and then the whole thing breaks. You need some logic somewhere to create authors but only in certain cases and of course the whole thing needs to be one transaction etc. Then you end up basically undoing all the simple views you did and essentially fighting the system to handle logic it was never designed to handle.

In essence, these systems make the easy stuff easy and the hard stuff even harder.



You can certainly write complex applications in Rails that go beyond CRUD. But in my experience (which may be outdated, I haven't written Rails in years), it requires a lot of discipline and going beyond what Rails itself offers. Sometimes you may even have to fight some of Rails's conventions.

There are some people who have tried to abstract such things into yet another framework on top of Rails, e.g. I recall Trailblazer[0], but I have no idea if anyone still uses it.

[0]: https://trailblazer.to/2.1/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: