Chapter 4. Planning an Architecture

This chapter lays the groundwork for the rest of the book by creating a number of basic services that will be shared among all future modules: configuration classes to process custom sections and elements in web.config, base business and data access classes, caching strategies, and more. It also introduces some of the new features afforded to us by using ASP.NET MVC, and some of the language extensions in the .NET 3.5 Framework.

Problem

Your website is made up of a number of separate modules for managing dynamic content such as articles, forums, and polls, and sending out newsletters. However, all your modules have a number of common "design problems" that you must solve:

  • Separate the data access code from the business logic code and the presentation code (user interface) so that the site is much more maintainable and scalable. This is called a multi-tier design.

  • Isolate the data access architecture so that it can allow the support of different underlying data stores — without requiring changes to the business object layer within the underlying data store. Similarly, changes to the business object or presentation layers should also be possible without changing another tier. This is called decoupling the tiers.

  • Design the business object architecture to expose the data retrieved by the data access layer in an object-oriented format. This is the process of mapping relational data to OOP classes.

  • Support caching of business objects to save the data you've ...

Get ASP.NET MVC 1.0 Website Programming: Problem – Design – Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.