Sunteți pe pagina 1din 5

Not Just for Techno-Geeks:

The Managerial and Sociological Benefits of Multi-Tier Application Architectures

You’ve undoubtedly heard about plication technology with which BENEFITS


the technical advantages of multi- I am most familiar, but it can be
tier application architectures. easily extended to other technolo- Specific benefits of the multi-tier
Among these are better load bal- gies. Such an architecture fol- architecture approach are as fol-
ancing, greater agility in the face lows the basic principle for encap- lows:
of change, and the ability to sepa- sulation that Edsger Dijkstra [1]
rate and replace legacy systems outlined in the late ’60s: tiers at ★ Common goals
over time in a controlled manner. lower levels of abstraction
Numerous existing systems dem- “know” as little as possible about ★ Common semantic model
onstrate these benefits in a very layers at higher levels of abstrac-
real and convincing manner. tion. ★ Parallel development
Unfortunately, in the pursuit The heart and soul of a good
of the technological benefits of application are the domain ★ Behavioral discretion
multi-tier architectures, organiza- objects that comprise the busi-
tions often overlook the socio- ness rules and data. It is foolish ★ Specialization of skills
logical and managerial benefits of to try to slap a high-quality user
these architectures. The purpose interface onto a contrived set of ★ Debugging
of this article is to describe these objects. Similarly, there is little
benefits and demonstrate how a to be gained from letting your ex-
few specific managerial practices isting legacy database systems Common Goals
can maximize their impact. drive the internal structure of
your domain objects. A thor- The first benefit is not derived
BACKGROUND AND ough and complete analysis of specifically from a multi-tier archi-
ASSUMPTIONS the problem domain, expressed tecture but from the management
in the notation of your favorite approach a project takes to realize
object-oriented methodology, is it. Specifically, by describing the
The basic structure of a multi- functionality of the system in
tier application architecture is your best chance for success in the
crafting of such an architecture. terms of use cases (an object-
presented in Figure 1. Each tier oriented requirements and analysis
is responsible for a specific set of This leads to the final point of
this brief review: effective man- technique pioneered by Ivar Jacob-
services. The architecture shown son [2]), every developer works
in Figure 1 is admittedly biased agement practices are absolutely
essential if you plan to create an from the same conceptual under-
toward the development of standing of the goals of the system.
object-oriented systems, the ap- effective multi-tier application ar-
chitecture. Fortunately, as I’ll ex- Of course, this does not mean
plain shortly, explicitly striving to each developer works in the same
build such an architecture right manner or even does the same
from the beginning makes follow- task. Your Web page designer is
© 1996 by Luke Hohmann. All rights
reserved. ing such practices far easier. likely to approach her job quite

Reprint 1
differently from your query opti- event (solid line to the system) can begin to prototype the look
mization expert! The point is and output event (dashed line and feel of the agent screens, se-
that when these people do talk from the system) is described in cure in the knowledge that the in-
with each other, they will have business terms. In other words, terface between its tier and the
your user’s most pressing needs at we don’t know how the agent rest of the application is stable.
the center of their conversation. obtained the name of the guest
and the guest’s length of stay. Behavioral Discretion
Common Semantic Model We only know that the heart of
the reservation system — the do- Coupling refers to the degree of
In the development of your main logic — will provide a sys- interdependence among the com-
multi-tier system, make certain tem operation named confirmRe- ponents in a system. Loosely
your team engages in a high- servation(). coupled systems are easier to un-
quality analysis effort using your Once the input and output derstand, modify, and reuse. In
favorite methodology. Such an events associated with a scenario software, the ideal is for each
analysis will concentrate on the are known, the various groups as- component (i.e., a module or
objects within the domain and sociated with the system’s develop- object) to interconnect with
the required functionality of the ment can begin their work in paral- other components only through
system. The benefit (once again lel. For example, the GUI team well-defined interfaces. One key
due to management and not tech-
nology) is that each person on
the team knows the classes (or
entities) that are associated with
the system and can communicate
about them with a minimum of
ambiguity and equivocality.

Parallel Development

The core of a well-defined multi-


