News for hackers. Stuff that matters.
Re:New Languages Considered Harmful: "Learning new languages... by jjburka on Friday April 04, 2008 @01:06PM (#154994)
how so? I'm rather new to rails and from my understanding of rails and mvc it seems to follow that pattern. Good Practice wise atleast
Re:New Languages Considered Harmful: "Learning new languages... by jrockway on Saturday April 05, 2008 @04:02AM (#155562)
In real MVC, you want to put everything related to your business rules, storage access, etc. in your model. Then you wrap the View and Controller around that as a very thin web <-> model glue. That's all a web framework should do, web-enable your model classes. Things that should not happen in the Controller include touching the ORM (or SQL queries), validating input, any business logic, etc. Just pass the request to the right model, see if the model did what you asked, and display the success page or the error page.

Here's a short talk I wrote on the subject:

http://www.jrock.us/fp2008/catalyst/start.html