Request: Official Updated Reference Documentation integration Vaadin + Spri

Hello Developers

I am a Spring Developer.

I have a huge interest in Vaadin because it is based on Java and I can take in advantage the IDE.
With Vaadin, I can practically drop the problems of the web developing about js, portability etc (even when I work with jQuery). I need to work with Java Type safe and let use the IDE to take in advantage refactoring.

I did a research on your post/forums and Google

I have the following links:

I could not find a tutorial about:

(1) Integration about Vaadin with Spring Framework (Yes, I know, there is with Spring Boot - 2nd link from above but seems out of date) but I need with Spring Framework due academic purposes. From the previous first link, it is based on Maven and using an archetype. I work with Gradle and I need create a project from the scracth where:

  • I can add manually my own dependencies for Spring and Vaadin, and of course for others such as Hibernate Logback etc…
  • I can create my own @Configuration + @Bean (manually) to do in peace the desired integration of these two frameworks.

(2) Examples about Vaadin + Spring MVC where Vaadin be able to be used by Spring’s @Controller how a view (JSP, HTML - even how Thymeleaf) in of course the @Controller can call in peace a @Service and this one a @Repository, therefore remain working with the pattern MVC. In some point or way Vaadin should be consider like a View from Spring. But according to some screencasts Vaadin works in other way.

I hope the Vaadin developers can read this and give me the best solution

Thanks in advance

Best Regards

-Manuel

Hi Manuel,

Our Spring examples are rather Boot centric ATM, like is Spring’s own examples :slight_smile: I hope you can take an advantage of Boot at some point, I really like how it take away a lot of configuration that used to be a trademark of Spring.

I haven’t looked into our wiki articles, if they are outdated or lack some info, they should definitely be updated. However, I believe in power of examples. Here is rather simple apps stub you can use as a basis with plain Spring and Vaadin:
https://github.com/mstahv/vaadin-spring-noboot

The above don’t use the latest Vaadin version, but just upgrade the vaadin-bom module version to 7.6.4 and you have all the latest and greatest goodies.

With Vaadin you probably don’t wan to use Spring MVC’s @Controller, but you can of course apply patterns like MVC or MVP for your UI code. Especially in larger apps, with lots of developers and lots of tests, it is a good approach to take. There are couple of MVP examples, both with Spring and with plain Java available (with github/google). See for example
this article
and
this helper extension
.

We are also working on some examples and helper libraries how you can add Vaadin built parts into your existing Spring MVC apps, but I guess this was not the thing you were looking for.

cheers,
matti

BTW. The new Vaadin Docs site also has a part that discusses
the Vaadin Spring library
.

Hello Matti

Thanks a lot by your reply!

Our Spring examples are rather Boot centric ATM, like is Spring’s own examples :slight_smile:
I hope you can take an advantage of Boot at some point
I know use Spring Boot, is really impressive, but like I said, just curious If I am able to do manually the configuration directly with Spring Framework just for academic purposes…

I am ok with this, for me is not critical. Just by research purposes

I haven’t looked into our wiki articles, if they are outdated or lack some info, they should definitely be updated.
“Seems” they are out of date…

However, I believe in power of examples.
I think both are important, first the documentation to get the bases and then the examples.

Here is rather simple apps stub you can use as a basis with plain Spring and Vaadin:
https://github.com/mstahv/vaadin-spring-noboot
Thanks! I am going to do a research from there…

With Vaadin you probably don’t wan to use Spring MVC’s @Controller,
Little worry about that…

but you can of course apply patterns like MVC or MVP for your UI code
Something I’ve watched about MVP in some screencast. I am going to check the documentation… to learn about that

There are couple of MVP examples, both with Spring and with plain Java available (with github/google).
See for example this article and this helper extension.
Thanks so much!

We are also working on some examples and helper libraries how you can add Vaadin built parts into your existing Spring >>MVC apps, but I guess this was not the thing you were looking for.
Interesting, a migration, let me know when the links be available too. I think it would be very valuable about how MVC goes to MVP…

Note: wondered how the Spring’s Formatters would be adapted in Vaadin. Same appreciation about validation about JSR 349 to show the error messages detected when the Spring’s @Controller with the @Valid is trigger and thanks to the Spring form error tags the error messages are shown for each field.

BTW. The new Vaadin Docs site also has a part that discusses the Vaadin Spring library.
Thanks a lot!

Again thanks by your valuable support

Best Regards

-Manuel