Proposal for a more precise definition of the term "application"

I´ve given the question I posed "What is an application?" some more thought. Martin Lercher made a good point, when he wrote "deployed set of executable code, infrastructure and data such that this set is minimal" for a given purpose. And Ingo Rammer surely explains it like I would have some time ago by saying, an application is "whatever is contained in one single Visual Studio SLN file." Microsoft surely likes him for that, too :-) But still... there remains a feeling of uneasyness in me with those explanations. For one, I strongly believe, non-trivial applications (or software based solutions) should not be developed within a single VS solution. And then, Ingo says: "A certain solution - or system - however might easily consist of several applications." That means, when I set out to solve a problem and tell the customer "Hey, I´m gonna develop a nice application for you." I might be wrong? I might end up producing several applications? If that´s the case - and I believe it is - then we should define the term "application" much stricter.

I therefore propose the following:

Whatever we produce as response to a customer requesting "an application" from us is a Software Solution. It might be an Add-In for Word, or a standalone WinForms EXE, or a library to be hosted in COM+ etc.
A Software Solution is not to be confused with a VS.NET solution file.
A Software Solution possibly consists of many assemblies and additional files (e.g. database).
But most importantly, a Software Solution consists of a number of Software Applications ranging from 1 to n.

A Software Application in turn consists of at least two things: my code, i.e. 1 or several assemblies, and 1 Application Host.

The Application Host provides a runtime environment or infrastructure for my code. An Application Host always is an EXE file. And its infrastructure can be rich or simple to non-existent. The main purpose of the Application Host is loading my code and starting it. (Although the CLR is doing that, I don´t view the CLR as an Application Host. The CLR is the foundation for managed Application Hosts and my code, like the operating system is for all code running on a computer.)

There already exist quite a few Application Hosts: COM+, IIS/ASP.NET, BizTalk, IE, SQL Server 2005. To complement them for simpler Software Applications I propose we come up with a Console Application Host, a WinForms Application Host, and a NT Service Application Host. For a start, they are very simple to write, just a couple of lines of code. But their impact is considerable:

Vested with an Application Host battery ranging from Console Application Host over COM+ Application Host to BizTalk Application Host, our Software Applications can become quite simple and regular in their basic structure:

For each Sofware Application choose an appropriate Application Host - and then write all your code (your application logic) exclusively as library assemblies (DLLs).

So where does that take us? Does this definition of "application" make anything easier? I´d say so!

  • We no longer need to ask ourselves, whether our solution is one or many applications. We just count the number of Application Hosts involved.
  • A technology like BizTalk or SQL Server can easily be categorized: they are Application Hosts because they run our code.
  • And we don´t have to ponder the question any longer what "distributed application" means. The answer is: There are no distributed applications!
    There are only distributed Software Solutions. A distributed Software Solution consists of at least 2 Software Applications who communicate with one another. A simple scenario could be...  a desktop app (WinForms Application Host) calling a SQL Server (Database Application Host) stored procedure. Have you ever thought of a C/S scenario as a "truw" distributed one? There is no Application Server like COM+ involved, but still... it is distributed, because there are two Application Hosts runnining our own logic. (Stored procedures of course belong to our own code.)

The longer I think about "applications" in this way, there more comfortable I feel. I can now use the term "application" very precicely, I can draw a little circle around what makes up an "application": the circle is the Application Host, what´s in the circle is my code hosted by the Application Host. And if I want to distribute my solution I just need to ask, which Application Host provides an adequate infrastructure, break my code apart, keep some in the former Application Host and put the rest into the other one. (Of course I need to observe the prerequisites and constraints of each host.)

"Application" just seems to be right as a description for whatever a host plus my code is. "Software" would be too broad a term. "Solution" would be too broad a term. "Component" would be too narrow a term.

But even though I´m quite happy with my new definition, I take suggestions for alternatives.

1 Comment

Comments have been disabled for this content.