Java Reference
In-Depth Information
When you're flying at 1,000 feet, suburban Dallas looks surprisingly different.
Even at that altitude, you can hear the sounds of the City. It is early. Hot-air bal-
loonists favor the windless hours right at sunrise. This is my second ride, and the
morning is calm and beautiful. The pilot, Dee Crabtree, and I plan strategy with
our chase crew by radio. We are now directly over our target, but the competition
guidelines clearly state that we must drop our marker from below 100 feet to score.
Just for kicks, we drop it anyway. We watch in horror as the streamer stretches out
sideways, indicating screaming ground winds we cannot see. We need to land-now.
The City looms near, with high-rises, airports, and power lines. We swoop down,
scanning for a landing zone among the ever denser artifacts and trees. The
ground is flashing by much too quickly. Out of nowhere appears a perfect field
with no live-stock. We drop so fast my stomach is in my throat. As the ground
rushes toward us I pray that Dee will know how to save us. As he yells his instruc-
tions, I crouch down in the bottom of the basket and wedge myself between the pro-
pane tanks, preparing for impact.
Getting only halfway home
After making many smart choices on the front end of a project, many a pro-
grammer stumbles on one of the secondary antipatterns we'll describe in this
chapter. In some cases—for instance, with Compound JSP s—the problems are
relatively minor, with mild consequences, and you can easily refactor. But
occasionally, the antipatterns grow in severity over time and block you from
enjoying many of the advantages of the base Triangle design pattern. In each
case, we can soften our landings with some advanced knowledge about our
landing zone—the intricacies of the design patterns that we employ. In this
chapter, we will explore some danger signs and then work through several
antipatterns and their refactored solutions.
Recognizing the danger signs
A common class of Internet development environments uses various tag lan-
guages to create server-side Internet applications. ColdFusion and ActiveX are
classic examples. These programs are popular because they capture the spirit of
HTML scripting, a familiar and efficient choice for many users. These applica-
tions encourage robust user interfaces, because the server-side scripting envi-
ronments are similar to HTML tools. However, danger lurks here. Many
applications using these technologies have the same characteristics of the
Magic Servlet, with a massive server-side tag-language script instead of a Java
servlet. Table 4.1 shows some of the key disadvantages to such a design.
Search WWH ::

Custom Search