Strut Your Stuff
By Al Williams
If you've been in the computer business a long time, you've probably noticed that many new ideas are really reincarnations of old ideas that have been forgotten. For example, the personal computer crowd "invented" virtual memorysomething larger computers had used for years. The software development world is especially prone to this type of reinvention. Years ago (before PCs), people wrote large hunks of intertwined code. Then, someone realized that structured, modular programming was more efficient. When PCs came along and started to move to the forefront, PC developers reverted to the large, unstructured hunks of codeuntil, of course, they rediscovered the concept of structured code. Structured programming evolved into object-oriented programming, and then the Web exploded onto the scene.
Early Web developmentusing Perl, Active Server Pages (ASPs), and JavaServer Pages (JSPs)often bore more resemblance to early 1980s Basic code than to professional, structured code or object-oriented programs. This was especially true with ASP and JSP, which let you mix your code with HTML. Today, the pattern of reinvention and rediscovery continues, as the Web has become big business. Now, current best practice is to make what used to be a JSP modular by splitting it into two components:
- A JSP that acts as a user interface, displaying data and accepting user input (the View component).
- A set of JavaBeans that encapsulates or represents the business logic for the application (the Model component).<>