Intelligent Business Object Implementation
Introduction
When we think about building an application, we usually targets flexibility and scalability and easy to maintained code. That is what I thought about when developing this model!
Three-Tier application should give us this opportunity, ths issue is how to make this three-tier!. Design patterns, Object Oriented are powerful keys for this solution.
Model Descripton
The idea of this model is to build an object that is fully aware of its state. I mean by state here is that enable the object to determine if it is going to Add, update or delete itself from the database independently. The presentation tier developer is no longer needs to care about this issue. He/She only needs to call Apply()method of this object and let it determine what to do.
The business object does not -of course- directly access a database. It uses proxy classes that wrapper DB tables and provide methods such as -addEmployee, modifyEmployee & deleteEmployee-. Moreover, it does not access this class directly it uses a factory class that determien database type e.g. MySQL, MS SQL or Oracle and instantiates the appropriate proxy class that contains the right SQL statements for the target database and returns it to business object. All proxy classes inherit from an abstract proxy class that define the functionality of these classes and each child class implement the proper SQL statements for its own database.
Much more details about this model can be found at Design Architecture Document
