views:

3837

answers:

4

I'm thinking about the possibility of using Spring MVC with Vaadin Framework. Are there any documented ways of making them play nicely together ? Also is it a good idea to use them together ? relating to performance; I'm going to run the app on a dedicated server.

To make my question a bit more clear, how can i return a modelandview from a Spring MVC Controller that wll render using Vaadin and can access all the model data.

+5  A: 

Spring support for Vaadin is quite new, but there has recently been a lot of talk about it on the forum and some have tested it. Seems to work. There is an article on the Vaadin wiki about it, and some threads on the forum talking about Vaadin + Spring integration:

Wiki: Spring Integration
Forum: can it mill toolkit be integrated with spring application
Forum: Spring integration problem
Forum: Working with Spring
Forum: Spring Integration

Jens Jansson
I'd reference the very complete SpringApplication:http://dev.vaadin.com/svn/incubator/SpringApplication/
rochb
I was also looking for Vaadin integration with Spring MVC. The answer you gave is integration with Spring (dependency injection etc). I don't see any of that... Thanks
Michael Bavin
I would also add: http://dev.vaadin.com/ticket/4132 and http://vaadin.com/forum/-/message_boards/message/112083 but it is basically about the same
dma_k
+1  A: 

See this thread on the Vaadin forum for my AutowiringApplicationServlet solution, including a sample WAR application.

Archie
A: 

Not sure if it is a prudent choice to integrate vaadin with Spring MVC. Its a waste. MVC is meant for typical page based web apps where as vaadin is more view state based like a desktop app. I would typically do a meet in the middle and have my business tier and data access layer in spring and use Vaadin as is.

dhrbo
A: 

agreed with dhrbo.

its not wise to use spring mvc, more so with webflow with vaadin. vaadin is another web-app framework.

if you want the idea of "spring mvc" in your vaadin project, integrate it with spring-core, beans and context. that way you can get a clear separation between controllers, ui (vaadin), and models (integrate with hibernate / orms)

gerarldlee