tier architecture is a clear specifi-
cation of the interfaces between
layers. To illustrate, suppose you
were building a reservation man-
agement system for a hotel. One
use case would be “Guest check-
in,” which would describe the
process for checking a guest into
the hotel. From this use case, we
can derive one or more specific
uses of the system known as sce-
narios, each telling a specific
story. Scenarios, in turn, repre-
sent a sequence of input and out-
put events.
One scenario derived from
the use case “Guest check-in” is
shown in Figure 2. In it, a guest
has arrived and uses a credit card
to make a deposit. As you read
the scenario, note how each input Figure 1: Structure of a multi-tier application architecture

2 Reprint
technical advantage of multi-tier in turn insulated from the persist- Specialization of Skills
architectures is that they explic- ent storage team.
itly encourage loose coupling be- The greatest sociological fail- Each tier requires a specific set of
tween tiers. ing of the two-tier architecture is skills to ensure that the tier is
In general, the teams that cre- the inability to achieve behavioral properly engineered. The skills
ate multi-tier architectures are discretion. Recall that in a two- and responsibilities of your GUI
similarly loosely coupled. (This tier architecture, business logic be- designer are radically different
can be predicted if you know comes intertwined with the user from the skills and responsibili-
Conway’s law, which states: “Or- interface. Because of this, any ties of your DBA. Carefully engi-
ganizations that design systems GUI development is inextricably neering your application architec-
are constrained to produce bound to the development of the ture enables you to organize
systems that are copies of the underlying business logic that training plans and assignments
communication structures of supports it. The problem with that build these skills in the most
these organizations.”) One key this approach is that the processes effective manner possible.
sociological advantage of loosely associated with building world-
coupled teams is behavioral dis- class systems are different for Debugging
cretion, or the ability (and free- each layer of the architecture.
dom) of a specific team to select Specifically, a GUI team commit-
its most effective manner of work- ted to building a high-quality Debugging a complex applica-
ing, free from external influence. user interface must be allowed to tion is hard enough when the
Thus the GUI design team can work independent of the other business logic is entirely encapsu-
use a different development proc- tiers of the architecture. lated within domain objects.
ess from the business domain When part or all of the business
team, and both of these teams are logic is incorporated into forms
and other user interface (UI)
elements, debugging becomes
almost impossible: in order to
understand the behavior of the
system, the debugger has to un-
derstand the behavior of both
the relevant domain objects and
the UI object. But when attempt-
ing to understand the business-
related behavior of the UI ob-
ject, the debugger is distracted
by behavior that has nothing to
do with business logic but only
with the nuances of formatting
and displaying the information
on the user’s output device. The
end result is that the debugger
becomes confused about the
proper functioning of the system,
making incorrect assumptions —
and incorrect modifications.

Figure 2: The “Guest check-in” scenario

Reprint 3
MYTHICAL BENEFITS enjoy rousing success. This will ★ Respect architectural bounda-
lead to two requests for change: ries when creating assignments.
Beware of the following mythical the first in functionality and the
benefits of multi-tier application second for additional user inter- All Work Is Driven
architectures: faces (think “Web”). Both you from the Domain
and your customer will be de-
★ Reuse/replacement of windows lighted by the ease with which A clear understanding of the
you can make these changes — problem domain and the use
★ Quick replacement of legacy all because you engineered a cases/scenarios of your system is
systems multi-tier application architec- essential for creating a multi-tier
ture right from the beginning. application architecture. Yes, dif-
Reuse/Replacement ferent layers work at different
of Windows Quick Replacement rates, with different schedules
of Legacy Systems and different processes. How-
Building an effective graphical ever, all layers must share a small
user interface is far more than A multi-tier application architec- core set of models in order to en-
simply slapping a few widgets on ture does pave the way for replace- sure effective interaction.
a screen. It requires, among ment of legacy systems (data-
other things, a careful analysis of bases, applications, and the like). Establish Clear Lines of
the tasks your user is trying to ac- Such replacement, however, does Responsibility and Authority
complish and a dedicated usabil- not happen overnight. It takes
ity testing effort. One key test- time and careful planning. Ex- Every team needs to know who
ing activity is trying alternative pect to take at least 12–36 months is ultimately responsible for the
versions of the proposed interface to eradicate your legacy systems creation of an outcome. This
to determine which is most effec- completely. Of course, before you means each team has a specific
tive. (This does not have to take a expend all that energy, take a step developer responsible for that
long time — paper and pencil are back and review your business outcome. It means each tier has
the best tools in the early stages goals. What is the business reason an individual responsible for that
of GUI development.) for replacing your legacy sys- tier. It means the system as a
All of this leads me to the first tem(s)? Be especially careful of whole has one individual respon-
mythical benefit: reuse/replace- techno-geek motivations mas- sible for the system. And it
ment of windows. Taking the querading as “business reasons.” means each person given respon-
time to engage in proper usabil- sibility for the tier is also given
ity engineering means you have GETTING THERE FROM HERE the authority to carry out the
created windows that are custom- decisions necessary to preserve
ized to your user’s needs. You If you are new to creating multi- architectural integrity.
won’t replace such windows until tier application architectures, the
there is a business reason to do following four principles can help
so. Furthermore, their custom- Order of Construction?
you on your way: Domain First
ized and focused nature means
they are not suitable for reuse in ★ All work is driven from the
another application anytime domain. Successful projects rarely concen-
soon. (The same should not be trate on building all layers of the
said of application management ★ Establish clear lines of respon- architecture at the same time. In-
logic, which can be reused.) sibility and authority. stead they focus first on the do-
Does this mean you should main, for it represents the heart
pitch the multi-tier approach? ★ Order of construction? of the system. Get the domain
Of course not! When your Domain first. right, and it is far easier to get
highly usable system is intro- the rest of the architecture right.
duced into the market, you will

