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.
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.
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.
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.
SEC filing reveals that Elon Musk’s AI firm, xAI, has raised another $6 billion, as…
Two chip veterans named for Intel's board of directors, amid reports of expertise gap after…
Another major city in the United States is to receive Alphabet's Waymo ride-hailing service, with…
Facebook parent confirms its 23rd data centre in the US will be located in Louisiana,…
Federal regulator reportedly cites animal lab at Elon Musk's Neuralink for “objectionable conditions or practices”
President-elect Donald Trump nominates a new chairman to head the SEC, who is a noted…