Tuesday, January 18, 2011

SOA Application Blueprint

Here is a simple blueprint for building an application based on the Service Oriented Architecture (SOA).

The various participants in this architecture are as follows:



Application Domain Layer (ADL)
ADL is where the business logic or the brains of the application resides. ADL is the most valuable piece of this architecture. ADL should closely model the business entities, processes, and workflows without regard to data persistence or the user interface. ADL should be testable in isolation. Full suite of unit, functional and regression tests must be maintained and continuously executed. To isolate ADL from the Data Persistence Layer (DPL), a Data Persistence Adapter (DPA) is introduced.

Data Persistence Adapter (DPA)
DPA implements a well-defined interface that ADL uses to persist itself. A concrete implementation of DPA makes specific calls to the Data Persistence Layer (DPL) to do the actual saving and loading the of the data. A concrete, mock DPA should be written that emulates known data save and load behaviors. The mock DPA can be utilized by the ADL Test Suite to exercise the functionality of ADL on an ongoing basis.

Data Persistence Layer (DPL)
In most system implementations, this is the relational database management system such as Oracle, Microsoft SQL or equivalent. ADL never talks to DPL directly. Only Data Persistence Adapter (DPA) has direct interaction with Data Persistence Layer (DPL) usually through ODBC, JDBC, or a .NET Data Provider.

Application Service Layer (ASL)
ASL is the immutable interface to the System. The existing service methods and data contracts of ASL are never changed once published. However, new service interfaces, methods and data contracts can be added to extend the functionality of the application. The primary consideration in the design of this layer is the ease and efficiency of consumption of ASL Services by its clients such as the Application Presentation Layer (APL) and the Batch and External Systems (BES).

Application Presentation Layer (APL)
APL is the user interface of the application. It usually takes form of a Web Site or a Desktop Application. APL never calls ADL, DPA, or DPL directly. It does all data querying and manipulation through the Application Service Layer (ASL).

Batch and External Systems (BES)
An application may require offline, asynchronous, or batch processing. Furthermore, external systems may need to access the System to query or update data. Like APL, BES never calls ADL, DPA, or DPL directly. It does all data querying and manipulation through the Application Service Layer (ASL).