4 Reprint
Get the domain wrong, and very chitectural boundaries should be Luke Hohmann is senior object tech-
little can save the project. changed so as to respect them. nologist at ObjectSpace, Inc., a firm
After the domain has been There are three exceptions to specializing in object-oriented train-
validated, projects should address this rule. First, the system archi- ing, consulting, and development
their high-risk items next. These tect has, by definition, a boundary- tools. Mr. Hohmann is the author
could be interconnections with spanning assignment. Second, the of Journey of the Software Profes-
legacy systems, distributed tech- quality assurance group is also sional: A Sociology of Computer
nologies, and the like. I prefer exempt by the nature of its work. Programming from Prentice Hall
to address the user interface layer Third, reviews and inspections (1996). Portions of this article are
immediately after the architec- should cross boundaries as a way of adapted from his book.
ture, as customers and users al- ensuring correctness and increas- Mr. Hohmann can be reached
ways want a good (i.e., usable) ing knowledge of the system. at ObjectSpace, Inc., 14881 Quo-
user interface. Note that both the general rum Drive, Suite 400, Dallas, TX
As described above, many issue of assigning tasks to people 75024 (972/663-9039; fax
tiers can be addressed in parallel. and the exceptions I’ve itemized 972/663-9099; Internet:
The key to this approach is to es- are management issues. And this lhohmann@objectspace.com;
tablish the architecture early, demonstrates once again the under- WWW: http://mem-
make certain each tier is address- lying theme: effective management bers.aol.com/lhohmann). ★
ing similar functionality as per- practices are absolutely essential if
ceived by the user, and integrate you intend to create an effective
frequently. If you are going to at- multi-tier application architecture.
tempt parallel development,
make certain each tier agrees the REFERENCES
domain is the key driver of the
entire architecture. Changes to 1 Dijkstra, E.W. “The
the user interface should not moti- Structure of the ‘THE’-
vate changes in the domain. The Multiprogramming Sys-
reverse is not true: changes in tem.” Communications of
the domain are likely to motivate the ACM, Vol. 11, no. 5
changes to the user interface. (May 1968), pp. 341–346.

Respect Architectural 2 Jacobson, I., M. Christer-


Boundaries When Creating son, P. Jonsson, and G.
Assignments Overgaard. Object-Oriented
Software Engineering: A Use
There are very few developers Case–Driven Approach.
who can handle tasks spanning Reading, MA: Addison-
multiple layers of the architec- Wesley, 1992.
ture. Review each task with re-
spect to architectural boundaries.
Any assignment that crosses ar-

This article originally appeared in Vol. 9, no. 11 of AMERICAN PROGRAMMER®. Copyright © 1997 by Cutter Information Corp.
All rights reserved. Unauthorized reproduction, including photocopying, is illegal.
The monthly AMERICAN PROGRAMMER® Newsletter is edited by Ed Yourdon and published by:

CUTTER INFORMATION CORP.


37 Broadway, Arlington, MA 02174, USA. Phone: (617) 648-8702 or (800) 964-8702,
Fax: (617) 648-1950, E-mail: lovering@cutter.com

Reprint 5

S-ar putea să vă placă și