Reputation: 181
I writing an report on the three layered design architecture focusing on
a ASP.NET Web application. Currently i am having a simple visual studio web forms project, and I am wondering of which pattern a simple WebForm (ASPX
, ASPX.CS
, ASPX.DESIGNER.CS
) presentation is using, like ASP.NET MVC uses the MVC pattern?
Also, in a three layered architecture, where is the user control components (ASPX.CS
) placed? lower presentation layer or upper BLL layer?
Upvotes: 1
Views: 2145
Reputation: 2283
ASP.NET Web Forms is the reason MVC was designed. Particularly because Web Forms doesn't follow any strict guidelines on design, and a lot of the times there was abuse and bad design. I have witnessed some first hand, and written a few early in my career.
You can still use a similar architecture in your Web Forms project. You can create a separate Domain Objects Layer, separate business logic, separate data access, and separate UI. You want to limit your ASPX CS code to business logic and domain objects. You want to have business logic and data access interact. You can also just create a MVC application.
This is a really good book to read on this subject: Professional ASP.NET Design Patterns http://www.amazon.com/Professional-ASP-NET-Design-Patterns-Millett-ebook/dp/B0045JL68W/ref=pd_sim_kstore_2
Upvotes: 1
Reputation: 32694
Web Forms can follow the MVC pattern, it all depends on how you implement your design. Web Forms gives you the freedom to do what you want, but with great power comes great responsibility and you see a lot of poor Web Forms designs because of that.
ASP.NET MVC pretty much forces you to follow the MVC pattern to get anything done. You have to try hard to not follow the MVC pattern.
Upvotes: 2