ASF Bowls Apache Wicket 6.0 At Open Sourcers

The Apache Software Foundation (ASF) has offered up version 6.0 of Apache Wicket, an open-source component-based Java Web application framework.

Apache Wicket 6.0 is the latest version of the Java component-oriented Web framework used by thousands of development shops around the world, including an array of large and small organisations such as Symantec, Walmart, Vegas.com, email provider GMX and the Dutch Internal Revenue Service.

Framework Upgrade

Wicket eases the creation and maintenance of complex Java Web applications. Version 6.0 enhances core functionality and offers many new features, from OSGi compatibility to AJAX attributes to big data support.

“This release delivers a reinvigorated implementation of our client side API that enables developers to integrate rich JavaScript libraries and components with minimal effort. We have updated and broadened the capability and flexibility of many existing features throughout the framework,” said Martijn Dashorst, vice president of Apache Wicket, in a statement.

Numerous enhancements make Apache Wicket 6.0 a solid choice for Web development, including out-of-the box JQuery integration, control over AJAX requests, improved event registration in browsers, support for large data sets in components, dependency management for client-side JavaScript libraries and experimental support for WebSockets.

Additional features include a customizable client-side API, improved feedback messages, correct packaging for OSGi compatibility and improved initialisation of plug-ins.

Apache Wicket 6.0 requires Java 6. This means that Wicket applications running on earlier Java versions meaning to upgrade, also need to upgrade their Java runtime. Wicket’s custom AJAX JavaScript library has been re-implemented using JQuery. This makes it easier to integrate JQuery plug-ins into Wicket applications. With the new AJAX implementation, it is possible for developers to provide their own version of JQuery should the need arise, or even to replace the whole Wicket client-side AJAX implementation.

Also, with the new and improved AJAX implementation, developers can alter any aspect of an AJAX request through AjaxRequestAttributes. For example, you can specify that the request should be executed using POST instead of GET, or that the AJAX request should be multi-part, etc.

Other Features

In addition, browser event registration replaces in-line events. Wicket now uses JavaScript event registration instead of in-line attributes for AJAX components. This enables multiple event listeners to be attached to a markup tag, cleans up the rendered markup considerably and reduces the amount of generated markup. And the IDataProvider now uses long instead of int. The IDataProvider<T> interface and implementations now use long instead of int for index and size parameters to better line up with the Java Persistence API and other persistency frameworks. This means that big data is now possible with Wicket.

Another change in version 6.0 is that ${label} replaces ${input} in feedback messages. Previous Wicket versions used the input that was provided by users in error messages when validations failed. This led to error messages like “1234a is not a valid number.” In Wicket 6 the feedback messages use the label of the invalid form component instead. You can set the label by calling setLabel() on the form component. If no label is provided, Wicket defaults to displaying the component identifier. This changes the error message to “Phonenumber is not a valid number.”

With Wicket 6.0, it is now much easier to create resource contributions with dependencies; for example, a JQuery plug-in can declare a dependency on JQuery and other resources such as embedded style sheets. Users of such resources don’t have to provide these dependencies themselves, and the dependencies are linked in the appropriate order. And packaged resources will use the minimised version automatically. When a minimised JavaScript resource is available (filename.min.js – add the .min part to the filename before the extension), Wicket will automatically use the minimised version when running in deployment mode, while using the non-minimised version for development mode.

Regarding OSGi-compatible packaging, Wicket’s packaging has been made compatible with OSGi bundles by moving some classes to different packages. The full list can be found in the migration guide. This makes it much easier to deploy Wicket applications in an OSGi environment. And regarding experimental WebSocket implementations, this release also includes two experimental WebSocket implementations: one using Atmosphere as a bridge for browsers and containers that don’t support WebSockets natively, and one for containers and browsers that have native WebSocket support.

The complete set of changes is available here in the migration guide.

How well do you know your operating systems? Take our quiz.

Darryl K. Taft

Darryl K. Taft covers IBM, big data and a number of other topics for TechWeekEurope and eWeek

Recent Posts

Is the Digital Transformation of Businesses Complete?

Digital transformation is an ongoing journey, requiring continuous adaptation, strong leadership, and skilled talent to…

7 hours ago

Craig Wright Faces Contempt Claim Over Bitcoin Lawsuit

Australian computer scientist faces contempt-of-court claim after suing Jack Dorsey's Block and Bitcoin Core developers…

8 hours ago

OpenAI Adds ChatGPT Search Features

OpenAI's ChatGPT gets search features, putting it in direct competition with Microsoft and Google, amidst…

8 hours ago

Google Maps Steers Into Local Information With AI Chat

New Google Maps allows users to ask for detailed information on local spots, adds AI-summarised…

9 hours ago

Huawei Sees Sales Surge, But Profits Fall

US-sanctioned Huawei sees sales surge in first three quarters of 2024 on domestic smartphone popularity,…

9 hours ago

Apple Posts China Sales Decline, Ramping Pressure On AI Strategy

Apple posts slight decline in China sales for fourth quarter, as Tim Cook negotiates to…

10 hours ago