Friday, March 30, 2007

April Fools comes early?

Of course, the title is a joke, but I've read a couple of threads over at TheServerSide.com today and yesterday that made me check the calendar to make sure April 1st had not yet arrived.

First, we have Pure servlets: Designing Web UIs for Simplicity, a discussion about an article posted at IBM developerWorks which attempts to argue that generating the HTML to be displayed directly within the servlet. The sample code in the article contains snippets such as:

if ("true".equals(request.getAttribute(P_SUCCESS)))
out.printDIV("smallHeading", "Team picks were saved successfully.");
out.printDIV("reminder", "(Reminder: \"Pick 20\" represents the team you"
+ " think likeliest to win. \"Pick 1\" is the least likely.)");
The author, Jason Van Cleve, says that JSP is too complex for web designers and Java developers apparently can't properly write HTML, so we might as well go back in time and re-invent the wheel. Of course, I'm paraphrasing here. What he actually says is:
For Web pages with dynamic content, Java™Server Pages (JSP) technology is touted as a means of separating the developer's concerns from those of the UI designer. Unfortunately, JSP is too complex for many designers, so Java developers tend to handle the JSP code themselves, often with unsatisfactory results.
This pure-servlet approach is touted by Van Cleve as a means to simplicity! Uh, what? What we're essentially doing is taking presentation logic and business logic, pouring them into the blender together and hitting PUREE. Good luck separating them again!

Next, there is an announcement of a new build tool called Schmant. Most of us use Ant, but OK - some people need more than Ant can do alone. That's what we have Maven for. If you don't like either of those, there's already Rant, Invicta, JMK, Centipede, or CPMake! But that isn't enough. Now there is Schmant. Its notable feature is that it uses the JDK 6 scripting engine for its build scripts. Of course, Ant already has scripting support, with the added benefit of not requiring Java 6, but why use something that's tried and tested and solid when we can start from scratch?

(Photo: isriya)

0 comments: