Why I’d choose Apache Wicket as a web application framework- part 3

About Wicket and JS
Even from the beginning Wicket had Ajax capabilities built-in that could be called from Java. This is done by simply adding the Java component to an ajax context object, the AjaxRequestTarget. Of course you can invoke any JavaScript code before or after the Ajax call.
Currently Wicket uses its own JS engine for doing AJAX, but it integrates alongside other JS frameworks like JQuery nicely(there is a little thing to consider mentioned later though). Wicket does not generate any JS files from Java, unlike GWT frameworks and tries to keep things simple and clean so that it feels like you are in control of what HTML and JS gets generated by the framework. The custom JS for Ajax will probably be changed to JQuery instead (or support for it added) as it was proposed on the roadmap for Wicket 1.6
WicketTester enables and makes writing Unit Tests easy
Again Wicket developers kept testability in mind when they created Wicket and created the WicketTester class that exposes a rich API, for easy writing Unit Tests for Pages and components. Using WicketTester you can check that pages and components render without errors, forms submit and page navigation and test ajax behaviours without problems in a headless environment (non GUI).
I like also that you do not modify your application Pages and components in any way to integrates Spring it allows and that I can test the full flow of the application without doing any special modifications.
Security
Wicket offers support for component level security. Entire panels or components can be automatically be shown or hidden if the user has a certain security level. Of course it’s still easy to provide the standard page level authorisation model most projects require.
Wicket can also be easily integrated with Spring Security.
Internalisation support
Wicket has good internationalisation support by using property files, or can be customised to handle any situation like for example strings loaded from the database.
Wicket is free and open source
No need to say more.
Does not impose Single Page Application architecture
You could build a single page application in Wicket with no problems by having your panels replaced by ajax but you are not forced to do it. Other framework either imposes it, or make it harder to have you application multi page. (SPA usually has issues with SEO)
Wicket has an active community
Bugs and questions are promptly responded through the Wicket mailing list.
Wicket is being actively developed with the 1.5 version was released and the roadmap for 1.6 is in discussion.
There are many Wicket tutorials and blog entries to get you started or you could check the source code and at least two books worth mention: and for the more advanced.
Wicket and Scala
Since Scala is getting a lot of attention this days so you’d be happy to know Wicket and Scala play nicely and although Scala has some own web frameworks, many have chosen Wicket + Scala as their framework.

To Be Continued..

Until my next blog post please share your thoughts, stories and ideas in the comment box below.

Category: Technology & Development
0 comments0

Your comment