Created On:
Aaron Robson
Tags:, web forms, ms mvc

Stream of thought

Thoughts stemming from the new MS MVC framework, and its differences to web forms.

Initial consideration of web forms.

Postback model:
enables packaging reusable view controls.
view hierarchies and interception possible.
Viewstate good as a general hidden field mechanism, bad as a crutch to the postback model.

Can be used for generation of output html and retrieval of posted form data. Request interogation and Response generation. Negative side of this is that these two facets rarely have symmetrical control needs.
In order to use as facade over posted form data, view control must have been created.
If a presenter / controller is to use this data, the view must therefore be created at some point prior to the core presenter action running.

Alternative is use of views only as response generation, and direct access to form data for request interogation.

Postback -> action -> Redirect.... never problematic
Postback -> action -> Respond with same view.... potential problems when followed by another postback. [dynamic control creation (explicit or via databinding)]