Back

Name: Application Development Basics- Application Layers

Date: 6/8/2

Volume: 1

Author: Mike Chrisman

 

In today's world of ever changing technology and development tools, there is an ever-increasing set of terms used in describing Application Design Architecture.  Terms like Client Server, 3 tier, N tier and the like get thrown around so much that is it confusing what is what.  In this article I will try to lay down a definition of the basic design architectures.  There are some that may argue with my definitions, but hey, it's a free country and everyone is entitled to an opinion.

 

The first definition I need to lay down is what do I mean by Application Design Architecture.  For the purpose of this article, Application Design Architecture will pertain to the overall, high level design of how an application works independent of any technology, language, or protocol.  My first argument is that all have three and only 3 tiers or levels.  These levels are Presentation, Business Logic, and Storage. 

 

Now I know that some people will say that Client Server has only 2 and what about N tier (I find is kind of funny that people who use that terminology can't seam to count higher than three, 2 tier, 3 tier, N tier).  But I will attempt to show that even though we may not think of all the layers in some architectures, they are still there.  As for N tier, it doesn't matter how many servers a layer sits on or how many "jumps" a layer makes within itself before going to the next layer.  Let's now further define each layer. 

 

The Presentation layer is where the application information is displayed to the user and user's input is gathered and sent to the Business Logic Layer.  In short, it is the interface to the user.  Some basic business rules can also be handled in this layer (like is a date formatted correctly, has the user entered a valid number, etc).

 

The Business Logic Layer is heart of the application.  It takes input from the Presentation Layer, enforces business rules, and sends information to the Storage Layer.  It also takes information from the Storage Layer, converts it into information the Presentation Layer can understand, and sends that to the Presentation Layer.  In short it is an interface between the Presentation Layer and the Storage Layer, plus handles business rules.

 

The final layer is the Storage Layer.  This is where data is stored for long term.  This layer takes the information from the Business Logic Layer and places it in a format for long term storage.   It also gets the stored data that the Business Logic Layer requests and sends it to the Business Logic Layer. In short, it is an interface between the Business Logic Layer and long term storage.

 

The primary function of each layer is to convert information from one format to another.  The Storage Layer converts data stored in a long-term format into a format the Business Logic Layer can understand.  The Business Logic Layer converts the information (after applying business rules), into a format the Presentation Layer can understand.  The Presentation Layer converts the information into a format that the user can understand.  Each layer is also responsible for the reverse process too. 

 

It is important to understand that these layers are logical and not physical.  Each layer can exist on any number of computer or even on some other type of device.  So, to support my statement that all application architecture include these three layers: On main frame apps, the Business Logic and Storage are typically on one computer (the main frame) and the presentation is on the "dumb" terminal.  With client server, the storage is on the server while the presentation and business logic layers are on the client computer. And in stand-alone apps, all three applications are typically on one computer.

 

Now I realize that the example I have give have exceptions.  It is not uncommon to find a client server app that has code (that is not storage) that runs on a server.  But that codes is still part of the Business Logic Layer, since that is it's function.  Any layer can be spread over any number of servers/computers, from 1 to "n". Application Architecture Layers are independent of any technology, language or hardware. 

 

When you stop to think about application architecture in this way, new possibilities open themselves up in how you design your apps while remaining easy to understand and follow.  In the next article, I will talk about the current application design terms and how where the three layers are covered.

 

Back