4. Credit
4 PoC is based on Henri Kerola's work from 2013
4 @henrikerola on twitter/github
4 https://github.com/henrikerola/play-vaadin-
integration (Vaadin 7 + Play 2.2)
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 4
5. Quick Demo
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 5
6. Vaadin 10 Request Types
1. Initial page load: GET /appContext/*
2. Resource Requests
3. Actions (Button clicks, etc.): POST /appContext/?v-
r=uidl&v-uidl=123
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 6
17. VaadinSession
4 abstraction over a generic session object (based on
HttpServletSession)
4 stores the state of the UIs elements (e.g. filled out
forms, etc.)
4 currently hold in-memory (Play!s CacheApi)
4 reference-id is stored in the Play!-Session (Cookie)
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 17
18. VaadinRequest
4 abstraction over an http request
4 basically the same as
javax.servlet.HttpServletRequest
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 18
19. VaadinResponse
4 abstraction over the response to an http request
4 basically the same as
javax.servlet.HttpServletResponse
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 19
20. DeploymentConfiguration
4 configuration of common properties
4 push-mode on/off
4 push-url
4 heartbeat-interval
4 resource paths etc.
4 gets serialized to the client
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 20
21. VaadinService
4 the heart of Vaadin
4 responsible for transforming the VaadinRequest ->
VaadinResponse
4 has different request-handlers configured (UIDL,
heartbeat, streams, etc.)
4 handles session-lifetimes & session-locking
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 21
23. Request/Response Lifecycle
1. we lookup/create a VaadinSession
2. we create a VaadinRequest + VaadinResponse
3. we supply the VaadinRequest + VaadinResponse to
the VaadinService
4. the VaadinService processes the Request and "fills"
the Response
5. transform the response to Play! and send it
24. Current limitations / TODOs / Tasks
4 Many TODOs in the code
4 Tests..
4 UI-Loading still manual / no-classpath scanning
4 integration into Play!s DI-System
4 create a Maven BOM equivalent as a SBT-Plugin
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 24
25. Current limitations / TODOs / Tasks
4 Only DevMode supported - not production ready!
4 finish the Atmosphere implementation in Play!
4 connect it to Vaadin -> Push-Integration
4 Play!s CSRF globally disabled
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 25
26. show me the code!
#Java #Vienna 17 September 2018: "#Vaadin 10 @ #PlayFramework" by Dominik Dorn @domdorn 26