Professional Documents
Culture Documents
Model View Control: Jesper Tørresø Itnet2 F08
Model View Control: Jesper Tørresø Itnet2 F08
Model View Control: Jesper Tørresø Itnet2 F08
NET and
Model View Control
Jesper Tørresø
ITNET2
F08
Turns around the usual way
• A MVC Controller takes control over from the standard
ASP.NET Framework View Engine.
• From Scott Guthrie
– ”The MVC framework supports using the existing
ASP.NET .ASPX, .ASCX, and .Master markup files as "view
templates" (meaning you can easily use existing ASP.NET
features like nested master pages, <%= %> snippets,
declarative server controls, templates, data-binding,
localization, etc). It does not, however, use the existing
post-back model for interactions back to the server.
Instead, you'll route all end-user interactions to a Controller
class instead - which helps ensure clean separation of
concerns and testability (it also means no viewstate
or page lifecycle with MVC based views). ”
But what about the existing
ASP.NET framework?
• May we ”only” use HTML control and not
server controls and/oe user controls?
• All HTML from controls may be used
• We can use the already known APS.NET
server controls and also a special MVC
User Control. (!!!!)
• But we must take care of routing etc by
our self.
Model View Control
JSP Model 1 architecture (from 1998-1999)