O'Reilly logo

Professional ASP.NET Design Patterns by Scott Millett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. The Presentation Layer

WHAT'S IN THIS CHAPTER?

  • Tying your loosely coupled code with StructureMap and Inversion of Control container

  • Letting the view be in charge with the Model-View-Presenter pattern and ASP.NET web forms

  • FrontController - Command pattern and Chain of Responsibility pattern

  • Model-View-Controller pattern with ASP.NET MVC and Castle Monorail

  • PageController pattern with ASP.NET web forms

  • The ViewModel pattern and how to automate domain entities to ViewModel mapping with AutoMapper

This chapter deals with the needs of the presentation of an ASP.NET enterprise application and discusses a number of patterns at your disposal to organize your presentation code. The chapter starts with a discussion of how you can tie together your loosely coupled code so that a concrete implementation can be consumed from the presentation layer via the use of an Inversion of Control (IoC) container. The chapter then moves onto the patterns that promote separation of concerns, including the Model-View-Presenter pattern, the Front Controller pattern, the Model-View-Controller pattern, and the Page Controller pattern. Various frameworks and open source products are discussed to assist you in the organization of your presentation concerns, and a number of coding exercises are presented to help you understand the patterns concepts.

INVERSION OF CONTROL

Throughout this book, you have read about the benefits and principles behind loosely coupling your code. In Chapter 3, you were introduced to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required