Java EE 7 from an HTML5 Perspective, JavaLand 2015

Edward Burns
Edward BurnsSoftware Stylist at Oracle
JAVA EE 7
FROM AN HTML5 PERSPECTIVE
Ed Burns @edburns and Oliver Szymanski @source_knights
2
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.
Copyright 2015 Ed Burns and Oliver Szymanski
Speaker Qualifications – Ed Burns
Copyright 2015 Ed Burns and Oliver Szymanski
3
¨  Involved with JSF since 2002
¨  JSF Spec lead since 2003
¤  Most fun part of the job: cleanly integrating other
people’s great ideas into JSF (and hopefully improving
on the in the process)
¤  Not an expert in applying JSF in practice
¨  Servlet Spec lead since 2014
Speaker Qualifications – Ed Burns
Copyright 2015 Ed Burns and Oliver Szymanski
4
¨  Author of four books for McGraw-Hill
Speaker Qualifications – Oliver Szymanski
Copyright 2015 Ed Burns and Oliver Szymanski
5
¨  Independent Java Enterprise Consultant
¨  Specialty in the Financial Sector
¨  JUG Founder Erlangen/Nuremberg Germany
Speaker Qualifications – Oliver Szymanski
Copyright 2015 Ed Burns and Oliver Szymanski
6
¨  Contributing author for
¤  Heise Developer Channel
¤  S&S Entwickler
¤  Java aktuell
¤  Java Magazin
Meet the Family
Copyright 2015 Ed Burns and Oliver Szymanski
7
Meet the Family
¨  Java API for JSON
Processing
¨  Java API for
WebSocket
¨  Batch Application
¨  Concurrency Utilities
¨  Caching
¨  Java Persistence
Architecture
¨  …
¨  Java API for REST
¨  JavaServer Faces
¨  Servlets
¨  Expression Language
¨  Java Messaging
Service
¨  Contexts and
Dependency Injection
¨  Java Transaction
Architecture
8
Copyright 2015 Ed Burns and Oliver Szymanski
Meet the HTML5-Friendly Family
¨  Java API for JSON
Processing
¨  Java API for
WebSocket
¨  Batch Application
¨  Concurrency Utilities
¨  Caching
¨  Java Persistence
Architecture
¨  …
¨  Java API for REST
¨  JavaServer Faces
¨  Servlets
¨  Expression Language
¨  Java Messaging
Service
¨  Contexts and
Dependency Injection
¨  Java Transaction
Architecture
9
Copyright 2015 Ed Burns and Oliver Szymanski
HTML5Why all the fuss?
More cute logos at
http://www.w3.org/html/logo/
HTML5Why all the fuss?
PAST AND PRESENT
SERVER
Java EE 7 from an HTML5 Perspective, JavaLand 2015
Classification
¨  Why?
¤  Multiple Computers
¤  Interconnections Between Them
¤  Shared State Among Them
¨  Today's production Web apps are extremely
complex distributed applications.
A Web App is a Distributed App
Yeah, So What?
¨  Why does this classification matter?
¤  Because History Matters
¨  To understand the current state of web applications,
we must go back to the history of distributed
applications, and of the Internet itself.
Java EE 7 from an HTML5 Perspective, JavaLand 2015
HTML5
¨  Remember all the fuss about Ajax in 2006?
¤  Asynchronous
¤  JavaScript
¤  And
¤  XMLHttpRequest
What’s in a name?
HTML5
¨  Remember all the fuss about Ajax in 2006?
¤  Asynchronous
¤  JavaScript
¤  And
¤  XMLHttpRequest
¨  Ajax is a programming technique, not a single
technology
What’s in a name?
HTML4
¨  What do people mean when they say HTML4?
¤  IE6
¤  Not very high performance JavaScript
¤  Lots of browser tricks
¤  Use of native plugins is common
¨  HTML4 is seen as a single technology
What’s in a name?
HTML5
¨  What do people mean when they
say HTML5?
¤  “Modern” browsers
¤  A gigantic collection of related
technologies
n  Markup
n  Offline storage
n  EventSource
n  DOM
n  JavaScript
n  CSS3
What’s in a name?
n  Canvas
n  Input controls
n  Web components
n  Application Cache
n  WebSocket
n  JSON
n  Geolocation
n  XMLHttpRequest
Level 2
HTML5
¨  The rise of Chrome and the end of polyfill
¨  Standards have finally won
¤  How good is your standards body?
n  W3C, ECMA, IETF
¤  HTML5: Microsoft, Google, Apple, what about Mozilla?
¨  Aside:
¤  Is HTML5 a bloated specification?
¤  Is JavaEE a bloated specification?
¤  What is bloat? A indicator of how old something is.
¤  http://mir.aculo.us/2010/10/19/standards-bloat-and-
html5/
Is it really a big deal?
HTML5
¨  The death of the browser plugin: April 2010
http://www.apple.com/hotnews/thoughts-on-flash/
¨  Where does the tension remain?
¤  Take advantage of the power in the client
¤  Minimize the complexity of distributing and maintaining
the software
Is it really a big deal?
HTML5
¨  HTML5 is a marketing term that describes a way of
building the UI for a distributed system.
¤  UI processing task resides entirely in the browser
Putting it in context
What Makes a Distributed App
¨  Finding the best allocation of processing tasks to
processing nodes
¤  User Interface
¤  Domain Logic
¤  Application Logic
¤  Data Persistence
¤  Communication
¤  Reliability, Security
What Makes a Distributed App
¨  Finding the best allocation of processing tasks to
processing nodes
¤  User Interface
¤  Domain Logic
¤  Application Logic
¤  Data Persistence
¤  Communication
¤  Reliability, Security
UI Considerations
¨  The UI is the hardest part to get right
¨  The technology for building the UI is changing very
rapidly, and will continue to change for the
forseeable future
¨  The technology for the other aspects of application
development is less volatile, more mature.
¨  The major software stack and device vendors are
competing on the basis of their UI technology, as the
gateway to the rest of their stack
HTML5 Friendly Markup
¨  This is a JSF page
The best part of Wicket comes to JSF
<!DOCTYPE html>!
<html xmlns="http://www.w3.org/1999/xhtml"!
xmlns:myNS="http://xmlns.jcp.org/jsf”>!
<form myNS:id="form">!
<input name="textField" type="text" myNS:value="#{bean.text1}" />!
<input type="submit" myNS:id="submitButton" value="submit" /> !
<p>submitted text: #{bean.text1}.</p>!
</form>!
</html>!
!
HTML5 Friendly Markup
¨  JSF Views are written in a View Declaration
Language (VDL).
¨  The standard Facelet VDL is an XML application with
two kinds of elements
¤  HTML Markup
¤  JSF Components
¨  HTML Markup is passed through straight to the
browser
¨  JSF Components take some action on the server,
during the lifecycle`
Let’s get back to basics
HTML5 Friendly Markup
¨  Before JSF 2.2
¤  JSF tags hide complexity of underlying HTML+script+css
+images
¤  JSF “Renderer”:
n  encode: markup to browser
n  decode: name=value from browser
<html>…
<my:colorPicker value=“#{colorBean.color2}” />
<my:calendar value=“#{calendarBean.date1}” />
</html>
¨  Context: Missing feature in browser? Write a JSF
component.
Let the elegance of HTML shine through
HTML5 Friendly Markup
¨  With JSF 2.2
¤  Pure HTML+script+css+images in the JSF page
¤  JSF Renderer handles decode from browser
n  Leverage the strength of the JSF lifecycle
n  Leverage the expressiveness of HTML5
<html>…
<input type=“color” jsf:value=“#{colorBean.color2}”/>
<input type=“date” jsf:value=“#{calendarBean.date1}” />
</html>
¨  Context: New feature in browser? Use “pass through
elements”
Let the elegance of HTML shine through
JSR 341 Expression Language 3.0
¨  First introduced in JSTL 1.0 in 2004
¨  Moved to JSP 2.0 in 2006
¨  Unified with JSF 1.2 in JSP 2.1 in 2006
¨  JSR 341: first independent specification in 2013
¨  Used in JSF, JSP and CDI
¨  Key differentiator between JavaServer and non-
JavaServer stacks
Overview
JSR 341 Expression Language 3.0
¨  Lambda expressions
¨  Support for stand-alone environments
¨  New operators
¨  Static field and method reference
¨  Custom type converter
¨  Collection construction
¨  Collection operations
New Feature Summary
JSR 341 Expression Language 3.0
¨  Same syntax as JavaSE 8, but available in EE 7
¨  Behaves like an anonymous function
¨  Body consist of an EL expression
¨  Full access to EL environment in the body
Lambda expression
x -> x+1!
(x,y) -> x+y!
() -> 64!
JSR 341 Expression Language 3.0
¨  The lambda is evaluated and discarded
Lambda expression: immediate evaluation
(x -> x+1)(10)! !à 11!
((x,y)->x+y)(3,4) !à 7!
(()->64)() ! !à 64!
JSR 341 Expression Language 3.0
¨  JSF Facelet page
<h:dataTable rendered=!“#{user.loggedIn}”

value="#{library.books.stream().

filter(b->b.category == 'Comedy').

map(b->b.title).toList()}" var="book">!
<h:column>#{book.title}</h:column>!
</h:dataTable>!
Collection operations: examples
What Makes a Distributed App
¨  Finding the best allocation of processing tasks to
processing nodes
¤  User Interface
¤  Domain Logic
¤  Application Logic
¤  Data Persistence
¤  Communication
¤  Reliability, Security
Java API for JSON Processing 1.0
¨  API to parse and generate JSON
¨  Streaming API
¤  Low-level, efficient way to parse/generate JSON
¤  Provides pluggability for parsers/generators
¨  Object Model
¤  Simple, easy-to-use high-level API
¤  Implemented on top of Streaming API
¨  Binding JSON to Java objects forthcoming
Overview – JSR 353
Java API for JSON Processing 1.0
¨  Parses JSON in a streaming way from input sources
¤  Similar to StaX’s XMLStreamReader, a pull parser
¨  Created using
¤  Json.createParser(…)!
¤  Json.createParserFactory().createParser(
…)!
¨  Parser state events
¤  START_ARRAY, END_ARRAY, START_OBJECT,
END_OBJECT, …
Streaming API
Java API for JSON Processing 1.0
¨  JsonObject/JsonArray – JSON object and
array structures
¤  JsonString and JsonNumber for string and
number values
¨  JsonBuilder – Builds JsonObject and JsonArray
¨  JsonReader – Reads JsonObject and JsonArray
from input source
¨  JsonWriter – Writes JsonObject and JsonArray
to output source
Object Model API
Java API for RESTful Web Services
2.0
¨  Client API
¨  Message Filters & Entity Interceptors
¨  Asynchronous Processing – Server & Client
¨  Hypermedia Support
¨  Common Configuration
Overview – JSR 339
Java API for RESTful Web Services
2.0
Server-side Async
@Path("/async/longRunning")!
public class MyResource { !
!
@GET!
public void longRunningOp(@Suspended AsyncResponse ar) {!
!
ar.setTimeoutHandler(new MyTimoutHandler());!
ar.setTimeout(15, SECONDS);!
!
Executors.newSingleThreadExecutor().submit(new Runnable() {!
public void run() { !
…!
ar.resume(result);!
}!
});!
}!
}!
Java API for RESTful Web Services
2.0
Server-side Content Negotiation
@Path("/")

class ProductResource {!
    @GET

    @Produces({"text/xml;qs=0.75", "application/json"})

    public Product[] getProducts() {

        . . .

    }

}!
Java Message Service 2.0
¨  Less verbose
¨  Reduce boilerplate code
¨  Resource injection
¨  Connection, Session, and other objects are
AutoCloseable
¨  Requires Resource Adapter for Java EE containers
¨  Simplified API in both Java SE and EE
Overview – JSR 343
Java Message Service 2.0
¨  Make JMS objects implement AutoCloseable!
¤  Connection !
¤  Session !
¤  MessageProducer !
¤  MessageConsumer !
¤  QueueBrowser!
¨  Requires Java SE 7
Auto close resources
@Resource(lookup = "jms/connFactory")

ConnectionFactory cf; !
@Resource(lookup="jms/inboundQueue")!
Destination dest;!
!
public void sendMessage (String payload) throws JMSException {!
try ( Connection conn = connectionFactory.createConnection(); !
Session session = conn.createSession();!
MessageProducer producer = session.createProducer(dest);!
){ !
Message mess = sess.createTextMessage(payload); !
producer.send(mess); !
} catch(JMSException e){ !
// exception handling !
}

}!
Create closeable
resources in a try-
with-resources block
close() is called
automatically
at end of block
Java Message Service 2.0
Auto close resources
@Resource(lookup = "java:global/jms/demoConnectionFactory")!
ConnectionFactory connectionFactory; !
!
@Resource(lookup = "java:global/jms/demoQueue")!
Queue demoQueue;!
!
public void sendMessage (String payload) {!
try (JMSContext context = connectionFactory.createContext();){!
context.createProducer().send(demoQueue, payload);!
} catch (JMSRuntimeException ex) {!
// exception handling!
}!
}!
close() is called
automatically
at end of block
JMSContext
combines
Connection
and Session
Payload
can be sent
directly
No checked
exceptions
thrown
Java Message Service 2.0
Introducing JMSContext
@Inject

JMSContext context;!
!
@Resource(lookup = "java:global/jms/demoQueue”)

Queue demoQueue;!
!
public void sendMessage(String payload) {!
context.createProducer().send(demoQueue, payload);!
}!
Default resource definition
Or
@JmsConnectionFactory!
13 lines è1 line!
Java Message Service 2.0
Default Data Source Definition
What Makes a Distributed App
¨  Finding the best allocation of processing tasks to
processing nodes
¤  User Interface
¤  Domain Logic
¤  Application Logic
¤  Data Persistence
¤  Communication
¤  Reliability, Security
WebSockets
¨  Several moving parts, each with its own standard!
¤  Client: W3C JavaScript API http://dev.w3.org/html5/
websockets/
¤  Transport: IETF RFC 6455 http://www.ietf.org/rfc/
rfc6455.txt
¤  Server: JSR-356: http://jcp.org/en/jsr/detail?id=356
¨  Even with all these parts, it’s still very
understandable
¤  Client: 17 page downs
¤  Transport: 86 page downs (about a third of which you
can skip)
What’s In a name?
WebSockets
WebSocket
¨  It really is a Socket for the Web
¤  It just works over proxies
¨  Lets you do TCP easily in a web app
¤  Establish the connection
¤  Send messages both ways
¤  Send messages independent of timing
¤  Close the connection
¨  Two basic types: text and binary
Big Picture
WebSocketEstablish the connection
WebSocketTCP over HTTP, use the Upgrade: header
WebSocketTCP over HTTP, use the Upgrade: header
WebSocketTCP over HTTP, use the Upgrade: header
WebSocketBrowser Support – caniuse.com
JavaScript/Browser Client
¨  Minimal Lifecycle
¤  new WebSocket(url)!
¤  pass in some functions
n  onopen!
n  onmessage!
¤  call send()!
¤  call close() !
¨  Can connect to arbitrary servers, other than the
page origin
¨  Server may enforce use of Origin header
JavaScript WebSocket Object
JavaScript/Browser ClientJavaScript WebSocket Object
¨  [Clamp] if
value is out of
range,
truncate it to
closest in-
range value
for that
primitive type.
Java Server
¨  Minimal Lifecycle
¤  Handshake
¤  Messaging
¤  Close
¨  All methods that deal with communication to the
other endpoint are passed a
javax.websocket.Session.
¨  Has nothing to do with
javax.servlet.http.HttpSession.
¨  HttpSession can be obtained from
Java Endpoint
Java Server
¨  Passing Parameters
¨  example URI “/bookings/JohnSmith”: guestID is
“JohnSmith”
¨  Strings and primitives supported
Java Endpoint
Java Server
Two Styles
¨  Annotated
¤  The most commonly used
¤  Very easy to get started
¤  Throw it in the WAR and you’re done
¨  Programmatic
¤  If you don’t want to bake config into your .class files
¤  Must use Java inheritance
Java Endpoint
Java Server
¨  Must bootstrap via ServletContextListener!
¤  Look up the
javax.websocket.server.ServerContaine
r attribute
¤  It will be an instance of
javax.websocket.server.ServerContaine
r!
¤  Call addEndpoint(), two variants
n  takes a class that is the annotated endpoint class
n  takes a ServerEndpointConfig instance
Programmatic Endpoint
Java ServerAnnotated Endpoint
Java ServerAnnotated Endpoint
Java Server
¨  The ServerEndpointConfig instance
¤  getEndpointClass() returns
n  annotated endpoint
n  class that extends javax.websocket.Endpoint!
¤  getPath() returns the path, may contain url-
template content
Programmatic Endpoint
WebSocket
¨  Send or receive text or binary messages
¤  As complete messages
¤  As sequence of partial messages
¤  Using traditional blocking I/O
¨  Send or receive WebSocket messages as pure Java
Objects (kinda like Serialization)
¤  Using encode/decode mechanism
¤  Encoder/decoder for all primitive types built in
¨  Send and receive messages synchronously or
asynchronously
Flexible Message Processing
66
Safe Harbor Statement
The preceding was intended to outline our general product direction. It
was intended for information purposes only, and may not be
incorporated into any contract. It was 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.
Copyright 2015 Ed Burns and Oliver Szymanski
Thank you67
Copyright 2015 Ed Burns and Oliver Szymanski
1 of 67

Recommended

Ed presents JSF 2.2 and WebSocket to Gameduell. by
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Edward Burns
3.9K views45 slides
JSF 2.2 Input Output JavaLand 2015 by
JSF 2.2 Input Output JavaLand 2015JSF 2.2 Input Output JavaLand 2015
JSF 2.2 Input Output JavaLand 2015Edward Burns
1.9K views64 slides
Burns jsf-confess-2015 by
Burns jsf-confess-2015Burns jsf-confess-2015
Burns jsf-confess-2015Edward Burns
2.3K views37 slides
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015 by
HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015HTTP/2 comes to Java.  What Servlet 4.0 means to you. DevNexus 2015
HTTP/2 comes to Java. What Servlet 4.0 means to you. DevNexus 2015Edward Burns
19.2K views82 slides
Servlet 4.0 at GeekOut 2015 by
Servlet 4.0 at GeekOut 2015Servlet 4.0 at GeekOut 2015
Servlet 4.0 at GeekOut 2015Edward Burns
19.3K views87 slides
MVC 1.0 / JSR 371 by
MVC 1.0 / JSR 371MVC 1.0 / JSR 371
MVC 1.0 / JSR 371David Delabassee
12.7K views42 slides

More Related Content

What's hot

Java EE 8 - An instant snapshot by
Java EE 8 - An instant snapshot Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot David Delabassee
10.7K views91 slides
Adopt-a-JSR for JSON Processing 1.1, JSR 374 by
Adopt-a-JSR for JSON Processing 1.1, JSR 374Adopt-a-JSR for JSON Processing 1.1, JSR 374
Adopt-a-JSR for JSON Processing 1.1, JSR 374Heather VanCura
6.5K views13 slides
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish by
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishArun Gupta
19.8K views23 slides
Seven Points for Applying Java EE 7 by
Seven Points for Applying Java EE 7Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7Hirofumi Iwasaki
24.2K views67 slides
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0 by
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0David Delabassee
1.8K views50 slides
CON5898 What Servlet 4.0 Means To You by
CON5898 What Servlet 4.0 Means To YouCON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To YouEdward Burns
31.5K views51 slides

What's hot(19)

Java EE 8 - An instant snapshot by David Delabassee
Java EE 8 - An instant snapshot Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot
David Delabassee10.7K views
Adopt-a-JSR for JSON Processing 1.1, JSR 374 by Heather VanCura
Adopt-a-JSR for JSON Processing 1.1, JSR 374Adopt-a-JSR for JSON Processing 1.1, JSR 374
Adopt-a-JSR for JSON Processing 1.1, JSR 374
Heather VanCura6.5K views
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish by Arun Gupta
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFishBatch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Batch Applications for Java Platform 1.0: Java EE 7 and GlassFish
Arun Gupta19.8K views
Seven Points for Applying Java EE 7 by Hirofumi Iwasaki
Seven Points for Applying Java EE 7Seven Points for Applying Java EE 7
Seven Points for Applying Java EE 7
Hirofumi Iwasaki24.2K views
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0 by David Delabassee
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
David Delabassee1.8K views
CON5898 What Servlet 4.0 Means To You by Edward Burns
CON5898 What Servlet 4.0 Means To YouCON5898 What Servlet 4.0 Means To You
CON5898 What Servlet 4.0 Means To You
Edward Burns31.5K views
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk by Edward Burns
Ed presents JSF 2.2 at a 2013 Gameduell Tech talkEd presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
Edward Burns907 views
JavaScript Frameworks and Java EE – A Great Match by Reza Rahman
JavaScript Frameworks and Java EE – A Great MatchJavaScript Frameworks and Java EE – A Great Match
JavaScript Frameworks and Java EE – A Great Match
Reza Rahman132.8K views
What's New in WebLogic 12.1.3 and Beyond by Oracle
What's New in WebLogic 12.1.3 and BeyondWhat's New in WebLogic 12.1.3 and Beyond
What's New in WebLogic 12.1.3 and Beyond
Oracle20.3K views
Down-to-Earth Microservices with Java EE by Reza Rahman
Down-to-Earth Microservices with Java EEDown-to-Earth Microservices with Java EE
Down-to-Earth Microservices with Java EE
Reza Rahman103.6K views
What's Coming in Java EE 8 by PT.JUG
What's Coming in Java EE 8What's Coming in Java EE 8
What's Coming in Java EE 8
PT.JUG4.1K views
Best Practices for JSF, Gameduell 2013 by Edward Burns
Best Practices for JSF, Gameduell 2013Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013
Edward Burns4.9K views
Java EE Revisits GoF Design Patterns by Murat Yener
Java EE Revisits GoF Design PatternsJava EE Revisits GoF Design Patterns
Java EE Revisits GoF Design Patterns
Murat Yener15.9K views
WebSocket in Enterprise Applications 2015 by Pavel Bucek
WebSocket in Enterprise Applications 2015WebSocket in Enterprise Applications 2015
WebSocket in Enterprise Applications 2015
Pavel Bucek1.9K views
Have You Seen Java EE Lately? by Reza Rahman
Have You Seen Java EE Lately?Have You Seen Java EE Lately?
Have You Seen Java EE Lately?
Reza Rahman37.1K views
Java API for WebSocket 1.0: Java EE 7 and GlassFish by Arun Gupta
Java API for WebSocket 1.0: Java EE 7 and GlassFishJava API for WebSocket 1.0: Java EE 7 and GlassFish
Java API for WebSocket 1.0: Java EE 7 and GlassFish
Arun Gupta23K views
Java EE 6 Adoption in One of the World’s Largest Online Financial Systems by Arshal Ameen
Java EE 6 Adoption in One of the World’s Largest Online Financial SystemsJava EE 6 Adoption in One of the World’s Largest Online Financial Systems
Java EE 6 Adoption in One of the World’s Largest Online Financial Systems
Arshal Ameen10.5K views
JavaOne - 10 Tips for Java EE 7 with PrimeFaces by Mert Çalışkan
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
Mert Çalışkan27.1K views

Viewers also liked

Java7 New Features and Code Examples by
Java7 New Features and Code ExamplesJava7 New Features and Code Examples
Java7 New Features and Code ExamplesNaresh Chintalcheru
7K views28 slides
Jersey Coders New Term Introduction by
Jersey Coders New Term IntroductionJersey Coders New Term Introduction
Jersey Coders New Term IntroductionAlex Theedom
517 views28 slides
Java EE revisits design patterns by
Java EE revisits design patternsJava EE revisits design patterns
Java EE revisits design patternsAlex Theedom
1.6K views42 slides
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck by
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckEdward Burns
3.1K views24 slides
SE2016 - Java EE revisits design patterns 2016 by
SE2016 - Java EE revisits design patterns 2016SE2016 - Java EE revisits design patterns 2016
SE2016 - Java EE revisits design patterns 2016Alex Theedom
718 views40 slides
HTTP/2 Comes to Java by
HTTP/2 Comes to JavaHTTP/2 Comes to Java
HTTP/2 Comes to JavaDavid Delabassee
10.8K views52 slides

Viewers also liked(16)

Jersey Coders New Term Introduction by Alex Theedom
Jersey Coders New Term IntroductionJersey Coders New Term Introduction
Jersey Coders New Term Introduction
Alex Theedom517 views
Java EE revisits design patterns by Alex Theedom
Java EE revisits design patternsJava EE revisits design patterns
Java EE revisits design patterns
Alex Theedom1.6K views
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck by Edward Burns
Servlet 4.0 Adopt-a-JSR 10 Minute InfodeckServlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Servlet 4.0 Adopt-a-JSR 10 Minute Infodeck
Edward Burns3.1K views
SE2016 - Java EE revisits design patterns 2016 by Alex Theedom
SE2016 - Java EE revisits design patterns 2016SE2016 - Java EE revisits design patterns 2016
SE2016 - Java EE revisits design patterns 2016
Alex Theedom718 views
楽天トラベルとSpring(Spring Day 2016) by Rakuten Group, Inc.
楽天トラベルとSpring(Spring Day 2016)楽天トラベルとSpring(Spring Day 2016)
楽天トラベルとSpring(Spring Day 2016)
Rakuten Group, Inc.14.1K views
Spring Day 2016 springの現在過去未来 by Yuichi Hasegawa
Spring Day 2016 springの現在過去未来Spring Day 2016 springの現在過去未来
Spring Day 2016 springの現在過去未来
Yuichi Hasegawa11.8K views
Lineにおけるspring frameworkの活用 by Tokuhiro Matsuno
Lineにおけるspring frameworkの活用Lineにおけるspring frameworkの活用
Lineにおけるspring frameworkの活用
Tokuhiro Matsuno33.7K views
Spring bootで学ぶ初めてのwebアプリ開発 by terahide
Spring bootで学ぶ初めてのwebアプリ開発Spring bootで学ぶ初めてのwebアプリ開発
Spring bootで学ぶ初めてのwebアプリ開発
terahide12.7K views
アメブロの大規模システム刷新と それを支えるSpring by Takuya Hattori
アメブロの大規模システム刷新と それを支えるSpringアメブロの大規模システム刷新と それを支えるSpring
アメブロの大規模システム刷新と それを支えるSpring
Takuya Hattori40.8K views
Data Microservices with Spring Cloud Stream, Task, and Data Flow #jsug #spri... by Toshiaki Maki
Data Microservices with Spring Cloud Stream, Task,  and Data Flow #jsug #spri...Data Microservices with Spring Cloud Stream, Task,  and Data Flow #jsug #spri...
Data Microservices with Spring Cloud Stream, Task, and Data Flow #jsug #spri...
Toshiaki Maki22.3K views
Java EE 8: What Servlet 4 and HTTP2 Mean by Alex Theedom
Java EE 8: What Servlet 4 and HTTP2 MeanJava EE 8: What Servlet 4 and HTTP2 Mean
Java EE 8: What Servlet 4 and HTTP2 Mean
Alex Theedom4.2K views
Java EE 8: What Servlet 4.0 and HTTP/2 mean to you by Alex Theedom
Java EE 8: What Servlet 4.0 and HTTP/2 mean to youJava EE 8: What Servlet 4.0 and HTTP/2 mean to you
Java EE 8: What Servlet 4.0 and HTTP/2 mean to you
Alex Theedom8.1K views
Spring 5に備えるリアクティブプログラミング入門 by Takuya Iwatsuka
Spring 5に備えるリアクティブプログラミング入門Spring 5に備えるリアクティブプログラミング入門
Spring 5に備えるリアクティブプログラミング入門
Takuya Iwatsuka31.9K views

Similar to Java EE 7 from an HTML5 Perspective, JavaLand 2015

Front End Development | Introduction by
Front End Development | IntroductionFront End Development | Introduction
Front End Development | IntroductionJohnTaieb
10.5K views37 slides
Web Development for UX Designers by
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX DesignersAshlimarie
38.9K views92 slides
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp by
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampChris Love
1.9K views43 slides
The State of Wicket by
The State of WicketThe State of Wicket
The State of WicketMartijn Dashorst
50.4K views112 slides
Web Development Workshop (Front End) by
Web Development Workshop (Front End)Web Development Workshop (Front End)
Web Development Workshop (Front End)DSCIIITLucknow
231 views44 slides
The Server Side of Responsive Web Design by
The Server Side of Responsive Web DesignThe Server Side of Responsive Web Design
The Server Side of Responsive Web DesignDave Olsen
13.7K views90 slides

Similar to Java EE 7 from an HTML5 Perspective, JavaLand 2015(20)

Front End Development | Introduction by JohnTaieb
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb10.5K views
Web Development for UX Designers by Ashlimarie
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
Ashlimarie 38.9K views
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp by Chris Love
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code CampDoing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Chris Love1.9K views
Web Development Workshop (Front End) by DSCIIITLucknow
Web Development Workshop (Front End)Web Development Workshop (Front End)
Web Development Workshop (Front End)
DSCIIITLucknow231 views
The Server Side of Responsive Web Design by Dave Olsen
The Server Side of Responsive Web DesignThe Server Side of Responsive Web Design
The Server Side of Responsive Web Design
Dave Olsen13.7K views
Terry's Resume 3.1 by terry meng
Terry's Resume 3.1Terry's Resume 3.1
Terry's Resume 3.1
terry meng436 views
bakkesh_php_mysql_javascript_jquery_5.5yrs_Exp by Bakkesh K S
bakkesh_php_mysql_javascript_jquery_5.5yrs_Expbakkesh_php_mysql_javascript_jquery_5.5yrs_Exp
bakkesh_php_mysql_javascript_jquery_5.5yrs_Exp
Bakkesh K S142 views
Ibm web sphere_job_interview_preparation_guide by Khemnath Chauhan
Ibm web sphere_job_interview_preparation_guideIbm web sphere_job_interview_preparation_guide
Ibm web sphere_job_interview_preparation_guide
Khemnath Chauhan6.6K views
Resume- Nishant Verma (JEE Consultant with 10+ years ) (1) by Nishant Verma
Resume- Nishant Verma (JEE Consultant with 10+ years ) (1)Resume- Nishant Verma (JEE Consultant with 10+ years ) (1)
Resume- Nishant Verma (JEE Consultant with 10+ years ) (1)
Nishant Verma745 views
Isomorphic JavaScript: #DevBeat Master Class by Spike Brehm
Isomorphic JavaScript: #DevBeat Master ClassIsomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master Class
Spike Brehm24.1K views
Why You Need a Front End Developer by Mike Wilcox
Why You Need a Front End DeveloperWhy You Need a Front End Developer
Why You Need a Front End Developer
Mike Wilcox2.5K views
Developing Java Web Applications by hchen1
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
hchen116.4K views
Apache Flex and the imperfect Web by masuland
Apache Flex and the imperfect WebApache Flex and the imperfect Web
Apache Flex and the imperfect Web
masuland2.2K views
JavaScript & Enterprise BED-Con 2014 Berlin German by Adam Boczek
JavaScript & Enterprise BED-Con 2014 Berlin GermanJavaScript & Enterprise BED-Con 2014 Berlin German
JavaScript & Enterprise BED-Con 2014 Berlin German
Adam Boczek2.2K views

More from Edward Burns

Jakarta EE 11 Status Update​ by
Jakarta EE 11 Status Update​Jakarta EE 11 Status Update​
Jakarta EE 11 Status Update​Edward Burns
61 views43 slides
Sponsored Session: Please touch that dial! by
Sponsored Session: Please touch that dial!Sponsored Session: Please touch that dial!
Sponsored Session: Please touch that dial!Edward Burns
9 views25 slides
How modernizing enterprise applications gives you a competitive advantage by
How modernizing enterprise applications gives you a competitive advantageHow modernizing enterprise applications gives you a competitive advantage
How modernizing enterprise applications gives you a competitive advantageEdward Burns
9 views35 slides
Wie Azure Jakarta EE Nutzt by
Wie Azure Jakarta EE NutztWie Azure Jakarta EE Nutzt
Wie Azure Jakarta EE NutztEdward Burns
19 views34 slides
Practical lessons from customers performing digital transformation with Azure by
Practical lessons from customers performing digital transformation with AzurePractical lessons from customers performing digital transformation with Azure
Practical lessons from customers performing digital transformation with AzureEdward Burns
32 views46 slides
wls-azure-devnexus-2022.pdf by
wls-azure-devnexus-2022.pdfwls-azure-devnexus-2022.pdf
wls-azure-devnexus-2022.pdfEdward Burns
122 views34 slides

More from Edward Burns(19)

Jakarta EE 11 Status Update​ by Edward Burns
Jakarta EE 11 Status Update​Jakarta EE 11 Status Update​
Jakarta EE 11 Status Update​
Edward Burns61 views
Sponsored Session: Please touch that dial! by Edward Burns
Sponsored Session: Please touch that dial!Sponsored Session: Please touch that dial!
Sponsored Session: Please touch that dial!
Edward Burns9 views
How modernizing enterprise applications gives you a competitive advantage by Edward Burns
How modernizing enterprise applications gives you a competitive advantageHow modernizing enterprise applications gives you a competitive advantage
How modernizing enterprise applications gives you a competitive advantage
Edward Burns9 views
Wie Azure Jakarta EE Nutzt by Edward Burns
Wie Azure Jakarta EE NutztWie Azure Jakarta EE Nutzt
Wie Azure Jakarta EE Nutzt
Edward Burns19 views
Practical lessons from customers performing digital transformation with Azure by Edward Burns
Practical lessons from customers performing digital transformation with AzurePractical lessons from customers performing digital transformation with Azure
Practical lessons from customers performing digital transformation with Azure
Edward Burns32 views
wls-azure-devnexus-2022.pdf by Edward Burns
wls-azure-devnexus-2022.pdfwls-azure-devnexus-2022.pdf
wls-azure-devnexus-2022.pdf
Edward Burns122 views
Jakarta EE und Microprofile sind bei Azure zu Hause by Edward Burns
Jakarta EE und Microprofile sind bei Azure zu HauseJakarta EE und Microprofile sind bei Azure zu Hause
Jakarta EE und Microprofile sind bei Azure zu Hause
Edward Burns169 views
Java on Your Terms with Azure by Edward Burns
Java on Your Terms with AzureJava on Your Terms with Azure
Java on Your Terms with Azure
Edward Burns139 views
Wars I’ve Seen From Java EE to Spring and more, Azure has you covered by Edward Burns
Wars I’ve SeenFrom Java EE to Spring and more, Azure has you coveredWars I’ve SeenFrom Java EE to Spring and more, Azure has you covered
Wars I’ve Seen From Java EE to Spring and more, Azure has you covered
Edward Burns122 views
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e... by Edward Burns
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
Edward Burns203 views
Programming Language Platform Growth: Table Stakes or Deal Makes? by Edward Burns
Programming Language Platform Growth: Table Stakes or Deal Makes?Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?
Edward Burns280 views
Programming Language Platform Growth: Table Stakes or Deal Makes? by Edward Burns
Programming Language Platform Growth: Table Stakes or Deal Makes?Programming Language Platform Growth: Table Stakes or Deal Makes?
Programming Language Platform Growth: Table Stakes or Deal Makes?
Edward Burns238 views
Building a Serverless State Service for the Cloud by Edward Burns
Building a Serverless State Service for the CloudBuilding a Serverless State Service for the Cloud
Building a Serverless State Service for the Cloud
Edward Burns472 views
JSF 2.3 Adopt-a-JSR 10 Minute Infodeck by Edward Burns
JSF 2.3 Adopt-a-JSR 10 Minute InfodeckJSF 2.3 Adopt-a-JSR 10 Minute Infodeck
JSF 2.3 Adopt-a-JSR 10 Minute Infodeck
Edward Burns3.6K views
JavaOne 2014 Java EE 8 Booth Slides by Edward Burns
JavaOne 2014 Java EE 8 Booth SlidesJavaOne 2014 Java EE 8 Booth Slides
JavaOne 2014 Java EE 8 Booth Slides
Edward Burns1.1K views
jsf2-composite-components by Edward Burns
jsf2-composite-componentsjsf2-composite-components
jsf2-composite-components
Edward Burns1K views
Kids computer-programming by Edward Burns
Kids computer-programmingKids computer-programming
Kids computer-programming
Edward Burns8.2K views
JSF 2.2 Status at DOAG 2011 by Edward Burns
JSF 2.2 Status at DOAG 2011JSF 2.2 Status at DOAG 2011
JSF 2.2 Status at DOAG 2011
Edward Burns1.5K views

Recently uploaded

nintendo_64.pptx by
nintendo_64.pptxnintendo_64.pptx
nintendo_64.pptxpaiga02016
7 views7 slides
predicting-m3-devopsconMunich-2023-v2.pptx by
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptxTier1 app
14 views33 slides
Introduction to Maven by
Introduction to MavenIntroduction to Maven
Introduction to MavenJohn Valentino
7 views10 slides
Winter Projects GDSC IITK by
Winter Projects GDSC IITKWinter Projects GDSC IITK
Winter Projects GDSC IITKSahilSingh368445
511 views60 slides
Understanding HTML terminology by
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminologyartembondar5
9 views8 slides
Playwright Retries by
Playwright RetriesPlaywright Retries
Playwright Retriesartembondar5
7 views1 slide

Recently uploaded(20)

predicting-m3-devopsconMunich-2023-v2.pptx by Tier1 app
predicting-m3-devopsconMunich-2023-v2.pptxpredicting-m3-devopsconMunich-2023-v2.pptx
predicting-m3-devopsconMunich-2023-v2.pptx
Tier1 app14 views
Understanding HTML terminology by artembondar5
Understanding HTML terminologyUnderstanding HTML terminology
Understanding HTML terminology
artembondar59 views
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P... by NimaTorabi2
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
Unlocking the Power of AI in Product Management - A Comprehensive Guide for P...
NimaTorabi219 views
tecnologia18.docx by nosi6702
tecnologia18.docxtecnologia18.docx
tecnologia18.docx
nosi67026 views
Automated Testing of Microsoft Power BI Reports by RTTS
Automated Testing of Microsoft Power BI ReportsAutomated Testing of Microsoft Power BI Reports
Automated Testing of Microsoft Power BI Reports
RTTS13 views
University of Borås-full talk-2023-12-09.pptx by Mahdi_Fahmideh
University of Borås-full talk-2023-12-09.pptxUniversity of Borås-full talk-2023-12-09.pptx
University of Borås-full talk-2023-12-09.pptx
Mahdi_Fahmideh13 views
Top-5-production-devconMunich-2023-v2.pptx by Tier1 app
Top-5-production-devconMunich-2023-v2.pptxTop-5-production-devconMunich-2023-v2.pptx
Top-5-production-devconMunich-2023-v2.pptx
Tier1 app9 views
How to build dyanmic dashboards and ensure they always work by Wiiisdom
How to build dyanmic dashboards and ensure they always workHow to build dyanmic dashboards and ensure they always work
How to build dyanmic dashboards and ensure they always work
Wiiisdom18 views
Advanced API Mocking Techniques Using Wiremock by Dimpy Adhikary
Advanced API Mocking Techniques Using WiremockAdvanced API Mocking Techniques Using Wiremock
Advanced API Mocking Techniques Using Wiremock
Dimpy Adhikary5 views
predicting-m3-devopsconMunich-2023.pptx by Tier1 app
predicting-m3-devopsconMunich-2023.pptxpredicting-m3-devopsconMunich-2023.pptx
predicting-m3-devopsconMunich-2023.pptx
Tier1 app10 views

Java EE 7 from an HTML5 Perspective, JavaLand 2015

  • 1. JAVA EE 7 FROM AN HTML5 PERSPECTIVE Ed Burns @edburns and Oliver Szymanski @source_knights
  • 2. 2 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. Copyright 2015 Ed Burns and Oliver Szymanski
  • 3. Speaker Qualifications – Ed Burns Copyright 2015 Ed Burns and Oliver Szymanski 3 ¨  Involved with JSF since 2002 ¨  JSF Spec lead since 2003 ¤  Most fun part of the job: cleanly integrating other people’s great ideas into JSF (and hopefully improving on the in the process) ¤  Not an expert in applying JSF in practice ¨  Servlet Spec lead since 2014
  • 4. Speaker Qualifications – Ed Burns Copyright 2015 Ed Burns and Oliver Szymanski 4 ¨  Author of four books for McGraw-Hill
  • 5. Speaker Qualifications – Oliver Szymanski Copyright 2015 Ed Burns and Oliver Szymanski 5 ¨  Independent Java Enterprise Consultant ¨  Specialty in the Financial Sector ¨  JUG Founder Erlangen/Nuremberg Germany
  • 6. Speaker Qualifications – Oliver Szymanski Copyright 2015 Ed Burns and Oliver Szymanski 6 ¨  Contributing author for ¤  Heise Developer Channel ¤  S&S Entwickler ¤  Java aktuell ¤  Java Magazin
  • 7. Meet the Family Copyright 2015 Ed Burns and Oliver Szymanski 7
  • 8. Meet the Family ¨  Java API for JSON Processing ¨  Java API for WebSocket ¨  Batch Application ¨  Concurrency Utilities ¨  Caching ¨  Java Persistence Architecture ¨  … ¨  Java API for REST ¨  JavaServer Faces ¨  Servlets ¨  Expression Language ¨  Java Messaging Service ¨  Contexts and Dependency Injection ¨  Java Transaction Architecture 8 Copyright 2015 Ed Burns and Oliver Szymanski
  • 9. Meet the HTML5-Friendly Family ¨  Java API for JSON Processing ¨  Java API for WebSocket ¨  Batch Application ¨  Concurrency Utilities ¨  Caching ¨  Java Persistence Architecture ¨  … ¨  Java API for REST ¨  JavaServer Faces ¨  Servlets ¨  Expression Language ¨  Java Messaging Service ¨  Contexts and Dependency Injection ¨  Java Transaction Architecture 9 Copyright 2015 Ed Burns and Oliver Szymanski
  • 10. HTML5Why all the fuss? More cute logos at http://www.w3.org/html/logo/
  • 11. HTML5Why all the fuss? PAST AND PRESENT SERVER
  • 13. Classification ¨  Why? ¤  Multiple Computers ¤  Interconnections Between Them ¤  Shared State Among Them ¨  Today's production Web apps are extremely complex distributed applications. A Web App is a Distributed App
  • 14. Yeah, So What? ¨  Why does this classification matter? ¤  Because History Matters ¨  To understand the current state of web applications, we must go back to the history of distributed applications, and of the Internet itself.
  • 16. HTML5 ¨  Remember all the fuss about Ajax in 2006? ¤  Asynchronous ¤  JavaScript ¤  And ¤  XMLHttpRequest What’s in a name?
  • 17. HTML5 ¨  Remember all the fuss about Ajax in 2006? ¤  Asynchronous ¤  JavaScript ¤  And ¤  XMLHttpRequest ¨  Ajax is a programming technique, not a single technology What’s in a name?
  • 18. HTML4 ¨  What do people mean when they say HTML4? ¤  IE6 ¤  Not very high performance JavaScript ¤  Lots of browser tricks ¤  Use of native plugins is common ¨  HTML4 is seen as a single technology What’s in a name?
  • 19. HTML5 ¨  What do people mean when they say HTML5? ¤  “Modern” browsers ¤  A gigantic collection of related technologies n  Markup n  Offline storage n  EventSource n  DOM n  JavaScript n  CSS3 What’s in a name? n  Canvas n  Input controls n  Web components n  Application Cache n  WebSocket n  JSON n  Geolocation n  XMLHttpRequest Level 2
  • 20. HTML5 ¨  The rise of Chrome and the end of polyfill ¨  Standards have finally won ¤  How good is your standards body? n  W3C, ECMA, IETF ¤  HTML5: Microsoft, Google, Apple, what about Mozilla? ¨  Aside: ¤  Is HTML5 a bloated specification? ¤  Is JavaEE a bloated specification? ¤  What is bloat? A indicator of how old something is. ¤  http://mir.aculo.us/2010/10/19/standards-bloat-and- html5/ Is it really a big deal?
  • 21. HTML5 ¨  The death of the browser plugin: April 2010 http://www.apple.com/hotnews/thoughts-on-flash/ ¨  Where does the tension remain? ¤  Take advantage of the power in the client ¤  Minimize the complexity of distributing and maintaining the software Is it really a big deal?
  • 22. HTML5 ¨  HTML5 is a marketing term that describes a way of building the UI for a distributed system. ¤  UI processing task resides entirely in the browser Putting it in context
  • 23. What Makes a Distributed App ¨  Finding the best allocation of processing tasks to processing nodes ¤  User Interface ¤  Domain Logic ¤  Application Logic ¤  Data Persistence ¤  Communication ¤  Reliability, Security
  • 24. What Makes a Distributed App ¨  Finding the best allocation of processing tasks to processing nodes ¤  User Interface ¤  Domain Logic ¤  Application Logic ¤  Data Persistence ¤  Communication ¤  Reliability, Security
  • 25. UI Considerations ¨  The UI is the hardest part to get right ¨  The technology for building the UI is changing very rapidly, and will continue to change for the forseeable future ¨  The technology for the other aspects of application development is less volatile, more mature. ¨  The major software stack and device vendors are competing on the basis of their UI technology, as the gateway to the rest of their stack
  • 26. HTML5 Friendly Markup ¨  This is a JSF page The best part of Wicket comes to JSF <!DOCTYPE html>! <html xmlns="http://www.w3.org/1999/xhtml"! xmlns:myNS="http://xmlns.jcp.org/jsf”>! <form myNS:id="form">! <input name="textField" type="text" myNS:value="#{bean.text1}" />! <input type="submit" myNS:id="submitButton" value="submit" /> ! <p>submitted text: #{bean.text1}.</p>! </form>! </html>! !
  • 27. HTML5 Friendly Markup ¨  JSF Views are written in a View Declaration Language (VDL). ¨  The standard Facelet VDL is an XML application with two kinds of elements ¤  HTML Markup ¤  JSF Components ¨  HTML Markup is passed through straight to the browser ¨  JSF Components take some action on the server, during the lifecycle` Let’s get back to basics
  • 28. HTML5 Friendly Markup ¨  Before JSF 2.2 ¤  JSF tags hide complexity of underlying HTML+script+css +images ¤  JSF “Renderer”: n  encode: markup to browser n  decode: name=value from browser <html>… <my:colorPicker value=“#{colorBean.color2}” /> <my:calendar value=“#{calendarBean.date1}” /> </html> ¨  Context: Missing feature in browser? Write a JSF component. Let the elegance of HTML shine through
  • 29. HTML5 Friendly Markup ¨  With JSF 2.2 ¤  Pure HTML+script+css+images in the JSF page ¤  JSF Renderer handles decode from browser n  Leverage the strength of the JSF lifecycle n  Leverage the expressiveness of HTML5 <html>… <input type=“color” jsf:value=“#{colorBean.color2}”/> <input type=“date” jsf:value=“#{calendarBean.date1}” /> </html> ¨  Context: New feature in browser? Use “pass through elements” Let the elegance of HTML shine through
  • 30. JSR 341 Expression Language 3.0 ¨  First introduced in JSTL 1.0 in 2004 ¨  Moved to JSP 2.0 in 2006 ¨  Unified with JSF 1.2 in JSP 2.1 in 2006 ¨  JSR 341: first independent specification in 2013 ¨  Used in JSF, JSP and CDI ¨  Key differentiator between JavaServer and non- JavaServer stacks Overview
  • 31. JSR 341 Expression Language 3.0 ¨  Lambda expressions ¨  Support for stand-alone environments ¨  New operators ¨  Static field and method reference ¨  Custom type converter ¨  Collection construction ¨  Collection operations New Feature Summary
  • 32. JSR 341 Expression Language 3.0 ¨  Same syntax as JavaSE 8, but available in EE 7 ¨  Behaves like an anonymous function ¨  Body consist of an EL expression ¨  Full access to EL environment in the body Lambda expression x -> x+1! (x,y) -> x+y! () -> 64!
  • 33. JSR 341 Expression Language 3.0 ¨  The lambda is evaluated and discarded Lambda expression: immediate evaluation (x -> x+1)(10)! !à 11! ((x,y)->x+y)(3,4) !à 7! (()->64)() ! !à 64!
  • 34. JSR 341 Expression Language 3.0 ¨  JSF Facelet page <h:dataTable rendered=!“#{user.loggedIn}”
 value="#{library.books.stream().
 filter(b->b.category == 'Comedy').
 map(b->b.title).toList()}" var="book">! <h:column>#{book.title}</h:column>! </h:dataTable>! Collection operations: examples
  • 35. What Makes a Distributed App ¨  Finding the best allocation of processing tasks to processing nodes ¤  User Interface ¤  Domain Logic ¤  Application Logic ¤  Data Persistence ¤  Communication ¤  Reliability, Security
  • 36. Java API for JSON Processing 1.0 ¨  API to parse and generate JSON ¨  Streaming API ¤  Low-level, efficient way to parse/generate JSON ¤  Provides pluggability for parsers/generators ¨  Object Model ¤  Simple, easy-to-use high-level API ¤  Implemented on top of Streaming API ¨  Binding JSON to Java objects forthcoming Overview – JSR 353
  • 37. Java API for JSON Processing 1.0 ¨  Parses JSON in a streaming way from input sources ¤  Similar to StaX’s XMLStreamReader, a pull parser ¨  Created using ¤  Json.createParser(…)! ¤  Json.createParserFactory().createParser( …)! ¨  Parser state events ¤  START_ARRAY, END_ARRAY, START_OBJECT, END_OBJECT, … Streaming API
  • 38. Java API for JSON Processing 1.0 ¨  JsonObject/JsonArray – JSON object and array structures ¤  JsonString and JsonNumber for string and number values ¨  JsonBuilder – Builds JsonObject and JsonArray ¨  JsonReader – Reads JsonObject and JsonArray from input source ¨  JsonWriter – Writes JsonObject and JsonArray to output source Object Model API
  • 39. Java API for RESTful Web Services 2.0 ¨  Client API ¨  Message Filters & Entity Interceptors ¨  Asynchronous Processing – Server & Client ¨  Hypermedia Support ¨  Common Configuration Overview – JSR 339
  • 40. Java API for RESTful Web Services 2.0 Server-side Async @Path("/async/longRunning")! public class MyResource { ! ! @GET! public void longRunningOp(@Suspended AsyncResponse ar) {! ! ar.setTimeoutHandler(new MyTimoutHandler());! ar.setTimeout(15, SECONDS);! ! Executors.newSingleThreadExecutor().submit(new Runnable() {! public void run() { ! …! ar.resume(result);! }! });! }! }!
  • 41. Java API for RESTful Web Services 2.0 Server-side Content Negotiation @Path("/")
 class ProductResource {!     @GET
     @Produces({"text/xml;qs=0.75", "application/json"})
     public Product[] getProducts() {
         . . .
     }
 }!
  • 42. Java Message Service 2.0 ¨  Less verbose ¨  Reduce boilerplate code ¨  Resource injection ¨  Connection, Session, and other objects are AutoCloseable ¨  Requires Resource Adapter for Java EE containers ¨  Simplified API in both Java SE and EE Overview – JSR 343
  • 43. Java Message Service 2.0 ¨  Make JMS objects implement AutoCloseable! ¤  Connection ! ¤  Session ! ¤  MessageProducer ! ¤  MessageConsumer ! ¤  QueueBrowser! ¨  Requires Java SE 7 Auto close resources
  • 44. @Resource(lookup = "jms/connFactory")
 ConnectionFactory cf; ! @Resource(lookup="jms/inboundQueue")! Destination dest;! ! public void sendMessage (String payload) throws JMSException {! try ( Connection conn = connectionFactory.createConnection(); ! Session session = conn.createSession();! MessageProducer producer = session.createProducer(dest);! ){ ! Message mess = sess.createTextMessage(payload); ! producer.send(mess); ! } catch(JMSException e){ ! // exception handling ! }
 }! Create closeable resources in a try- with-resources block close() is called automatically at end of block Java Message Service 2.0 Auto close resources
  • 45. @Resource(lookup = "java:global/jms/demoConnectionFactory")! ConnectionFactory connectionFactory; ! ! @Resource(lookup = "java:global/jms/demoQueue")! Queue demoQueue;! ! public void sendMessage (String payload) {! try (JMSContext context = connectionFactory.createContext();){! context.createProducer().send(demoQueue, payload);! } catch (JMSRuntimeException ex) {! // exception handling! }! }! close() is called automatically at end of block JMSContext combines Connection and Session Payload can be sent directly No checked exceptions thrown Java Message Service 2.0 Introducing JMSContext
  • 46. @Inject
 JMSContext context;! ! @Resource(lookup = "java:global/jms/demoQueue”)
 Queue demoQueue;! ! public void sendMessage(String payload) {! context.createProducer().send(demoQueue, payload);! }! Default resource definition Or @JmsConnectionFactory! 13 lines è1 line! Java Message Service 2.0 Default Data Source Definition
  • 47. What Makes a Distributed App ¨  Finding the best allocation of processing tasks to processing nodes ¤  User Interface ¤  Domain Logic ¤  Application Logic ¤  Data Persistence ¤  Communication ¤  Reliability, Security
  • 48. WebSockets ¨  Several moving parts, each with its own standard! ¤  Client: W3C JavaScript API http://dev.w3.org/html5/ websockets/ ¤  Transport: IETF RFC 6455 http://www.ietf.org/rfc/ rfc6455.txt ¤  Server: JSR-356: http://jcp.org/en/jsr/detail?id=356 ¨  Even with all these parts, it’s still very understandable ¤  Client: 17 page downs ¤  Transport: 86 page downs (about a third of which you can skip) What’s In a name?
  • 50. WebSocket ¨  It really is a Socket for the Web ¤  It just works over proxies ¨  Lets you do TCP easily in a web app ¤  Establish the connection ¤  Send messages both ways ¤  Send messages independent of timing ¤  Close the connection ¨  Two basic types: text and binary Big Picture
  • 52. WebSocketTCP over HTTP, use the Upgrade: header
  • 53. WebSocketTCP over HTTP, use the Upgrade: header
  • 54. WebSocketTCP over HTTP, use the Upgrade: header
  • 56. JavaScript/Browser Client ¨  Minimal Lifecycle ¤  new WebSocket(url)! ¤  pass in some functions n  onopen! n  onmessage! ¤  call send()! ¤  call close() ! ¨  Can connect to arbitrary servers, other than the page origin ¨  Server may enforce use of Origin header JavaScript WebSocket Object
  • 57. JavaScript/Browser ClientJavaScript WebSocket Object ¨  [Clamp] if value is out of range, truncate it to closest in- range value for that primitive type.
  • 58. Java Server ¨  Minimal Lifecycle ¤  Handshake ¤  Messaging ¤  Close ¨  All methods that deal with communication to the other endpoint are passed a javax.websocket.Session. ¨  Has nothing to do with javax.servlet.http.HttpSession. ¨  HttpSession can be obtained from Java Endpoint
  • 59. Java Server ¨  Passing Parameters ¨  example URI “/bookings/JohnSmith”: guestID is “JohnSmith” ¨  Strings and primitives supported Java Endpoint
  • 60. Java Server Two Styles ¨  Annotated ¤  The most commonly used ¤  Very easy to get started ¤  Throw it in the WAR and you’re done ¨  Programmatic ¤  If you don’t want to bake config into your .class files ¤  Must use Java inheritance Java Endpoint
  • 61. Java Server ¨  Must bootstrap via ServletContextListener! ¤  Look up the javax.websocket.server.ServerContaine r attribute ¤  It will be an instance of javax.websocket.server.ServerContaine r! ¤  Call addEndpoint(), two variants n  takes a class that is the annotated endpoint class n  takes a ServerEndpointConfig instance Programmatic Endpoint
  • 64. Java Server ¨  The ServerEndpointConfig instance ¤  getEndpointClass() returns n  annotated endpoint n  class that extends javax.websocket.Endpoint! ¤  getPath() returns the path, may contain url- template content Programmatic Endpoint
  • 65. WebSocket ¨  Send or receive text or binary messages ¤  As complete messages ¤  As sequence of partial messages ¤  Using traditional blocking I/O ¨  Send or receive WebSocket messages as pure Java Objects (kinda like Serialization) ¤  Using encode/decode mechanism ¤  Encoder/decoder for all primitive types built in ¨  Send and receive messages synchronously or asynchronously Flexible Message Processing
  • 66. 66 Safe Harbor Statement The preceding was intended to outline our general product direction. It was intended for information purposes only, and may not be incorporated into any contract. It was 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. Copyright 2015 Ed Burns and Oliver Szymanski
  • 67. Thank you67 Copyright 2015 Ed Burns and Oliver Szymanski