1

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?

1
  • I think you are over complicating things and trying to mishmash other designs together. your UI layer will contain user controls (ascx including its related flies), css, js, aspx pages, master pages, html pages etc... each ASPX file will have its related files all together (designer and codebehind) which all sit in the same layer. then you have your BLL - your business logic which should not know anything about the UI but may know a little on how to access the DAL (Data layer). the DAL has no knowledge of UI or BLL but returns a standard set of contractual data objects Commented Feb 5, 2014 at 21:15

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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

1 Comment

yeah, it's the best book I've ever read on design patterns. @OhLongJohnJohnson try to read the MVP pattern in this book to find out ur answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.