Three Tiered Solutions

Web applications have come a long way since the days of simple static html pages. Web servers running services such as Cold Fusion or Microsoft's Active Server Pages (ASP) are enabling the development of dynamically built web pages. These dynamic pages are built using server side programming logic and database interfacing. The result is pages that can be laid out on the fly to reflect real time business information requested by the user of the browser application.


 

Prior to the availability of Web Servers that could dynamically build html pages, the defacto technology for interactive web sites was the Common Gateway Interface (CGI). The many limitations of the CGI technology has spawned new and more productive runtime and development environments.


 

ASP web applications that access database information are by nature 3-tiered applications. The 1st tier is the presentation layer that runs within a web browser. This layer is usually a combination of html and client side scripting such as JavaScript. The 2nd tier runs on the Web Server under Microsoft's Internet Information Server (IIS). IIS preprocesses ASP pages (html pages that have a '.asp' file name extension). During the preprocessing of the ASP pages, all server side scripting (either VBScript or JScript) is executed. The script within the ASP pages contains the business logic that drives the web application. For database driven applications, it is within the ASP scripting that database accesses occur. The database, which is often on a separate computer from the IIS, forms the 3rd tier of the 3-tier architecture.


 

Placing all the business logic into the ASP pages as programming script presents a number of problems. Fortunately these problems are easily solved with the use of component programming. Microsoft recommends that scripting languages within ASP pages only be used as the glue to interface with business components that are implemented using the Component Object Model (COM); we concur.


 

Applications built using a 3-tiered architecture offer many advantages...

  • Flexibility in development resourcing by utilization of specific levels of expertise at each tier.
    • Tier 1: Artistic design, layout and static content, Client side scripting.
    • Tier 2: ASP scripting, Business object development using development language of choice.
    • Tier 3: Data modeling, design, implementation of stored procedures.

  • Components deployed within the 2nd tier are reusable and independent of the presentation layer used in the 1st Tier.

    For example, both a browser app and a traditional Visual Basic application can both access the same 2nd Tier Customer component. This leverages development efforts and reduces the complexities associated to code bloat.

  • Database interface coding can be isolated within specific business object wrappers.

    For example, all applications that must access and manipulate Customer data would do so by implementing methods against the Customer object. The programmers that use the Customer object need not know what database technologies are in place, or have any knowledge of database and/or relational technologies. By excluding the existence of SQL statements from all components (except for the SQL wrappers), there is a very concise and manageable division of labor between developers and database analysts.

  • If the 2nd Tier components are implemented in Microsoft's Transaction Server (MTS), then the developer need not be concerned with the typical issues of multi-user applications. (i.e., locking code sections to a single thread of execution, functions that must all succeed together or not at all, use of multiple threads, etc.). MTS applications scale well in a web hosted environment because each component is given its own thread of execution within a limited (but tailorable) thread pool.

We could talk about the virtues of these technologies and the 3-tier approach almost endlessly. If you are interested in understanding how these approaches can assist you in solving your development issues, please contact us At Three Tier we understand the importance of your time, and to that end you will have the opportunity to communicate with hands on technicians that understand the issues.

Copyright © 1996 - 2014 Northwestern Softworks Ltd.