3 ms·
Pardon me if I offend anyone, but isn't this doing more work for the same functionality? Can someone give me some insight into why this would be desirable?
by Spyckie 18y ago
Pardon me if I offend anyone, but isn't this doing more work for the same functionality? Can someone give me some insight into why this would be desirable?
- timr 18y agoBecause it allows you to maintain clean abstractions, which is essential for big projects. The ultra-permissive model of programming (the current fad) is great when the entire codebase can fit in your head, but it fails completely when you're working with anything larger. For example, every substantial Rails project I've seen has had views that have degenerated into messes of bizarre spaghetti logic (which, in turn, interact with the bizarre spaghetti logic in the controllers, in bizarre, noodly ways). This is mainly due to the fact that there's virtually no enforcement of abstraction boundaries in Rails -- views can directly manipulate the models (whose methods and data are essentially world-writable), which are obtained via instance variables on the controller, which are always implicitly available to the view. Mix in things like shared partials, locals and layouts, and Rails code quickly becomes a maintainability nightmare.