O'Reilly logo

ASP.NET 3.5 Website Programming: Problem-Design-Solution by Chris Love

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 3. 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 classes and the Entity Framework model, caching strategies, and more. I'll show you the ListView control introduced in ASP.NET 3.5, and we'll build an n-tier architecture to manage interacting with the database.

Problem

Our website is made up of a number of separate modules for managing dynamic content such as articles, forums, photo galleries, events, and polls, and sending out newsletters. However, all the modules have a number of common "design" tasks that you must deal with:

  • Create a sound Entity Framework model that will manage the data access.

  • Create a base for a business logic layer to manage interaction with the Entity Framework and to validate data.

  • Expand and customize the business object architecture generated by the Entity Framework Wizard to expose the data retrieved by the data access layer in an object-oriented format. This will leverage the use of partial classes introduced in .NET 2.0.

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

  • Support the caching of business objects to save the data you've already fetched from the data store so that you don't have to make unnecessary fetches 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