Chapter 3. Layering Your Application and Separating Your Concerns


  • The benefits of a layered design over the traditional ASP.NET web forms code-behind model

  • The concepts of logic layering and the separation of your applications concerns

  • The responsibilities of each distinct layer in an enterprise level ASP.NET application

  • Example code refactoring from the Smart UI antipattern to a layered approach

This chapter discusses the concept of logical separation in an ASP.NET application. It covers the Smart UI antipattern and its shortcomings when used in enterprise-level ASP.NET applications. It then introduces the benefits of a layered approach to building an ASP.NET application over the code-behind model and what it means to truly separate your concerns. Following that, it looks at the role of each layer and identifies the responsibilities of each of them; the layers which form the content for the remaining chapters of this book.


You cannot build a maintainable and scalable application on poor foundations. Planning a good architecture is critical to the success of an application. Before examining a structured approach to designing your application, you must learn why you need to think about the logical structure of your application and the problems you will encounter if you do not start with a good architectural footing.

Antipattern — Smart UI

ASP.NET web forms and Visual Studio make it incredibly easy to create applications simply by ...

Get Professional ASP.NET Design Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.