Backend for Vaadin

Hi,

I need help :slight_smile: For over a week I am struggling with a problem of choosing the best architecture for my new project.

I want to use Vaadin as my UI layer but I can’t decide on the backend.

Basically I need:

  • persistance layer
  • seciurity - authentication and authorization
  • dependency injection

with Tomcat as my application server.

So, possible combinations for me are:

  • Vaadin + Grails
  • Vaadin + Seam
  • Vaddin + WebServices of some kind

I have seen wiki pages about integrating Vaadin with all that solutions but they all seem a little forced to me and they all seem to have similar problems - with contexts, transactions, dependency injection by helper classes and so on…

Last but not least I would like to have good IDE integration with code completition. I tried Grails plugin yesterday and it was odd to write Vaadin code in funny language (Groovy) without code completition, putting all “imports” in manually and without all the “little things” that IDE makes for you then you are programming in Java :slight_smile:

Any suggestions what should I use? I really can’t decide on my own…
I need a proven backend solution for beautiful Vaadin frontend :slight_smile:

With Tomcat you already can use declarative security and use JPA for the persistence layer, so I don’t think you really need anything else. If you move to a full EE app server instead of Tomcat (there are a couple free ones) then it makes the security, persistence, and DI even easier.

I have two blogs that may help. The first is on using Vaadin as a front end to a full EE application (the point being that I think it’s simpler than other UI frameworks). The second is specifically on security and how you can use EE 6 security with Java-based frameworks like Vaadin instead of using form-based login. The site that hosted the screen casts are gone so you can’t see those, but all the code is still there. Since you know the Vaadin part already, you could skip the blog text and just check out the zip files with the source code. I hopefully commented everything so it’s easy to follow:


http://blogs.sun.com/bobby/entry/a_simple_ui_for_exploring


http://blogs.sun.com/bobby/entry/authentication_without_the_form

If you stick with Tomcat, there was another post recently on the forum about using JPA within Tomcat. That’s really all you need to connect your Vaadin app to the database. Though I think the full EE stack is simpler. :slight_smile:

Cheers,
Bobby

Hi,
in my project i use the following frameworks:

  • Spring core for the IOC (i inject every part of the UI, views and controllers with annotations - mainly @Configurable and @Component)
  • Spring security
  • Ibatis for the persistence layer
  • Spring 3 rest support for accessing to some services

Everrything works like a charm, mainly because Spring is very easy to integrate with Vaadin.

Hi Jakub,

It might be a bit late, but better later than never )

I would suggest to have a look at the CUBA Platform (
https://www.cuba-platform.com/
). This is full-stack framework, that employes Vaadin for the generic user interface. It convers exactly what you are searching for and even more. So, you will have percistence, security subsystem (both, role and row based), logs of entity changes, EAV and other common features for enterprise applications.

Just go through the quick start to see how it works
https://www.cuba-platform.com/quickstart
.

Regards,
Yuri