Druudik
Druudik

Reputation: 1015

Vaadin and spring MVC

I am trying to build web app using Vaadin and spring MVC. It will be simple CRUD web app with some bonus functionality such as filtering. But I can not somehow come with the idea how to write such an app. I would like to make views using Vaadin and logic controll using spring MVC (request mappings etc.). Is there any way how can I return for example vaadin UI as the response for some request and it will be displayed ? Is it a good idea to combine those two ? I also might be missing some concepts of these frameworks so I would appreciate any suggestions how to build such an app.

Upvotes: 0

Views: 860

Answers (1)

Leif Åstrand
Leif Åstrand

Reputation: 8001

There is typically no point in combining Vaadin with Spring MVC.

Vaadin is about building a UI from server-side component instances, connecting data to it and reacting to user events, and all this from server-side Java. Vaadin abstracts away such web app concepts as request and responses - instead, you're constructing the initial UI or updating the UI as a result of user events.

Spring MVC on the other hand is all about identifying the right code to handle any given request, and how the response to that request should be written. Your UI is either static HTML that is generated as a response to some request, or JavaScript logic that sends requests for finding the data to show to the user.

You can still combine Vaadin with many other parts of Spring, e.g. Spring Data or Spring Security.

Upvotes: 2

Related Questions