Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Understanding the 3 Layers of an Application

May 1, 2000

All applications can be broken into three layers

  1. Presentation Layer - What the user sees. (aka GUI, Client-side, or "view")
  2. Business Rules Layer - The underlying processing engines and their rules (aka middle-tier, backend, or "control")
  3. Data Layer - The physical data storage layer (aka: "model")

Most applications have requirements that span all three of the layers. That is, most applications need a user interface (1) and process (2) user requests based upon some underlying data (3).

However, as a developer, it is usually better to make sure that within the design of your application, that you separate the three layers.

Why?

Well, mainly because things change. Especially in the world of computers. In fact, things don't just change, they change extremely quickly and often dramatically.

As a result, developers must often modify applications to meet new requirements in short order. And how flexible your application will be, will depend on how well the three layers have been separated.

Let's understand this by example. Suppose you wrote an application that drew its data from a simple delimited data file.

If the data manipulation code were embedded into the presentation and Rules layer, what do you suppose would happen if you decided at a later date that you preferred to store your data in a relational database like Oracle? (Or what would happen if the technical environment suddenly changed and B2B XML streams were the norm?)

Well, in this case, you would most certainly have to rewrite your application because your code would be hand-carved for flat files.

As you might imagine, this is incredibly inefficient. Rewriting is never a very good situation to be in.

Since the environment in which your application must survive will change so fast, you need a design that will allow you to switch in new technologies without having to rewrite.

In order to do this however, the layers must be very distinct...they must be "pluggable". In the example below, we show that an "interface" can sit between the application (the presentation and rules layers) and the data layer.

The interface separates them safely into distinct layers.

As you might imagine, a good program will also separate the presentation layer from the rules layer as well. With good separation, one can switch presentation drivers as desired....whether the client uses a browser, a handphone, or a PDA should not matter!

Monolithic, single-scale applications
Introduction to ASP For Web Developers | Table of Contents
Client Server Model Applications


Up to => Home / Authoring / ASP / Intro




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers