Friday Jan 23, 2015

Vaadin, CDI and Java EE

While some people miss this point, one of the key goals of introducing CDI into Java EE was to easily enable integrating solutions outside the standard into the platform. I was recently reminded of this myself when I saw the announcement that Vaadin now officially supports CDI and Java EE.

Vaadin has long been a very compelling GWT based Java web framework. Although it lags behind the likes of JSF and Spring MVC in terms of adoption, it is extremely polished, it is very much aligned with the Java EE design philosophy and it has a very strong following that hasn't dissipated even with the rise of HTML 5 and JavaScript frameworks. Some folks have been using Vaadin with Java EE for a while using CDI as glue. I am glad both CDI and Java EE (including Java EE 7) is now officially supported by the Vaadin team itself. Like everything else Vaadin, the Java EE/CDI integration is extremely polished with a very nice tutorial explaining the features (see the link above). Another very good resource to get started with Java EE 7, CDI and Vaadin is the YouTube video below featuring Geertjan Wielenga of the NetBeans team and Matti Tahvonen of Vaadin. They use GlassFish and NetBeans for the demo.

Another great GWT based Java web framework worth checking out that works with CDI and Java EE is Errai.

Sunday Apr 04, 2010

Leveraging Servlet 3.0 - Authentication without Forms using GlassFish v3 and Vaadin

The new Servlet 3.0 specification in JavaEE 6 (JSR website, JavaOne Session, VC podcast) packs many new features, including Annotations, Dynamic Registration, Pluggability and Asynchronous Support.

Servlet 3.0 also includes quite a number of security improvements, as described by Kumar a couple of months ago in a Summary of new Security Features in Servlet 3.0. As Ron explains, one of the themes is that Java EE 6 and Servlet 3.0 Converge on Container Security Functionality, another is extra functionality, as explained by Nithya's 3 recent posts ([1], [2], [3]) covering http-method-omission element in web.xml, and the authenticate and login methods of HttpServletRequest.


A great example of the new functionality is Bobby's Authentication Without the Form where he modifies the RIA app in Creating Secure Vaadin Applications using JavaEE 6 to use the new login machinery and thus remove the need for extraneous JSP files.

Bobby's very complete post includes full source code and a nice Screencast; note it requires a recent build of GlassFish 3.0.1 due to a bug in 3fcs.

You may also want to refer to the JavaEE 6 javadocs (e.g. HttpServletRequest) and to the JavaEE 6 Tutorial: Part I (e.g. see Web Application Security) and Part II (requires free registration).

I had not noticed Vaadin previously but it seems to be gaining some popularity; its programming model is strongly server-centric and generates client-code via GWT. You can see a Online Sampler and it recently deployed a Component Directory; its KB has a number of articles on how to use it with GlassFish Server. They also announced deals recently with BlackBelt Factory and with our old Liferay friends.

While chasing the sources for this spotlight I bumped into a number of other Java-based RIA frameworks including: Echo and ZK as well as frameworks like Flex/BlazeDS, GWT, and the JSF-based frameworks we know.

Thursday Mar 04, 2010

GlassFish in February


The breadth and depth of the community is nicely illustrated by the variety of recent GlassFish-related blog posts. First, long time GlassFish supporter Masoud has a very detailed (it's actually a chapter of a book) OpenMQ from A to Z entry. On the operations side, Byron has a set of two posts on How to Run GlassFish V3 as a Service on Linux Ubuntu/Debian and a follow-up on using a non-root Service (see also thisGentoo variation by Jason), while Felipe's on provisioning GlassFish v3 resources with asadmin.

In the "nice words" category, Juliano has a nicely written "Java Enterprise Development - 2010 style" piece and Maksim says "GlassFish is becoming new de facto standard in Java applications. Development with new GlassFish v3 server and Eclipse now is really fast and comfortable. Server starts within a second, JEE6 is fully supported and hot code replacement works as it should.".

On the Java EE 6 and web tier side we have Bobby sharing a tool for exploring the platform, Aleksey discussing a "Grizzly 2.0: simple authentication example", while Justin puts GlassFish embedded to work with Wicket. Rene has a two-part article on running a Java EE 6 Client Application with Netbeans 6.8 and GlassFish V3 - Part 1: Creating a Basic Application and Part 2: Enhancing and Deploying the Application while Jacob goes through the simple setup to have GlassFish and Intellij 9 work together.

So while we wait for the GlassFish roadmap, we've seen one of the busiest month ever for February on the user mailing list and this recent message from the GlassFish Product Management "GlassFish, and by extension, Metro, are strategic Oracle products". Exciting times ahead!

Sunday Nov 08, 2009

Rich web frameworks for GlassFish v3 (ZK, Vaadin, ...)


Vaadin and ZK are both popular RIA frameworks that have been tested to work with GlassFish v3.

The JavaDude has a detailed blog on "ZK 3.6.3 with Netbeans 6.8 Beta on Glassfish V3" (this is the ZK release from a few days ago). It discusses developing with or without the ZK community plugin for NetBeans (which is mostly about adding meta-data to a Java EE project), creating ZUML pages with a component palette and deploying to GlassFish v3. This framework does Ajax and push with no JavaScript exposed to the developer and should be familiar to people used to Swing development. Bobby wrote a blog entry you may want to revisit.

Vaadin is another framework that keeps the developer away from JavaScript. It builds on GWT and has some interesting OSGi features that make it a good fit for the GlassFish v3 modular architecture. Vaadin's Petter has several tutorials showing the use of the GlassFish servlet 3.0 implementation but also how the Vaadin OSGi packaging allows for various options to avoid having to carry the framework with the application. It also discusses having multiple versions of the framework deployed in GlassFish v3. If you're interested, start with this "Deployment Options on GlassFish v3" article.

Both ZK and Vaadin are GlassFish Partners, just like WebORB, ICEFaces (now in Alpha and tested to work in the most recent promoted builds of GlassFish v3) and many others.