Object Oriented Coding and the Premirus Enterprise Data Access Components
A common strategy of object oriented system design is abstraction, defined as the implementation of a concept or idea without direct association to any specific instance or underlying technical implementation of the concept. This strategy is a major underpinning of the design of the Premirus Enterprise Data Access Components, which were designed to provide an implementation of data access for web server-based applications that keeps the details of the actual source and/or destination of the data out of the application code. Application code that utilizes the components is completely database platform independent, and is written exactly the same way regardless of the brand of data provider platform implemented. Oracle, Microsoft SQL Server, DB2, and even OLE-DB and ODBC data sources appear and respond identically.
Because of the level of abstraction provided, developers can shift data platforms during and after development, without modification of application code. Instead, simple configuration entries are made to notify the data access component that the source and/or destination of data have changed. No database names, connection strings, procedure names, or other implementation-specific information is placed in application code, so it never needs to be changed.
A second major tenet of object oriented methodology is encapsulation, or the implementation of a component or specific subset of information or activities within a single, reusable, and fully documented component module. An object designed in this method provides services as if it is a “black box,” encapsulating functionality in such a way that developers of consuming applications can focus on the output and/or inputs to the component without considering how the component does its work.
Proper use of encapsulation allows the implementation of a service provided by a component to change, but as long as the interface to that service does not change, applications that use the object can continue to do so without modification. A second advantage of encapsulation in this context is standardization- if a service is provided by an object, and other applications all use that same object, they are all written in the same way and long term code maintenance is greatly simplified.
Configuration Driven Application Design
Microsoft has provided a robust and extensible architecture for applications created in the .net environment. Configuration in .net applications is placed in configuration files that are processed at the machine and application levels. These configuration files are XML files that can be changed as needed. Application Developers and database administrators can use configuration files to change settings without recompiling applications. System and Network Administrators can use configuration files to set policies that affect how applications run on their computers.
Since these configuration files are created in standard XML, they provide a simple and elegant approach to application configuration. To configure an application to use the Premirus Data Access Components, the developer places a section in the xml configuration file that defines the data sources that are available, the data platforms upon which those data sources are implemented, and a list of the procedures and/or SQL statements and parameters that may be executed against the data source.