MyStack.com (sic): A Wicket WebApp

Posted on Saturday, November 22, 2008
0 commentsAdd comments

Wicket is a framework for building Java-enabled web applications. If you have done web design in ASP.NET and AJAX, then using Wicket is somewhat similar to that process and very different in other ways. However, if you have ever worked with spaghetti code, such as classic-ASP, or Macromedia’s ColdFusion MX, which I had the displeasure of working with in my ICS 415 course, then Wicket simplifies web application development by separating the business logic from the presentation logic.

I really enjoy working in ASP.NET, so I am usually very critical when using and evaluating another web application framework. What I like about Wicket is that the developer is able to use a code-behind model just as ASP.NET development facilitates. What I don’t like is being required to manually “rebuild” the web-page in the Java code-behind by adding page elements, which have to reflect the DOM. The difference here is, at least when using Visual Studio, the elements are added by the code generator to the web page, then the developer is able to directly access the elements methods and write custom event handlers for their behaviors. For example in ASP.NET, I can write custom code for a button’s click behavior in its Click event handler once it has been added to the web page. Whereas, in Wicket, I first need to manually add the button element to the web page, then manually add it in the Java code-behind page ensuring that it is added in the same container element as it resides on the web page. Otherwise, using Wicket was an enjoyable experience and roughly on par with using ASP.NET, but worlds apart from using something like Macromedia’s ColdFusion MX.

Hello, Wicket
Getting started was a bit of a task. However, my ICS professor Philip Johnson has provided a superb set of Wicket examples. To use these examples, first requires installing Wicket, Jetty, and SLF4J libraries. Instructions for setting these libraries up can be found on the Wicket examples web site. To build my implementation of an online stack application, I focused mostly on Example 04 for its session state capabilities, and then Example 02 for its form and table demos. Completing the assignment was quite simple due to my familiarity with building web pages and session state handling.
Hello, MyStack.com (sic)
This is a screen shot of my implementation, which uses the name “MyStack.com” and is in no way associated to any official company or web sites that use the same name. Although, I was not able to reach any URL of the form http://www.mystack.com at the time of this posting.



My implementation can be downloaded here.

Comments (0)

Subscribe to: Post Comments (Atom)