I am shocked that someone is actually proposing to go back to simply servlets for creating web applications. JSP has it’s share of problems (one of the reasons why Wicket was started), though the JSP team fixed some of it’s most urgent problems in the last few years. However, proposing something like:
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.)");
as the better alternative is so bad I consider it to be too cruel to serve as an April fool’s day joke. And if those code fragments aren’t ugly enough for you, just imagine what it would look like when you have a couple of forms, statefull components and updating of model objects to do. Brrrr.
But here is the best part (quoted from that article):
Although Web frameworks tend to complicate the overall shape of things, they do solve a variety of smaller problems.
That’s quite the inverted argument when you consider a framework like Wicket. Wicket solves the big problems, and leaves the smaller problems to be solved by it’s users or through specific components. A sample of the big issues Wicket tries to address:
- The ability to build a larger whole from smaller pieces (Pages from components, behaviors and models), where the smaller pieces are self contained/ encapsulated so that they can easily be designed for reuse in different contexts and have explicit extensions points.
- Enforced separation of logic and presentation so that it is always clear where to find what. Presentation templates can be managed by designers using their favorite tools and the templates are clean and easily readable at all times. The logic is statically typed to facilitate robustness and so that it is easy to test, navigate and debug using standard IDE facilities.
- Providing the proper abstractions to let you reason about the problem domain at hand (the user interface). Coming up with proper names and thinking about your entities’ responsibilities is half of the power of object orientation. It’s not just about how you organize your code; it’s also about how you think about and communicate what you’re doing.
In my opinion, Wicket is a ‘think big’ framework. Rather than having been started to solve a number of day-to-day problems, we – and particular Wicket’s founder Jonathan Locke – took a step back and came up with the near-to-ideal programming model for web user interfaces. We created a framework to support good programming practices and team work first. We postponed the optimizations and nitty gritty details like how to deal with Ajax and file uploads etc to when we were ready for it. This is similar to how Java was started – in the first few years bashed for it’s poor performace – and now for instance Terracotta – whos builders have the grand idea of transparantly clustering JVMs, and who are working to fill in the gaps now, after having implemented the rough idea first.
Maybe I’m too harsh on the author of the article, and all he wanted was to let people think outside of a narrow mindset of having to utilize frameworks for every little programming problem they have. If this would be the case, I would agree with the idea behind the article. But as this is not the idea I get, I see the suggestion to get back to plain Servlet programming as yet another example of provincial thinking in the world of ‘enterprise Java’.