Vaadin is Java framework for rapid development of highly interactive HTML5-based web applications. Because of server-driven nature Vaadin can easily be integrated with server-side Java EE features such as EJBs and JPA. During this speech we will look in detail on how multi-view Vaadin applications are built and coupled with Java EE based business systems using Context and Dependency Injection (CDI). Important topics covered within the session are the best practices of developing Model-View-Presenter (MVP) based Vaadin views as well as the as pointers and guidelines on how to use Vaadin with Java EE. Attending the speech does not require thorough understanding of Java EE or web technologies in general.
19. Benefits of MVP
Allows you to create unit and
integration tests for your UI logic
Abstracts your code to be more
reusable
Your UI logic is separated from
the UI implementation
Structuring
Vaadin
Application
21. Navigator
Support for bookmarkable views
and browser navigation
Automatic URI fragment
handling
Built-in switching between views
Views with
Vaadin
Navigator
22. public class DashboardView extends
CustomComponent implements
com.vaadin.navigator.View
Views with
Vaadin
Navigator
23. public class MyNavigatorUI extends UI{!
! @Override!
! Protected void init(VaadinRequest request){!
! ! Navigator navigator = new Navigator(this, this); !
! ! navigator.addView(“dashboard”, new DashboardView());!
! } !
}!
Views with
Vaadin
Navigator
28. public Navigator(UI ui, ComponentContainer container)
public Navigator(UI ui, SingleComponentContainer container)
public Navigator(UI ui, ViewDisplay viewDisplay)
Views with
Vaadin
Navigator
48. Context and
Scope
UIScope
@CDIUI and @CDIView are
@Stereotypes with @UIScoped
!
CDI events are sent within the
scope
!
MVP Presenters and UI specific
resources are marked as
@UIScoped