Click here to Skip to main content
Click here to Skip to main content

The Application Automation Layer: Introduction And Design

, 25 Dec 2002
Rate this:
Please Sign up or sign in to vote.
This introduction lays the foundation for a framework that promotes a consistent design and coding style for large-scale, multi-developer projects and results in applications that are responsive to requirement changes, easily updated and easily debugged.

The Application Automation Layer: Introduction And Design

This introduction lays the foundation for the concepts behind the Application Automation Layer (AAL). Because this article is long enough just discussing concepts, there is no example code here--a considerable amount of code already exists in other articles that I've written. I am currently setting up a SourceForge site for public access. Future articles will discuss the AAL implementation itself and use a demonstration project (photo album organizer) to illustrate its use.

What Is Wrong With Object Oriented Development?

Objects are often interconnected. It makes for a pretty object model diagram, but class re-use is all but impossible because of the interdependencies between objects. This results in slow builds, cascading side effects when code is changed, and complex testing.

In many designs, objects insufficiently abstract the concepts that they are trying to represent. This introduces “rigidity” into an application. The less abstract an object is, the more difficult it becomes to change its behavior. Applications become inflexible to requirement changes and new technologies, and become unresponsive to market changes.

Why Do We Need An Application Automation Layer?

  1. Design, development and testing of large scale applications is too expensive;
  2. The longer a development effort takes, the more likely the requirements will have changed, either as a result of customer requirement changes, technology changes, or competition;
  3. Design and implementation methodologies vary greatly across a multi-team project, resulting in code sharing and maintenance problems. A framework that promotes a consistent design and implementation philosophy reduces this difficulty;

Does The AAL Benefit Small-Scale Application Development?

  1. Many small-scale, single developer applications embrace multiple technologies. The AAL reduces the time it takes to hook these technologies together and to add a new technology that interfaces with existing ones.
  2. By starting with a framework that promotes re-use, an application that appears to be small-scale can migrate to a large-scale effort without redesigning and rewriting code;
  3. Rapid prototyping.

What Are The Advantages Of The Application Automation Layer?

  1. Build projects with debugged and tested components;
  2. Built in instrumentation allows tracing of all events;
  3. Component-based development;

Has This Concept Been Implemented And Tested In The Real World?

Yes. A brief description of three projects (of many) that currently use the AAL as implemented in C++/MFC:

  1. Automation Of Satellite Design: A large-scale, multiple developer, three year project to automate the design of communication relay satellites.
  2. Boat Yard Workflow Management: A medium-scale, single developer, multi-year project to manage the workflow of boat yard operations—work orders, job tracking, inventory, payroll and customer billing. The AAL framework allows the support of custom data representation and workflow processes for different boat yards, while retaining the same code base.
  3. Club Management: A medium-scale, single developer, multi-year project managing the income of adult entertainment clubs and entertainers. This system utilizes complex scheduling, threading and inter-process communication.

What Does The Application Automation Layer Do?

Primarily, the AAL consists of several technologies:

  1. A Data Hub
  2. A Process Manager
  3. A Component Manager
  4. Instrumentation Package

Additional features of the AAL are considered “technology components” and are not discussed in this article. These include:

  1. GUI Controls
  2. Database Interface
  3. State Manager
  4. Additional technology component interfaces

Data Hub

The data hub provides a common data exchange mechanism between technologies that have different data representation schemes. The classical approach is illustrated in this figure:

Here, the application has an application-to-technology specific interface for data. Using the AAL, the data exchange occurs as follows:

For example, a typical application is responsible for reading a record set in to a database and reformatting it for a particular GUI control. If instead the AAL concept is used, the application instructs the database technology to load the record set. This record set is translated, by the database technology, into a common data representation. The application then instructs the GUI control to display this information. The GUI control extracts the common data representation and formats it to the particular requirements of the control.

Furthermore, the concept of loading a record set has been sufficiently abstracted by the database technology that it can handle a generic record set specified by a SQL statement, for example. Many applications seem to embed record specific functionality. This makes the application inflexible to requirement changes. The point here is that while the programmer can still do it “the wrong way”, there is now a technology that promotes (if not enforces) a better approach.

