More Related Content
Similar to Building Java Desktop Apps with JavaFX 8 and Java EE 7 (20)
More from Bruno Borges (20)
Building Java Desktop Apps with JavaFX 8 and Java EE 7
- 1. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Building Java Applications with JavaFX 8 and Java EE 7 [CON2150]
Being a smart Java developer on both client and server-side
Bruno Borges
Principal Product Manager – Java Evangelist
Oracle Latin America
September, 2014
- 2. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
- 3. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Speaker
•Bruno Borges
–Principal Product Manager, Java Evangelist
–Oracle Latin America
–@brunoborges
–bruno.borges@oracle.com
- 4. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Program Agenda
JavaFX Desktop Applications Today
Exposing Server-side Data with Java EE 7
Java EE 7 APIs for Client-side
Putting all together
Summary
1
2
3
4
5
- 5. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
JavaFX Desktop Applications
- 6. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Usual Desktop Architecture
Source: Wikipedia
- 7. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
JavaFX Frameworks
OpenDolphin
- 8. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Java EE 7
Not just for Web Development
- 9. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
10
Java EE 7 APIs
JAX-RS 2.0
JSON-P 1.0
Web Socket 1.0
Servlet 3.1
JSF 2.2
EL 3.0
JSP JSTL
Bean Validation 1.1
Interceptors 1.2
CDI 1.1
Concurrency 1.0
JPA 2.1
JTA 1.2
EJB 3.2
JMS 2.0
Batch 1.0
JCA 1.7
JavaMail 1.5
JAX-WS
JAXB
- 10. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
11
Java EE 7 APIs for Exposing Data
JAX-RS 2.0
JSON-P 1.0
Web Socket 1.0
Servlet 3.1
JSF 2.2
EL 3.0
JSP JSTL
Bean Validation 1.1
Interceptors 1.2
CDI 1.1
Concurrency 1.0
JPA 2.1
JTA 1.2
EJB 3.2
JMS 2.0
Batch 1.0
JCA 1.7
JavaMail 1.5
JAX-WS
JAXB
- 11. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
JSR 356: Java API for WebSocket 1.0
@ServerEndpoint("/echo")
public class EchoServer {
@OnMessage
public void onMessage(Session session, String message) {
session.getOpenSessions() .forEach(s ->s.getAsyncRemote().sendText(message));
}
}
Annotated ServerEndpoint Example
- 12. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
JSR 339 – JAX-RS 2.0
@Path("/chat")
public class ChatServer {
@GET @Produces(“plain/text”)
@Consumes(“plain/text”)
public String echo(String message) {
return “Echoing via REST the message: “+message;
}
...
}
Annotated REST Service
- 13. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
JSR 372 – JavaServer Faces 2.3
•Build webpages and embed them in JavaFX applications with WebView
•Inject real Java objects by manipulating the DOM tree in WebView
–Do this instead of running Applets in webpages loaded on browsers
–Consider this for applications that require fast layout changes/evolution
•Part of your application is dynamically loaded from Web
–Or even the whole screen is loaded as web page?
- 14. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
15
Java EE 7 APIs for Client-side
JAX-RS 2.0
JSON-P 1.0
Web Socket 1.0
Servlet 3.1
JSF 2.2
EL 3.0
JSP JSTL
Bean Validation 1.1
Interceptors 1.2
CDI 1.1
Concurrency 1.0
JPA 2.1
JTA 1.2
EJB 3.2
JMS 2.0
Batch 1.0
JCA 1.7
JavaMail 1.5
JAX-WS
JAXB
- 15. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
16
Java EE 7 APIs To Be Used on Client-side
JAX-RS 2.0
JSON-P 1.0
Web Socket 1.0
Servlet 3.1
JSF 2.2
EL 3.0
JSP JSTL
Bean Validation 1.1
Interceptors 1.2
CDI 1.1
Concurrency 1.0
JPA 2.1
JTA 1.2
EJB 3.2
JMS 2.0
Batch 1.0
JCA 1.7
JavaMail 1.5
JAX-WS
JAXB
- 16. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
17
Java EE 7 APIs You Can Use but Likely Won’t...
JAX-RS 2.0
JSON-P 1.0
Web Socket 1.0
Servlet 3.1
JSF 2.2
EL 3.0
JSP JSTL
Bean Validation 1.1
Interceptors 1.2
CDI 1.1
Concurrency 1.0
JPA 2.1
JTA 1.2
EJB 3.2
JMS 2.0
Batch 1.0
JCA 1.7
JavaMail 1.5
JAX-WS
JAXB
- 17. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
18
Hybrid JavaFX Desktop Application – Architecture
Windows
Mac OS X
Linux
Oracle JRE
JavaFX
Application
Embedded Browser
Native UI Controls
Native Hardware Access
An HTML5 (remote/local) application
Native Controls in JavaFX with Themes and CSS Styles
Java libraries for hardware integration
Bundle the JRE with your application for native installers
One unified desktop application
- 18. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
JavaFX Hybrid Apps
Building Desktop Apps instead of Web Apps with Applets
Web Browser
Your Web Page * that requires applets
Applets
JavaFX Desktop “Hybrid” Application
Embedded Browser – JavaFX’s WebView
Native Features
- 20. Copyright © 2014, Oracle and/or its affiliates. All rights reserved. |
Adopt-A-JSR
•Want Java EE APIs to be aligned with Desktop/JavaFX Applications?
•Want a Java EE “Client Profile”?
Oracle Confidential – 23
glassfish.org/adoptajsr