Chapter 6: Object-Oriented Application Design

Overview

In Chapters 1 and 2, we discussed the concepts behind distributed, object-oriented systems, and the .NET technologies that make them practical to implement with reasonable effort. Then, in Chapters 3 through 5, we designed and implemented CSLA .NET, a framework upon which we can build distributed, object-oriented applications, thereby avoiding the complexities of the underlying technologies as we create each business class or user interface.

In Chapters 6 and 7, we'll design and implement a set of sample business objects on which we can base an application to track projects and resources assigned to projects. In Chapter 8, we'll implement a Windows Forms UI, and in Chapter 9 we'll implement a Web Forms UI based on these objects. In Chapter 10, we'll implement some web services to provide an application interface to the business objects so that they can be used by other applications through the standard SOAP protocol.

This chapter will focus on the object-oriented application design process, using a sample scenario and application that we'll implement through the rest of the book. Our design process in this chapter will result in a design for our business objects, and for an underlying database.

Obviously, the challenge we face in designing and building a sample application in a book like this is that the application must be small enough to fit into the space available, and yet be complex enough to illustrate the key features we need to cover. To start with, let's list the key features that I want to focus on:

  • Creation of a business object

  • Implementation of business rules

  • Transactional and nontransactional data access

  • Parent-child relationships between objects

  • Many-to-many relationships between objects

  • Use of name -value lists

  • Use of CSLA .NET security

In this chapter, we'll focus on the design of the application by using some example user scenarios, which are generally referred to as use cases . Based on those use cases, we'll develop a list of potential business objects and relationships. By refining this information, we'll develop a class design for the application. Also based on the scenarios, we'll design a relational database to store the data.

As we saw in Chapter 2, object-oriented design and relational design aren't the same process, and we'll see in this case how they result in two different models. To resolve these models, our objects will include object-relational mapping (ORM) when we implement them in Chapter 7. This ORM code will reside in the DataPortal_xyz() methods of our business objects, and will translate the data between the relational and object-oriented models as each object is retrieved or updated.



Expert C# Business Objects
Expert C# 2008 Business Objects
ISBN: 1430210192
EAN: 2147483647
Year: 2006
Pages: 111

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net