Datasheet
Chapter 1
18
I have a definite belief in the power and flexibility of the n-tier approach we'll be talking about
shortly – but don't believe for a minute that I think it's the only solution. The moment you let
yourself be backed into thinking one approach is the right one for everything, will be the moment
that you start turning out sub-standard work. Both traditional client-server and host technology
still very much have their place, and I'll try to address some of the "wheres" and "whys" as we go
through this section.
There have been a few models to come around through the years, but today we usually group things
depending on how they handle three groups of services:
❑ User Services: This usually includes aspects like drawing the user interface (UI) and basic
formatting and field rules. An example of facets that might be handled by User Services is proper
formatting of a date – including making it known that a given field is a date field and pre-validating
that any value entered into this field is actually a date. User services is all about presentation and
making sure that each field has at least the type of data it's supposed to have in it.
❑ Business Services: This part knows about various business rules. An example of a business service
is one that connects with your credit card company to validate a customer's credit card purchase.
In a 3-tier or n-tier system, the Business Services objects may reside on their own server, be split
across several servers, or, in smaller installations, share a server with Data Services.
❑ Data Services: This is all about storage and retrieval of data. Data services know about data
integrity rules (say, that an inventory value can't go below zero), but don't care where the
credit card approval came from. This is where SQL Server lies.
Let's take a look at some of the
classic architectures used, both past and present, and see how our
services fit in.
Single Tier (Host) Systems
This is the old mainframe and mini-computer model. There was virtually no logic at the desktop –
instead, there was a dumb terminal. All that was sent down the wire to the terminal was the screen
layout information, which included the data to display, of course.
Advantages Disadvantages
Requires very little bandwidth on your
network in order to have fast response times –
great for international or WAN situations
where bandwidth can be expensive.
Very expensive hardware-wise. In the old days,
these often required special plumbing for cooling
water – although I'm not aware of any systems
which still require this being produced today.
Also exceptionally reliable. You'll find
mainframes out there that haven't been
"down" in years, literally.
Typically proprietary in nature – much more
difficult to share information with other systems.
Deployment of new software is extremely
easy. Just install on the host system, and every
user has the new version – no running from
machine to machine for the upgrade.
Very limited number of "off-the-shelf" software
packages available. Since the number of potential
customers is few, the cost of these packages tends
to be extremely high.