BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Apache Wicket 6 Released With Integrated jQuery Support

Apache Wicket 6 Released With Integrated jQuery Support

This item in japanese

Bookmarks

The Apache Wicket project has released version 6.0.0 of its open source, component oriented Java web application framework. While this number is confusing at first glance since the last release was 1.5, in practice Wicket has just switched to Semantic Versioning for new development. Changes in the first digit are major changes that might break the public API, changes in the middle digit show backwards compatible additions in functionality and changes in the last digit show patch additions that only fix bugs.

A description of most of the changes are listed in the announcement, and more extensive details can be found in the migration guide. It is worth noting that while the previous version took more than 2 years in development, the 6.0.0 release happened after less than a year. This can be a sign of more frequent releases in the future development of Wicket.

Some of the most important changes for this version of Wicket are:

  • Built-in support for the popular jQuery JavaScript library
  • JavaScript Event binding registration instead of using inline attributes in HTML
  • Minimum requirement for Java 6
  • Better alignment with JPA
  • Package restructuring to easily accommodate OSGI support
  • Wicket Resources can now define dependencies between them.
  • Experimental support for websockets and integration with Twitter Bootstrap
  • Several other improvements to AJAX control, feedback error messages, form validation etc.

Until version 6.0 Wicket used custom code for AJAX support (wicket-ajax.js and wicket-event.js). This was problematic in regards to browser compatibility. The Wicket team decided to replace this functionality with the jQuery library that already has excellent support for cross-browser JavaScript scripting. This means that Wicket code can now focus on the actual business logic instead of solving issues with current Web browsers. Note that jQuery is just the current implementation behind the current Wicket public API. In theory one could re-implement the same API using another JavaScript library.

The next improvement regarding JavaScript is the way events are attached to the web elements of the page. Previously, JavaScript events were directly inserted into the onclick and onsubmit properties of the respective elements. This approach was not ideal since they could not be cancelled by other event listeners. Now all these callbacks are instead registered to DOM events allowing for greater flexibility on the configuration.

Wicket 1.4 required Java 5 as a minimum. Wicket 1.5 required in addition a servlet container with support for version 2.5 of the servlet-api specification. With the present Wicket release Java 6 is the minimum version. This might force some legacy environments to upgrade their Java installation if Wicket 6 is to be used.

The iterator and other methods on IDataProvider, which is used in persistence, now has an argument of long instead of int raising the limits on item count that can be fetched.

Several package names have been changed in order to accommodate the usage of Wicket inside an OSGI container. Here is the list of name changes. A Wicket Resource now supports dependencies on other resources. Previously each resource was responsible for its own dependency management while now it delegates this effort to Wicket itself. Dependencies are resolved in the correct order in case of transitive links between them. Finally this version of Wicket offers experimental support (meaning that the API is not stable at all) for Websockets.

For more information, visit the Wiki, Reference documentation, and Javadocs. Bugs and problems can be reported on the Wicket issue tracker.

Rate this Article

Adoption
Style

BT