Vaadin + Spring vs. Vaadin + Grails?

I have a project that’s still in its infancy, and I’m trying to decide whether I would be better off building it using Spring, or Grails if I’m going to be using Vaadin.

Vaadin aside, I’d rather use Grails rather than Spring, so I can develop the application faster.

I don’t think there would be any performance or other differences between Spring and Grails when used with Vaadin, right?

The second question, then, is whether I’d rather use the Spring Vaadin Integration add-on:

https://vaadin.com/directory#addon/springvaadinintegration

or the Grails Vaadin plug-in:

http://grails.org/plugin/vaadin

It sounds like it’s more difficult to use normal Vaadin add-ons using Grails, but I’m not sure I planned to use many anyway. On the other hand, the Grails plug-in’s method of getting beans seems a lot easier and more elegant than the spring vaadin integration’s method of doing it. (That’s a whole lot of extra components I have to autowire as prototypes, and the info in the Grails Vaadin plugin makes me think the spring vaadin integration’s method of dealing with it will cause issues with session objects being serialized to disk.)

Then again, I could probably write something to do in Spring what that Grails Vaadin plug in does anyway, if I wanted to use Spring but not use the spring vaadin integration add-on.

Also, is there any way for me to know which will be more supported for the future? I’d imagine Spring, as Spring has a larger user base than Grails? But then Vaadin would probably be more likely to be used with new, smaller applications I would think, so maybe not?

Thoughts, anyone?

I was able to write a really simple class to get myself the spring application context when needed. It’s similar to what they have in the wiki

https://vaadin.com/wiki/-/wiki/Main/Spring%20Integration

but it uses Vaadin 7 and Spring 3.1, so it is a little different.

It just feels unnatural trying to annotate my Vaadin component classes using Spring. I want to be able to configure/initialize my components in their constructors, but also allow them to use my “backend” spring controllers when necessary. If my components themselves are spring beans, down the lowliest text field, then I can’t initialize them using context-dependent state with a constructor.

My class:

public class ApplicationContextHolder {

private ApplicationContextHolder() {
}

private static class ApplicationContextHolderHolder {
	public static final ApplicationContext SPRING_CONTEXT = WebApplicationContextUtils
			.getWebApplicationContext(VaadinServlet.getCurrent()
					.getServletContext());
}

public static ApplicationContext getSpringContext() {
	return ApplicationContextHolderHolder.SPRING_CONTEXT;
}

}

Of course another interesting question might be whether or not this is better or worse performance than the spring-vaadin-integration add-on. This looks more lightweight, but maybe it’s not?