An Overview of the Simplified Application Framework - SAF Foundation Components
(Page 2 of 7 )
The rest of this chapter will be a quick rundown of each of the SAF components.
The ClassFactory Service As developers are developing applications using the business class they have created, we want to reduce the need for them to specify the concrete business class as much as possible. The SAF.ClassFactory service allows developers to obtain a concrete object without specifying the concrete business class in their code during the development of their applications, thereby reducing and possibly eliminating the code changes associated with changes in the underlying business object. Because ClassFactory extracts the creation of business objects from the programs that use these business objects, we can now also add special object instantiation logic into the class factory service, hence alter the behavior of the object without significant code changes and extra attention from developers.
Two of the major .NET technologies used in SAF.ClassFactory to achieve such goals are .NET reflection and .NET remoting. The abstract factory and singleton patterns are used as the blueprint for this framework component. We will cover its design and implementation in Chapter 4.
The Caching Service SAF.Cache provides the object-caching ability for the framework. During application development, developers will often want to boost the application’s performance by eliminating excessive object creation within the application. They often need to store existing business objects and retrieve them later to access their properties and methods. The need for object caching is universal across all types of business applications. Creating an easy-to-use object caching mechanism will eliminate the effort for developers to “roll their own” object-caching techniques. By creating a caching service as part of a framework component, we are able not only to reduce the developers’ workload, but also to standardize the way object caching is performed throughout the application.
SAF.Cache provides an object-caching service for the framework. It has two major features: First, it has an XML flavor to it that gives the cached objects a hierarchical structure. This feature allows developers to manage the cached object more easily. Second, it has a built-in hook that allows developers to change its caching behavior and an algorithm to fit specific business requirements without changing the framework code.
Some of the major .NET technologies used in SAF.Cache are XML and XPath supports in the .NET framework. We will look at how SAF.Cache is implemented using these technologies as well as the strategy design pattern in Chapter 5.
This chapter is from Developing Application Frameworks in .NET by Xin Chen (Apress, 2004, ISBN: 1590592883). Check it out at your favorite bookstore today. Buy this book now.
|
Next: The Configuration Service >>
More .NET Articles
More By Apress Publishing