1 / 51

Enterprise Vaadin

Enterprise Vaadin. Vaadin7 in the enterprise world. Dominik Dorn Vienna University of Technology Research Group for Industrial Software (INSO). Dominik Dorn Researcher & Software Engineer JUG leader, Open Source and productivity guy ...always trying out the “new&cool” stuff. About me.

chaim
Télécharger la présentation

Enterprise Vaadin

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Enterprise Vaadin Vaadin7 in the enterprise world. Dominik Dorn Vienna University of Technology Research Group for Industrial Software (INSO)

  2. Dominik Dorn Researcher & Software Engineer JUG leader, Open Source and productivity guy...always trying out the “new&cool” stuff... About me...

  3. Creating scalable “desktop like” enterprise web-apps is hard :/ … in my opinion …

  4. it is especially hard to... ...create a consistent, accessible and functionalUser Interface & User eXperience … in my opinion …

  5. it is hard to... ...create web-based “rich clients” that allow to scale to a lot of concurrent users. … in my opinion …

  6. It is hard to... ...scale over multiple development teams at once to concurrently work on finishing user stories … in my opinion …

  7. Vaadin7helps us to solve ([some|most] of) these problems … in my opinion …

  8. The case-study • Austrian government agency • Multiple concurrent “releases” with different scopes of functionality • Tight schedule & multiple (development) teams • Some handicapped (visual impaired) users • > 5k concurrent users • Clustered environments • Deployment on IBM WAS 8 • Development on TomEE 1.5.2

  9. The task Allow for a high level of concurrent development Provide a great user experience Keep the code base well structured, maintainable & testable Scale to more than 5000 concurrent users

  10. 5 steps proven practices to success ...that worked quite well for us....

  11. Create UI & UX mockups Step 1 - UI

  12. Step 1 - UI Keep in mind: - try to create a (more or less) stateless webapp - work with the people that will use the app (req. eng.) - focus on functionality & usability first → no pixel shifting

  13. Step 1 - UI Tools Balsamiq mockups → User stories → Developer TasksPhotoshop → CSS/SCSS (IntelliJ / Firebug)

  14. Step 1 - UI

  15. Step 1 - UI

  16. Step 1 - UI

  17. Step 1 - UI

  18. Keep your code base clean & structured by grouping functionality common use cases, releases and business entities Step 2 – code structure / architecture

  19. Step 2 – build architecture • Maven 3 based project • Common & base functionality: core • Helpers: util • Subprojects: → be, api, fe, fe-submodules • Parent projects for be, api, fe → declaring common properties, dependencies, plugins, etc.

  20. Step 2 – architecture

  21. multi module architecture Step 2

  22. Keep your code clean, well structured and testable by applyingthe MVP Design Pattern & TDD using Mockito & JUnit/TestNG Step 3 – maintainability

  23. Step 3 – maintainability – Model-View-Presenter

  24. Step 3 – maintainability – Model-View-Presenter <T extends AbstractPresenter> <T extends AbstractView>

  25. MVP

  26. Step 3 - MVP

  27. Step 3 – MVP – testing with mockito

  28. 1st Rule: Keep your sessions thin!!!! Step 4 – scalability / clustering

  29. Step 4 – scalability / clustering

  30. Step 4 – scalability / clustering

  31. Session gets huge quickly: ~700KB ~> 3.5MB ~> 15MB Delta Replication broken (Tomcat/WAS) → Full Replication req. Pluggable Session Storage in the works (Vaadin #9782) (also see: http://stackoverflow.com/questions/14797535/memory-footprint-for-large-systems-in-vaadin ) Step 4 – scalability / clustering

  32. 3 recommendations 1. Use stateless views with Class based Navigator (where possible) 2. Load data into the components when they are attached to a visible component. Override the components .attach() method 3. Remove data from components when they are not used in the visible part of the UI anymore. Override the components .detach() method. (also see: http://stackoverflow.com/questions/8464337/managing-large-sessions-using-gae-and-vaadin ) Step 4 – scalability / clustering

  33. Leverage JavaEE 6/7 to be more productive! Step 5 – Productivity – JavaEE

  34. Use CDI & EJBsfor Dependency Injection & Transaction handling Step 5 – Productivity – JavaEE

  35. Step 5 – Productivity – JavaEE

  36. Step 5 – Productivity – JavaEE

  37. Step 5 – Productivity – JavaEE: JMS & Vaadin @Push JMS Producer inspired by Antonio Goncalves http://antoniogoncalves.org/2011/09/25/injection-with-cdi-part-iii/

  38. Step 5 – Productivity – JavaEE: JMS & Vaadin @Push

  39. Step 5 – Productivity – JavaEE: JMS & Vaadin @Push

  40. Step 5 – Productivity – JavaEE: JMS & Vaadin @Push

  41. Step 5 – Productivity – JavaEE

  42. Productivity enhancers

  43. Productivity enhancers – JRebel reloads classes → fast development cycles → Saves HOURS of work-time! Integration for CDI, Vaadin + Vaadin-CDI, TomEE, Glassfish, etc. Comes bundled with Vaadin Pro Edition.

  44. Productivity enhancers – TestBench

  45. Built on Selenium Includes special support for Vaadin → saves time!( including PhantomJS ) Commercial add-on: Single License or Pro Account Productivity enhancers – TestBench

  46. Productivity enhancers – TestBench Support for JBehave built-in! Meta: Search Customer by social security number Story: As a user, the following is given I want to load a page, so I can search for a Customer by ssn Scenario: The user opens the page and sees an empty result list A search page for the user 02t0801 is given If I do nothing Then I see in the “info label” the following text: 'Please enter search criteria.'

  47. Productivity enhancers – TestBench Support for JBehave built-in! Meta: VSNR Suche Erzählung: Als Benutzer gilt folgendes für mich Ich möchte die Seite laden können, damit ich nach VSNR suchen kann. Szenario: Der User öffnet die Seite und sieht eine leere Ergebnisliste Gegeben sei eine laufende Beauskunftungsseite fuer den User 02t0801 Wenn ich nichts tue Dann sehe ich im Info Label folgenden Text: 'Führen Sie bitte eine Suche durch.'

  48. Productivity enhancers – TomEE Maven Plg & “provided” <build>... <plugin> <groupId>org.apache.openejb.maven</groupId> <artifactId>tomee-maven-plugin</artifactId> <version>1.0.0</version> <configuration> <tomeeVersion>1.5.2</tomeeVersion> <libs> <lib>com.vaadin:vaadin-server:${vaadin.version}</lib> … </libs> …. mvn clean package tomee:run

  49. Recap • Requirements analysis • Mockups → User Stories • TestBench tests • Structure your code • Submodules, Backend / Frontend separation • MVP & TDD, CDI/DeltaSpike • Keep it scalable • Thin sessions, Class-based views • Iterate fast • JRebel, TestBench, TomEE Maven Plugin

  50. Credits Help with CDI Mark @Struberg Marcus Büttner Help with Sessions Christoph Ledl Ronald Steininger Help with TestBenchDaniel Jahre @daja77 Code structure / Architecture Thomas Artner @StroblStefan

More Related