Where does form processing logic belong in a MVC web application?

Posted by AdamTheHutt on Stack Overflow See other posts from Stack Overflow or by AdamTheHutt
Published on 2008-12-05T19:46:09Z Indexed on 2010/03/26 18:23 UTC
Read the original article Hit count: 334

Filed under:
|
|

In a web-based application that uses the Model-View-Controller design pattern, the logic relating to processing form submissions seems to belong somewhere in between the Model layer and the Controller layer. This is especially true in the case of a complex form (i.e. where form processing goes well beyond simple CRUD operations).

What's the best way to conceptualize this? Are forms simply a kind of glue between models and controllers? Or does form logic belong squarely in the M or C camp?

EDIT: I understand the basic flow of information in an MVC application (see chills42's answer for a summary). My question is where the form processing logic belongs - in the controller, in the model, or somewhere else?

© Stack Overflow or respective owner

Related posts about mvc

Related posts about forms