 |
Article:
 |
 |
Practical JSTL, Part 2
|
| Subject: |
One legit use for SQL tags |
| Date: |
2003-11-28 10:55:57 |
| From: |
acroyear |
|
|

|
And also for using straight scripting elements in JSPs potentially as well, or at least a lot of the flow-of-control tags like "if" and "while": prototyping and iterative development.
When a first version of a prototype or proof-of-concept app is developed, in most small development houses its developed by a single person, working to a basic requirements document, with the goal of getting a working version in front of the other developers and the customer right away. Mocking up a web application with all of its back-and-forth connections to the server is not nearly as simple as mocking up Swing dialogs and windows, because the whole flow-of-control of a web app is different.
With these kinds of tags, the prototyper can get on with getting a basic version of the application up quickly, without having to resort to java and all of the compile-debug-addcode cycle slowdowns.
Then, once the prototype has been agreed upon as the direction to go in, with the # of different pages, the prototype can go to both the Model and View people for refactoring as-is.
The Model people can go about moving the business logic into Servlets and TagLibs and if necessary, Portlets or Tiles or whatever template toolkit has been agreed upon.
Meanwhile, the View people, looking at the application from a visual layout standpoint, can actually be manipulating a *working application* so that at every point, their changes to the style and layout can be seen in context of the actual page and actual data that the application will be populated with.
Finally, the last step is the View people would then take the prototype-based SQL tags and replace them all with the taglibs developed by the Model people, thus moving all the logic into the back-end where it belongs.
So that's what its useful for. The alternative, keeping the view people in isolation from the real data, puts too much of the work in the View part at integration time, and leads to a long integration during which none of the application would seem to work properly and be very difficult to debug. |
|