Overview of Vaadin


Vaadin
is a web application framework written in Java, and built on Google Web Toolkit (GWT).

The mission of Vaadin Ltd (the company that maintains Vaadin) is “developer productivity, end user experience, and scalability.” With Vaadin, you build web applications by writing Java code that runs on the server.

You don’t need to know any languages other than Java to build web applications.

Vaadin is open source, licensed under the Apache 2.0 license, which means you can download it, change it, and redistribute it to your heart’s content.

Now, let’s look at each of those in more detail.

Vaadin’s goals

Vaadin is clear in its goals and philosophy:

…to be the best possible tool when it comes to creating web user interfaces for business applications. It is easy to adopt, as it is designed to support both entry-level and advanced programmers, as well as usability experts and graphic designers.

And I’ve used Vaadin since 2012, and I can tell you, they deliver on this goal.

Though in all fairness, I have to say, heed the following warning: to use more than the most basic Vaadin features, you really need to understand how Vaadin does things. If you do, it will pay dividends, I assure you. If you don’t, you will bang your head in frustration (I also, speak from experience).

But don’t worry. Vaadin has lots of documentation to tell you everything you need to know about Vaadin (and great community support if you get stuck). More on that later.

Server-side architecture

Vaadin’s architecture uses JavaScript in the browser to communicate with your components on the server. It is built on Google Web Toolkit, but unlike a GWT application, Vaadin includes pre-built widgets that you use to construct your UI. Rather than writing your components in Java, which are then compiled into JavaScript by the GWT compiler, you simply use Vaadin classes to build the UI in Java code. At runtime, communication between your server-side Java code and the JavaScript running in the browser is handled automatically.

However, if the plethora of out-of-the-box components provided by Vaadin don’t meet your needs, Vaadin lets you create client-side widgets, which are compiled by the Vaadin Client Compiler (which is based on the GWT compiler) into JavaScript. You then write Java code to use the custom client component in your UI just like you would any other Vaadin UI component.

Pure Java

Vaadin is 100% Java. No JavaScript (or any other language for that matter) required.

Even if you decide to create your own client-side widgets, you still write Java code for them (just like with GWT), which the Vaadin client compiler turns into JavaScript to run in the browser.

Open source

As software licenses go, the Apache license, version 2.0 is liberal. Vaadin is “free and open source“, and released under the Apache 2.0 license.

That means you can download it and use it, say, for commercial purposes, make changes to it, and even distribute it when you’re done.

A brief history of Vaadin

Vaadin began as an adapter built on top of Millstone UI framework, version 3.0, which was released in 2002.

The framework went through several iterations, and in 2009 the name was changed to Vaadin, and version 6 was released.

The word Vaadin is Finnish for doe (female reindeer). Look carefully, and the Vaadin icon }> on its side resembles a reindeer (go on, try it).

How to use Vaadin

Like I said, I have used Vaadin since 2012, and I believe it is super easy to get started using it. You just need Maven and a Java compiler. Make it easy on yourself though, and bring an IDE to the party.

Though you don’t really need an IDE, it does make your life easier, since there is a probably a Vaadin plugin for your IDE.

Then you fire up the New Project wizard, go through it, and start writing code.

IDE plugin

The easiest way to get started is by using an IDE like Eclipse or NetBeans, and there are free plugins for both. If you have IntelliJ Ultimate, then Vaadin has a plugin for that too.

I use Eclipse as my IDE so I’ll describe getting started with Vaadin using the Eclipse plugin, but the general steps are pretty much the same for any IDE (under the covers they all create a Maven project).

New project wizard

First you create a new project in Eclipse. Vaadin has a new project wizard that walks you through creating a new project.

When the wizard finishes, you have a Maven project skeleton that includes everything you need to get started building your new web application project.

Writing code

Now you write code using the generated UI subclass, and you’re on your way. Next add Buttons, Drop-down selects, Text fields, and so on, until your application looks and functions the way you want it to.

Did I mention you only have to write code in Java? Thought so.

Check out the Vaadin sampler for a look at the collection of widgets Vaadin provides right out-of-the-box, along with sample code that shows you how to use them.

Help me, Vaadin

The Book of Vaadin

If you’re looking for a printed book, I present to you The Book of Vaadin.

Don’t worry, I get it. Sometimes I like to hold a book in my hands, mark it up with a highlighter, and so on.

The Vaadin website

The website has documentation for:

Support

The Vaadin community, in addition to a searchable post archive, lets you (once you register) ask questions if you run into trouble.

Whenever I posted a message, I never failed to receive a reply from Vaadin staff to my question with 24 hours, and 3/4 times it was from a project committer. How cool is that?

Conclusion

If you want to write web UIs, you have lots of choices. But if you want to write web applications that include a rich client UI, and a server-side, pure 100% Java model, I recommend you look at Vaadin.

Tell ’em I sent you.

 

More about Vaadin at developerWorks

Save

Save

Save

Join The Discussion

Your email address will not be published. Required fields are marked *