Web Applications of the future: Combining JEE6 & JavaFX

10,855 views
10,614 views

Published on

This presentation shows the most important web related new futures in JEE 6, and how to combine JEE 6 and JavaFX to create interesting applications. Topics such as JAX-RS, JSF 2.0, EJB lite and JavaFX/JavaScript integration is discussed.

Published in: Technology
1 Comment
3 Likes
Statistics
Notes
  • I find it very interesting, though I used it for JSF!!
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
10,855
On SlideShare
0
From Embeds
0
Number of Embeds
160
Actions
Shares
0
Downloads
545
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

Web Applications of the future: Combining JEE6 & JavaFX

  1. 1. Developing Web Applications of the future - Combining JEE 6 & JavaFX
  2. 2. Goal of this talk New features in JEE 6 Mixing JEE 6 and JavaFX A look into the near future
  3. 3. About me Paul Bakker EJB 3 Trainer Info Support JSF NLJUG speaker Seam JavaFX Java Magazine author Spring Hibernate Flex
  4. 4. Outline JavaFX web applications JAX-RS RESTful services Connecting JavaFX to services
  5. 5. One minute JavaFX intro Sun’s RIA platform Competes with Flex, Flash and Silverlight A new language JavaFX Script Declarative UI programming
  6. 6. JavaFX key features Expressiveness Easy component creation Animation Java integration Media support Write once, run anywhere...
  7. 7. Current problems No components! No layout managers No selectable text Tooling
  8. 8. JEE 6 ingredients Profiles EJB 3.0 => 3.1 (Lite) JSF 1.2 => 2.0 JPA 1.0 => 2.0 JAX-RS => New! WebBeans => New!
  9. 9. Using JEE 6 GlassFish V3 EJB3.1, JSF 2.0 and JAX-RS No WebBeans, Servlet 3.0 and JPA 2.0 yet Only WAR deplyment
  10. 10. JEE 6 & JavaFX Browser Desktop JavaScript JavaFX JavaFX HTML HTTP Server JAX-RS JSF EJB 3 JPA
  11. 11. 2.0 highlights JSF Facelets Annotation support e.g. @ManagedBean AJAX support Resource loading Project Stages
  12. 12. Integrating JSF & JavaFX JSF renders to HTML Use <applet> tag JavaScript for communication All text oriented functionality => JSF All flashy stuff => JavaFX
  13. 13. Full page JavaFX Too limited at this moment Navigation, bookmarks, scrolling... Will be an option in future versions Ok for Swing / Desktop
  14. 14. JavaFX brower integration AppletStageExtension Browser navigation Script evaluation Call JavaScript methods
  15. 15. JavaFX calling JavaScript
  16. 16. Server url JavaFX uses web services to connect to the server Do not hardcode the server url Use FX.getParameter
  17. 17. JSF page initialization Use @ManagedProperty to inject a request parameter Use @PostConstruct to initialize values
  18. 18. JFXtras Layout Managers MigLayout port Compontents Dialogs Unit Testing http://code.google.com/p/jfxtras/
  19. 19. MigLayout example
  20. 20. JEE 6 & JavaFX Browser Desktop JavaScript JavaFX JavaFX HTML HTTP Server JAX-RS JSF EJB 3 JPA
  21. 21. JAX-RS Expose RESTful web services Annotation based Easily combined with EJB and JPA But no @EJB injection (yet)
  22. 22. RESTful intro Web style web services Resources over HTTP Uniform Interface Connectedness Addressability Statelessness
  23. 23. JAX-RS @Path Resource class root path A sub-resource
  24. 24. JAX-RS @GET Method handling GET requests @Produces Content type supported @PathParam Extract value from URI template
  25. 25. Using JPA Use out-of-container JPA confguration Use EJB (Lite) Session Beans Lookup Global JNDI namespace @EJB Use Session Bean as resource Might not be in JEE 6
  26. 26. JEE 6 & JavaFX Browser Desktop JavaScript JavaFX JavaFX HTML HTTP Server JAX-RS JSF EJB 3 JPA
  27. 27. lite EJB 3 No interface required Runs in the web profile No Message Driven Beans No remote interface No Timer service No EJB 2.x compatibility
  28. 28. EJB 3.1 lite Session Bean
  29. 29. Global JNDI namespace A portable namespace java:global[/<app-name>]/<module-name>/ <bean-name>
  30. 30. Using Global JNDI MobileShopServices.war
  31. 31. Converting Resource Entity Request Converter XML Response JAXB
  32. 32. Converting Entities Each Entity has two converters A single Entity converter A list converter A JAXB annotated wrapper class
  33. 33. Converter example
  34. 34. JavaFX web service API JavaFX style HTTP calls Pull style parsing XML and JSON supported REST only (no SOAP)
  35. 35. JavaFX Production Suite Designer => Developer Workflow
  36. 36. Production Suite Workflow Place all Replace Photoshop elements on dummy scene elements Add Add action animation handlers
  37. 37. More about this June 29: Summer Class Bert Ertman & Paul Bakker
  38. 38. More about this June 29: Summer Class JSF 2.0 Servlet 3.0 EJB 3.1 (lite) JPA 2.0 WebBeans JAX-RS JavaFX (including new beta)

×