ADF Architecture

The high-level multi-tier architecture of the Agile Development Framework (ADF) is as follows:

Besides following a strict multi-tier architecture, the ADF framework also implements the well known MVC design pattern (Model-View-Controller). As the ADF framework is use-case centric, there is one controller per use-case. The Model is implemented as an Entity Framework model. Many MVC frameworks can only handle one type of viewer, for example pages. But the original idea of the MVC pattern was to keep Model en Controllers independent of the type of Viewers used. This principal is an important foundation of the ADF framework. For the moment the ADF Framework only supports an GUI. But care will be taken to keep the type of GUI open ended. In the future WinForms , WPF and Silverlight GUI's might be added.

Graphical User Interface layer (GUI)

The ADF framework architecture makes the type of GUI interchangeable without modifying anything in the AL and BL layers. It will also possible to expose the application functionality via multiple types of GUI.

There is a high level of isolation between the GUI and the lower tiers. For example the GUI does not use the business objects. All information between GUI and AL is transported in the form of DataViewer objects. These DataCarrier objects contain values and metadata of isolated business object properties without knowing anything about the business objects themselves. The rich metadata includes security information, label text, maximum length, preferred type of UI control, basic validation information (for example IsMandatory, data type), etc.

The metadata contained in the  DataCarrier objects permits an extremely efficient implementation of the GUI. No custom code is necessary in the GUI for validation, security or activation/deactiviation of UI controls. A main principle of ADF is that all metadata is stored in one single place. All other parts of the application know how to use this central metadata. This eliminates most of the traditional UI code. UI implementation becomes very efficient, maintainable and flexible. Development of multiple types of GUI's for one single application becomes feasible because of the extremely lean characteristics of the GUI. Of course this lean type of GUI uses specialized UI controls and base classes to handle the DataCarrier objects.

Application Logic layer (AL)

The ADF application framework is strictly use-case centric. Each active use-case is controlled by a use-case controller object. These usecase controllers constitute the Application Logic.  The use-case controllers can manipulate any kind of data. For real life data-base driven applications, we use Entity Framework business objects. 

Each use-case controller maintains it's own state. The GUI windows can always be completely reconstructed from scratch from the data contained by the use-case controller. This is an important detail not only for web applications. It makes it possible to suspend a use-case and reopen it at any moment in the future. Web applications profit from this characteristic by easily recomposing the whole window based on the DataCarrier objects returned by the use-case controller. This happens each callback to the server. Thus viewstate is not needed. This guarentees efficient communication between webserver and webclient.

Business Logic layer (BL)

The business logic layer is based on an Entity Framework model of the business objects. Since Entity Framework 2 (.NET 4.0) the standard T4 code generator in Visual Studio is used. This made it possible to easily enrich the basic C# implementation of each business object. Business objects are very easily queried with LINQ for Entities. The database structure is transparent for the developer. The EF object model does not have to be a strict mirror of the database model. Inheritance hierarchies are possible. In the case of an existing database, an initial object model can be generated by a Visual Studio wizard. This initial object model can then be altered with a graphical design tool in Visual Studio. For new databases we can start with an Entity Framework model and have the database generated automatically from the model.

An important aspect of the ADF framework is that it uses a centralized metadata store. The core information in this metadata store comes from the Entity Framework model, but it can be enriched using a special ADF tool.  All layers of the application use this metadata appropriately. This saves much redundant and error prone code.