A month ago I started evaluating Apache Wicket. My end goal is to find a Java-based web framework for use in a online marketplace that will serve as the basis for a business I am attempting to start up with a couple of partners. I first attempted to use Spring based upon the many site that suggest it was a good framework as well as the number of job openings that required the knowledge. I found the material to learn the Spring language to be deficient and moved on. That's when I started looking at Wicket. After a month of working with it and creating a web-based survey, I think Wicket is a good framework with a number of resources to aid someone to easily learn how to use it, however, it does have a few deficiencies.
First, the positives. There were a number of resources (which I have mentioned in previous blog entries) that allowed me to quickly learn how to use Apache Wicket. From those resources I was able to develop a web-based survey that will be sent to prospective customers of the future business. The survey will be used to determine how viable the marketplace will be and how much interest there will be in it. That will help us figure out how much effort and preparation may be needed to launch the marketplace.
Creating the survey in Wicket was relatively easy. Each page/form in the survey was composed of three files: the HTML markup, a simple Java file assicated with the HTML file that essentially imported another Java file that included the code to display the options and process the response from the user. There was no need to create numerous XML-based properties files or other extranious material. For me, this was a big plus as I am still new to some of the web application programming concepts.
Now that the survey itself has been created and is functional I started looking at resolving some of the issues that are not ideal for a full-fledged marketplace. One issue that I am still having problems with is the URL that Wicket creates. By default, when links are 'dynamically' created with Wicket the URL comes out something along the lines of "http://example.com/page/?wicket:interface:=0::::". It would be more desirable to leave out the "?wicket..." part of the URL, basically have clean URLs. I've been researching how to resolve this issue but have not found an adequate solution and I'm beginning to wonder if there is one. There are a number of "URL coding strategies" for Wicket including Bookmarkable Pages, Hybrid URL Coding Strategies and more. However, I haven't found a way to permanent solve the situation when forms are being used.
Perhaps there is a solution to this problem and I simply haven't found it. I will say that I think I am done trying to find the solution. I think my future marketplace needs to have clean URLs and not having found a solution for that with Wicket I will evaluate other frameworks. It is the start of Spring Break for me and so I have plenty of time to do the evaluation. I am not yet sure of which framework to look at next; there are a number that stood out one way or another in the past including Tapestry, Struts, Stripes, and Grails. Grails I will look at first if only because I may be able to eliminate it from contention quickly as I need to be able to include existing Java code in the marketplace backend; and if I can't eliminate Grails immediantly it may be an interesting framework to explore. I will post what I find as I continue this exploration.
Comments
Clean Url
Hi,
You can easily achive them. Below is a clode snippet.
You will have to override the init method in your application class.The simplest way, may suit you for your survey.
@Override
public void init(){
//This will give clean code to your book markable page. You will have to do it for each of the page.
mountBookmarkablePage("/bkmarkpage1", MyFirstBookmarkablePage.class);
mountBookmarkablePage("/bkmarkpage2", MysecondBookmarkablePage.class);
//This would clean the url for each of the pages that are deeper inside the package.
mount("/survey",PackageName.forClass(MySurveyBasePage.class));
}
Hope it helps.
with regards,
Pratim Sc
pratim dot skgc at gmail dot com