The concept of a common data representation is also used by the C#, Visual Basic and other compilers—all code is compiled into a common code language.

Process Manager

The process manager decouples unrelated objects by using a meta-interface. This reduces build time dependencies and problems related to changes in object designs, as described above. The process manager is implemented as a script engine that directs the acquisition, exchange, manipulation and deposition of data.

Processes are typically initiated by events, and of those, typically GUI events such as clicking on a button or selecting a list. Therefore, to take full advantage of the process manager, the Forms plug-in technology interfaces with the process manager in response to GUI initiated events. And as illustrated in the above diagram, the Forms plug-in interfaces with the Data Hub. These two concepts create a powerful combination that decouples GUI driven processes from the specific GUI. This is one of the fundamental steps in designing a program to be more flexible to requirement changes. I’ve seen too many applications where the “processing” is part of the “OnClick” handler of a button!

For example, consider the typical process flow that an application takes to load a GUI control with a record set, as illustrated in this diagram:

Versus the process flow an application would take with the AAL:

Notice that in this diagram, the “application” (in the literal sense, any C# specific code) is not used. The process manager is based on the event manager described in my article An instrumented synchronous/asynchronous event manager [^].

Component Manager

The component manager promotes component-based development. The application itself is considered another technology which is merely another plug-in to the framework. The component manager is responsible for loading and unloading of technology components and the registration of the component’s public interface.

Instrumentation

A fallout of this scheme is that an application is automatically instrumented—data exchanges, event invocation, object to object messaging all include instrumentation, so that it is very easy to trace an application. The AAL includes an instrumentation package (see my article on C# Debug And Trace Classes [^]).

What About Agile Programming and eXtreme Programming?

The AAL is an implementation of a framework that supports these project development styles. AP and XP are excellent ideals that can only be achieved by implementing a framework such as the AAL. The AAL has been proven to be effective in its goals, even before the concepts of AP and XP existed.

Conclusion

In the next couple of articles, I will present the implementation for the four components I discussed above. I hope no one gets upset that there isn’t any code in this article. I intended this article to present the foundational design concepts without getting mired in specific implementation issues. As a side note, I am also planning to integrate the concepts that I presented in my Organic Programming article [^] with the concepts in the AAL.

As I mentioned before, I am currently in the process of setting up a SourceForge site to support this effort. However, if you want a sneak peak at some prototype code, see my recent article on Fractal Trees [^].

Given this overview, I am interested in feedback from the programming community. And anyone who is interested in working on this project, please let me know!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Marc Clifton

United States United States
Marc is the creator of two open source projets, MyXaml, a declarative (XML) instantiation engine and the Advanced Unit Testing framework, and Interacx, a commercial n-tier RAD application suite.  Visit his website, www.marcclifton.com, where you will find many of his articles and his blog.
 
Marc lives in Philmont, NY.

Comments and Discussions

 
GeneralCool! ... Some Thoughts Pinmembergniemcew11-Sep-04 6:50 
GeneralRe: Cool! ... Some Thoughts PinprotectorMarc Clifton11-Sep-04 7:27 
gniemcew wrote:
Under what circumstances, generally speaking, should some "workflow-less" data, actually persist inside of the Data Hub?
 
Configuration information might be one example. Data that a workflow needs to look at--information regarding establishing a connection to a database, timeout values, etc.
 
Also, I usually represent GUI data in a separate data store that's GUI presentation independent. A tree list is a great example, because I usually represent a tree's data in a flat representation rather than the native parent-child relationship, since it's the flat representation that is easier to persist to the database.
 
So, I have a flat representation that is manipulated by other GUI event--insert a leaf, move a child, delete a leaf, etc. There's a translator that figures out how to convert the flat representation to the tree view. But the flat representation is persisting in the data hub after the various workflows complete.
 
gniemcew wrote:
wouldn't it be advantageous (component-model -wise) to define the Data Hub as a "passive" accumulation/aggregation/etc. Component that is driven by the Workflow Manager exclusively?
 
I'm not sure. Smile | :)
 
gniemcew wrote:
do you think it would be advantageous (component-model -wise) to eliminate Technologies' capability to communicate with a Data Hub directly,
 
Hmmm. I think this is a viable alternative, but I'd be reluctant to implement it because I think it muddles the waters between data management and workflow management. I'm not sure the additional layer is of any advantage. Keep in mind that the data hub is supposed to be a repository for publically known data formats, and disconnected from workflows. I'm not sure if that addresses your question though.
 
gniemcew wrote:
It seems to me that it might be simpler to work out some kind of a Workflow Interpreter, and specialize it into two independent Components in the framework: an Event Manager and a Workflow Manager.
 
You are absolutely correct. In fact, I typically extend the implementation to also include a message manager and state manager. The workflow manager should be strictly a, as you said, "'workflow mediation and execution definition language' interpreter".
 
I never did continue after the last installment of these articles as I ended up reworking the whole concept into what became MyXaml (see sig).
 
You might be interested in looking at the documentation page[^] and especially the MVC Pattern[^] how workflows[^] and state machines[^] are defined in XML, and finally, this article on a declarative approach to an application framework.[^]
 
Thanks for the great questions!
 
Marc

 
MyXaml
Advanced Unit Testing

GeneralRe: Cool! ... Some Thoughts Pinmembergniemcew19-Sep-04 5:40 
GeneralWorkflow Manager PinmemberDavid J Tasker29-Aug-03 6:19 
GeneralRe: Workflow Manager PineditorMarc Clifton29-Aug-03 8:00 
GeneralWorkflow Manager PinmemberDavid J Tasker29-Aug-03 6:17 
GeneralSoftware Development on a Leash PinmemberMtnBiknGuy8-Jun-03 6:49 
GeneralRe: Software Development on a Leash PinsubeditorMarc Clifton8-Jun-03 11:06 
GeneralRe: Software Development on a Leash PinmemberMtnBiknGuy8-Jun-03 13:18 
GeneralRe: Software Development on a Leash PinsubeditorMarc Clifton8-Jun-03 13:35 
GeneralRe: Software Development on a Leash PinmemberMtnBiknGuy9-Jun-03 7:16 
GeneralRe: Software Development on a Leash PinsussJack Maher22-Oct-03 6:11 
GeneralRe: Software Development on a Leash PinmemberMtnBiknGuy23-Oct-03 8:25 
GeneralSome comments PinmemberDavidIzadaR30-Apr-03 10:11 
GeneralA newbie OOPS programmers moment of weakness ... PinsussAnonymous25-Mar-03 19:53 
GeneralRe: A newbie OOPS programmers moment of weakness ... Pinmemberpeterchen1-Apr-03 11:16 
GeneralMore please PinmemberMichael P Butler31-Dec-02 10:05 
GeneralRe: More please PinmemberMarc Clifton31-Dec-02 12:35 
GeneralObject Oriented Programming PinmemberRon Marshall31-Dec-02 9:39 
GeneralRe: Object Oriented Programming PinmemberMarc Clifton31-Dec-02 11:08 
GeneralRe: Object Oriented Programming PinmemberRon Marshall2-Jan-03 4:57 
GeneralRe: Object Oriented Programming PinmemberMarc Clifton2-Jan-03 5:33 
GeneralRe: Object Oriented Programming PinmemberMarc Clifton2-Jan-03 7:08 
GeneralRe: Object Oriented Programming PinmemberRon Marshall2-Jan-03 10:47 
GeneralRe: Object Oriented Programming PinmemberMarc Clifton3-Jan-03 1:47 
GeneralRe: Object Oriented Programming PinmemberRon Marshall3-Jan-03 3:47 
GeneralRe: Object Oriented Programming Pinmemberjondghfsdghsdjh jksdhj7-Jan-03 14:10 
GeneralRe: Object Oriented Programming PinmemberMarc Clifton7-Jan-03 15:38 
GeneralRe: Object Oriented Programming Pinmemberjp jhgfsdjgsdjgsdjfsd7-Jan-03 18:17 
GeneralWaaay too short!!! PinmemberTaka Muraoka26-Dec-02 12:44 
GeneralRe: Waaay too short!!! Pinmember.S.Rod.27-Dec-02 1:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 26 Dec 2002
Article Copyright 2002 by Marc Clifton
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid