Click here to Skip to main content
15,861,172 members
Articles / Programming Languages / C#
Article

The Application Automation Layer: Introduction And Design

Rate me:
Please Sign up or sign in to vote.
4.74/5 (36 votes)
25 Dec 20026 min read 241.1K   143   30
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:

Image 1

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

Image 2

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:

Image 3

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

Image 4

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

Image 5

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


Written By
Architect Interacx
United States United States
Blog: https://marcclifton.wordpress.com/
Home Page: http://www.marcclifton.com
Research: http://www.higherorderprogramming.com/
GitHub: https://github.com/cliftonm

All my life I have been passionate about architecture / software design, as this is the cornerstone to a maintainable and extensible application. As such, I have enjoyed exploring some crazy ideas and discovering that they are not so crazy after all. I also love writing about my ideas and seeing the community response. As a consultant, I've enjoyed working in a wide range of industries such as aerospace, boatyard management, remote sensing, emergency services / data management, and casino operations. I've done a variety of pro-bono work non-profit organizations related to nature conservancy, drug recovery and women's health.

Comments and Discussions

 
GeneralCool! ... Some Thoughts Pin
KMrRRbpdGwpP11-Sep-04 6:50
KMrRRbpdGwpP11-Sep-04 6:50 
GeneralRe: Cool! ... Some Thoughts Pin
Marc Clifton11-Sep-04 7:27
mvaMarc Clifton11-Sep-04 7:27 
GeneralWorkflow Manager Pin
David J Tasker29-Aug-03 6:19
David J Tasker29-Aug-03 6:19 
GeneralRe: Workflow Manager Pin
Marc Clifton29-Aug-03 8:00
mvaMarc Clifton29-Aug-03 8:00 
GeneralWorkflow Manager Pin
David J Tasker29-Aug-03 6:17
David J Tasker29-Aug-03 6:17 
GeneralSoftware Development on a Leash Pin
MtnBiknGuy8-Jun-03 6:49
MtnBiknGuy8-Jun-03 6:49 
GeneralRe: Software Development on a Leash Pin
Marc Clifton8-Jun-03 11:06
mvaMarc Clifton8-Jun-03 11:06 
GeneralRe: Software Development on a Leash Pin
MtnBiknGuy8-Jun-03 13:18
MtnBiknGuy8-Jun-03 13:18 
GeneralRe: Software Development on a Leash Pin
Marc Clifton8-Jun-03 13:35
mvaMarc Clifton8-Jun-03 13:35 
GeneralRe: Software Development on a Leash Pin
MtnBiknGuy9-Jun-03 7:16
MtnBiknGuy9-Jun-03 7:16 
GeneralRe: Software Development on a Leash Pin
Jack Maher22-Oct-03 6:11
Jack Maher22-Oct-03 6:11 
GeneralRe: Software Development on a Leash Pin
MtnBiknGuy23-Oct-03 8:25
MtnBiknGuy23-Oct-03 8:25 
GeneralSome comments Pin
DavidIzadaR30-Apr-03 10:11
DavidIzadaR30-Apr-03 10:11 
GeneralA newbie OOPS programmers moment of weakness ... Pin
Anonymous25-Mar-03 19:53
Anonymous25-Mar-03 19:53 
GeneralRe: A newbie OOPS programmers moment of weakness ... Pin
peterchen1-Apr-03 11:16
peterchen1-Apr-03 11:16 
GeneralMore please Pin
Michael P Butler31-Dec-02 10:05
Michael P Butler31-Dec-02 10:05 
GeneralRe: More please Pin
Marc Clifton31-Dec-02 12:35
mvaMarc Clifton31-Dec-02 12:35 
I'd love to see a series of articles on this stuff.

That's definitely in the works. I just finished the text, code, and drawings for Part II. I'll probably post it tomorrow some time.

Marc

Help! I'm an AI running around in someone's f*cked up universe simulator.
Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
Every line of code is a liability - Taka Muraoka

GeneralObject Oriented Programming Pin
Ron Marshall31-Dec-02 9:39
Ron Marshall31-Dec-02 9:39 
GeneralRe: Object Oriented Programming Pin
Marc Clifton31-Dec-02 11:08
mvaMarc Clifton31-Dec-02 11:08 
GeneralRe: Object Oriented Programming Pin
Ron Marshall2-Jan-03 4:57
Ron Marshall2-Jan-03 4:57 
GeneralRe: Object Oriented Programming Pin
Marc Clifton2-Jan-03 5:33
mvaMarc Clifton2-Jan-03 5:33 
GeneralRe: Object Oriented Programming Pin
Marc Clifton2-Jan-03 7:08
mvaMarc Clifton2-Jan-03 7:08 
GeneralRe: Object Oriented Programming Pin
Ron Marshall2-Jan-03 10:47
Ron Marshall2-Jan-03 10:47 
GeneralRe: Object Oriented Programming Pin
Marc Clifton3-Jan-03 1:47
mvaMarc Clifton3-Jan-03 1:47 
GeneralRe: Object Oriented Programming Pin
Ron Marshall3-Jan-03 3:47
Ron Marshall3-Jan-03 3:47 

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

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