Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is 'the pattern' for making ASP.Net Web Forms?

I know there are lots of design patterns (facade, singleton, decorator, etc...) but I'm reading about ASP.NET MVC and I'm about two sentences into the 'Intro' and I'm already confused.

The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications.

I don't understand what that means. I'm assuming ASP.NET MVC is going to force or encourage a Model-View-Controller pattern, but what pattern is ASP.NET?

like image 354
Rob P. Avatar asked May 12 '11 22:05

Rob P.


People also ask

What is ASP.NET Web Forms model?

ASP.NET Web Forms is a web application framework and one of several programming models supported by the Microsoft ASP.NET technology. Web Forms applications can be written in any programming language which supports the Common Language Runtime, such as C# or Visual Basic.

How do ASP.NET Web Forms work?

In an ASP.NET Web Forms application, you use data-bound controls to automate the presentation or input of data in web page UI elements such as tables and text boxes and drop-down lists. Membership- ASP.NET Identity stores your users' credentials in a database created by the application.


2 Answers

Asp.Net is Page-Controller pattern. The request is handled by various events in the code behind of the Page.

Asp.Net Mvc uses Model-View-Controller pattern in which request is handled by the Controller which interacts with Model and then Renders a View.

Update: More info about Page Controller.

http://martinfowler.com/eaaCatalog/pageController.html

like image 51
Amitabh Avatar answered Sep 26 '22 00:09

Amitabh


Good day,

Link: http://haacked.com/archive/2008/06/16/everything-you-wanted-to-know-about-mvc-and-mvp-but.aspx

Classic ASP.NET uses the MVP pattern btw :)

It should answer your question!

like image 31
Schalk Avatar answered Sep 26 '22 00:09

Schalk