Project

General

Profile

task #5285

Use Vaadin Spring Add-on

Added by Andreas Müller about 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
New
Category:
cdm-vaadin
Target version:
Start date:
Due date:
% Done:

0%

Severity:
normal

Description

Vaadin Spring Addon

The Vaadin Spring integration library helps you build amazing Vaadin based user interfaces on top of your high quality Spring based enterprise backend. Your UI classes become Spring managed beans, allowing you to autowire Spring based services directly into your UI code.

Links:

The features of Vaadin Spring include:

  • First class support for Spring Boot
  • Vaadin UI, View and component classes can be Spring managed beans and utilise the IoC container provided by Spring core
  • @SpringUI annotated classes are automatically published, no need to manually introduce a servlet
  • Vaadin Navigator support for View classes annotated with @SpringView *Scopes for Vaadin UIs and Views
  • Using the @Autowired annotation in Vaadin UI code
  • Push support

TODO:

THE BOOK OF VAADIN (2016-04-19) IS OUTDATED REGARDING VAADIN-SPRING!

Therefore the below conclusions may not be up to date.

  • Add vaadin-spring as maven dependency DONE
  • CdmVaadinConversationalServlet, StatusEditorUI, ConceptRelationshipUI, ConceptRelationshipUIRedirect, CheckTestUI, D3CTreeUI which are extending VaadinServlet must be modified (see Book of Vaadin, 12.18.4. Preparing Application for Spring) Since we need need multiple servlets with custom configuration see Section 12.18.8, “Deploying Spring UIs and Servlets” is important for us DONE also all subtasks below
    • CdmVaadinConversationalServlet: needs to extend SpringVaadinServlet
    • UI Classes:
      • The inner VaadinServlet classes of the UI Classes need to extend SpringVaadinServlet
      • the @VaadinServletConfiguration needs to be removed. Q: How can the widgetset be configured? (The other attributes are obsolete.) A: Use the @WidgetSet at the type level.
  • The @Scope annotation at the DetailWindow must be replaced by @ViewScope or by @UIScope if this annotation is really still relevant.
  • A couple of Views are evaluating the Spring Security Context. These classes are using the static method SecurityContextHolder.getContext() to get the context. This can most probably be replaced by ViewAccessControl or ViewInstanceAccessControl, which can restrict access to the view either before or after a view instance is created. (See Book of Vaadin 12.18.7. Access Control )
  • The CdmSpringContextHelper no longer needs to provide the Springbeans by the bean id when using vaadin-spring. Through spring-vaadin injection of spring beans works. Springbeans can be @Autowired. The CdmSpringContextHelper should be replaced by the Repository View addressed in #3320 - I attempted to refactor cdm-vaading accordingly but giving up on this, due to the complexity and variety of the 'design patterns' that have been used: cdm-vaadin|a735bbb

Related issues

Related to Edit - task #3320: Correct use of CdmApplicationDefaultConfiguration New 07/06/2016

Associated revisions

Revision fb70a9a7 (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #5285 adding vaadin-spring to the pom.xml

Revision 029f979a (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #5285 replacing VaadinServlet by SpringVaadinServlet

Revision fd9cf932 (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #5285 SpringUI configuration working
- @SpringUI added and configured
- theme harmonization as has as possible without causing glitches
- updating to vaadin 7.7.7

Revision ad9b6d23 (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #5285 addon structure for cdmlib-remote extensions like cdm-vaadin with autodetection

Revision a735bbbf (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #5285 attempt to avoid using the CdmSpringContextHelper
using DI to get rid of CdmSpringContextHelper, but got stuck due to the complexity and variety of the 'design patterns' that have been used.

History

#1 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

UPDATE:

Vaadin, the polyglot framework for building web apps with UI components, released version 1.1 of their Vaadin Spring project.

There are two new features related to Vaadin’s Navigator class and View interface:

  • A new SpringNavigator class
  • A new @SpringViewDisplay annotation

The SpringNavigator class “greatly simplifies the configuration of views” and the @SpringViewDisplay annotation “can be used to mark the target Vaadin component, where your views should actually be displayed.”

There were also a number of bug fixes including serialization of HTTP sessions using Vaadin Spring.

see https://www.infoq.com/news/2016/12/vaadin-releases-vaadin-spring?utm_source=infoqWeeklyNewsletter&utm_medium=WeeklyNL_EditorialContent_java&utm_campaign=01032017news

Also potentially interesting is the webinar mentioned in that news post: https://vaadin.com/blog/-/blogs/spring-boot-a-perfect-platform-for-a-vaadin-ui

#2 Updated by Andreas Müller almost 2 years ago

  • Assignee changed from Cherian Mathew to Andreas Kohlbecker

#3 Updated by Andreas Kohlbecker almost 2 years ago

  • Subject changed from Use Vaading Spring to Use Vaading Spring Add-on
  • Description updated (diff)
  • Status changed from New to In Progress
  • Target version changed from cdm-vaadin Next Major Release to Release 4.6

#4 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#5 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#6 Updated by Andreas Kohlbecker almost 2 years ago

  • Private changed from Yes to No

#7 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#8 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#9 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#10 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#11 Updated by Andreas Müller almost 2 years ago

  • Subject changed from Use Vaading Spring Add-on to Use Vaadin Spring Add-on

#12 Updated by Andreas Kohlbecker almost 2 years ago

  • Subject changed from Use Vaadin Spring Add-on to Use Vaading Spring Add-on
  • Description updated (diff)

#13 Updated by Andreas Kohlbecker almost 2 years ago

  • Subject changed from Use Vaading Spring Add-on to Use Vaadin Spring Add-on

#14 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#15 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#16 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#17 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#18 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#19 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#20 Updated by Andreas Kohlbecker almost 2 years ago

  • Related to task #3320: Correct use of CdmApplicationDefaultConfiguration added

#21 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#22 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#23 Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 4.6 to Release 4.7

#24 Updated by Andreas Kohlbecker over 1 year ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)