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

user is logged in, authorized to view the thing they requested, check if I need to redirect for SEO purposes, prevent request forgery, redirecs if a form validation

And you can't do those things based on your framework in either, a general config of the app or a simple declarative manner, that fits into a simple function that decides which view to render, based on data?

Also shouldn't form validation be a mapping of data to your "domain objects" and let them decide if they're valid?



I think we're getting into semantics. I don't see the difference between "doing it in your framework" and "doing it in your controller" considering that my controller is part of my framework. I do a lot of rails and my controllers are mostly thin declarative setup of filters and such.

regarding validations, my models do decide if a from submission is valid, but the controller then decides what to do if the submission is invalid. I.e. serenader the form with some error messages. This is a good example of something that makes more sense to me in a controller.




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

Search: