Wednesday, May 26, 2004

Writing custom JSP tag libraries: yeah, like cleaning out the garage

Because of circumstances not totally in my control (*), I have been hurrying a lot the last 3 weeks writing lots of JSPs for a web application. Except for the struts and struts-menus tag libraries, I have been embedding a lot of Java code in my JSP pages (yeah, I know... not the best).

Anyway, I have allocated about a half day today to start factoring out working embedded Java script code in some of the JSP pages into new custom tag libraries. This is really simple to do, and has lots of advantages, including:

  • Makes the JSPs much tidier and easier to maintain

  • Segregates the Java code and enables unit testing

Anyway, I got the same good feeling that I get after cleaning out the garage :-)

(*) I have had ideas of writing an open source knowledge management for about a year. About 6 weeks ago, an old customer approached me to do this as a GPL project - the deal was that I would only charge for about half my development time, but that the project would be GPLed (a good deal for everyone!). My customer then developed an urgent need, and a 4 to 5 month development schedule got compressed into a "hurry up and get a beta ready" to be followed by a cleanup period later.

No comments: