Chapter 4: Business Framework Implementation

Overview

In Chapter 1, we discussed the concepts behind the use of business objects and distributed objects. In Chapter 2, we explored the design of our business framework. In the last chapter, we walked through the key .NET Framework technologies that we need to implement distributed object-oriented systems. In this chapter, we're going to combine everything we've learned so far as we create many of the classes in the CSLA .NET framework, using .NET technologies to support the creation of distributed, object- oriented business applications. Specifically , we'll create the following components :

  • CSLA.Core.BindableBase.dll

  • CSLA.dll (or at least, the greater part of it)

Why these two components? Well, as we've already seen, a number of the classes in our framework are dependent on other framework classes. For instance, BusinessBase is dependent on Core.BindableBase . At a component level, we defined these dependencies in Chapter 2 with the diagram shown in Figure 4-1.

image from book
Figure 4-1: CSLA .NET component diagram

The classes that comprise our framework are contained within these components. Before we can create BusinessBase and BusinessCollectionBase , we must create their base classes in CSLA.Core.BindableBase.dll . We can then move on to create most of the classes within CSLA.dll , except those that are data- related , so we'll defer the creation of the data portal mechanism and any classes that require it to Chapter 5. Also, there are a handful of framework classes (including those for custom security) that require the data portal code to exist, so we'll create those in Chapter 5 as well.

Tip 

In Chapter 7, we'll create a set of objects using the framework, based on the application and data design that we'll put together in Chapter 6.

More specifically, the classes that we'll create in this chapter are

  • Core.BindableBase

  • Core.BindableCollectionBase

  • NotUndoableAttribute

  • Core.UndoableBase

  • BusinessBase

  • BrokenRules

  • RulesCollection

  • Rule

  • BusinessCollectionBase

  • ReadOnlyBase

  • ReadOnlyCollectionBase

  • SmartDate

The reasoning behind the existence of each of these classes, and the explanation of how they're organized into namespaces and assemblies, was covered in Chapter 2. In this chapter, we'll focus mostly on the actual implementation of each assembly and class.



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