Enviar búsqueda
Cargar
Java EE 8 - What’s new on the Web front
•
3 recomendaciones
•
961 vistas
David Delabassee
Seguir
Presented at JavaZone (Norway, September 2015)
Leer menos
Leer más
Software
Denunciar
Compartir
Denunciar
Compartir
1 de 77
Descargar ahora
Descargar para leer sin conexión
Recomendados
JAX-RS.next
JAX-RS.next
Michal Gajdos
JSON-B for CZJUG
JSON-B for CZJUG
Dmitry Kornilov
How to Find Patterns in Your Data with SQL
How to Find Patterns in Your Data with SQL
Chris Saxon
12 Things Developers Will Love About Oracle Database 12c Release 2
12 Things Developers Will Love About Oracle Database 12c Release 2
Chris Saxon
Native REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11g
Marcelo Ochoa
JSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworks
Dmitry Kornilov
The Java Carputer
The Java Carputer
Simon Ritter
Sangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12c
Connor McDonald
Recomendados
JAX-RS.next
JAX-RS.next
Michal Gajdos
JSON-B for CZJUG
JSON-B for CZJUG
Dmitry Kornilov
How to Find Patterns in Your Data with SQL
How to Find Patterns in Your Data with SQL
Chris Saxon
12 Things Developers Will Love About Oracle Database 12c Release 2
12 Things Developers Will Love About Oracle Database 12c Release 2
Chris Saxon
Native REST Web Services with Oracle 11g
Native REST Web Services with Oracle 11g
Marcelo Ochoa
JSONB introduction and comparison with other frameworks
JSONB introduction and comparison with other frameworks
Dmitry Kornilov
The Java Carputer
The Java Carputer
Simon Ritter
Sangam 18 - The New Optimizer in Oracle 12c
Sangam 18 - The New Optimizer in Oracle 12c
Connor McDonald
What's coming in Java EE 8
What's coming in Java EE 8
David Delabassee
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
What's Coming in Java EE 8
What's Coming in Java EE 8
PT.JUG
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot
David Delabassee
Java 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 Delabassee
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot
David Delabassee
112815 java ee8_davidd
112815 java ee8_davidd
Takashi Ito
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)
David Delabassee
Java API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and update
Martin Grebac
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Codemotion Tel Aviv
Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()
Bruno Borges
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
José Paumard
Java EE 7 overview
Java EE 7 overview
Masoud Kalali
Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_
aioughydchapter
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)
Logico
What’s new in JSR 367 Java API for JSON Binding
What’s new in JSR 367 Java API for JSON Binding
Dmitry Kornilov
Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...
All Things Open
Reactive Jersey Client
Reactive Jersey Client
Michal Gajdos
Oracle Database Management REST API
Oracle Database Management REST API
Jeff Smith
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
Roland Tritsch
JVMs in Containers - Best Practices
JVMs in Containers - Best Practices
David Delabassee
JVMs in Containers
JVMs in Containers
David Delabassee
Más contenido relacionado
Similar a Java EE 8 - What’s new on the Web front
What's coming in Java EE 8
What's coming in Java EE 8
David Delabassee
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
What's Coming in Java EE 8
What's Coming in Java EE 8
PT.JUG
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot
David Delabassee
Java 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 Delabassee
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot
David Delabassee
112815 java ee8_davidd
112815 java ee8_davidd
Takashi Ito
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)
David Delabassee
Java API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and update
Martin Grebac
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Codemotion Tel Aviv
Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()
Bruno Borges
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
José Paumard
Java EE 7 overview
Java EE 7 overview
Masoud Kalali
Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_
aioughydchapter
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)
Logico
What’s new in JSR 367 Java API for JSON Binding
What’s new in JSR 367 Java API for JSON Binding
Dmitry Kornilov
Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...
All Things Open
Reactive Jersey Client
Reactive Jersey Client
Michal Gajdos
Oracle Database Management REST API
Oracle Database Management REST API
Jeff Smith
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
Roland Tritsch
Similar a Java EE 8 - What’s new on the Web front
(20)
What's coming in Java EE 8
What's coming in Java EE 8
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
JavaCro'15 - Java EE 8 - An instant snapshot - David Delabassee
What's Coming in Java EE 8
What's Coming in Java EE 8
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot
Java 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
Java EE 8 - An instant snapshot
Java EE 8 - An instant snapshot
112815 java ee8_davidd
112815 java ee8_davidd
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)
Java EE 7 (Lyon JUG & Alpes JUG - March 2014)
Java API for JSON Binding - Introduction and update
Java API for JSON Binding - Introduction and update
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Pushing JavaEE outside of the enterprise: Home Automation & IoT - David Delab...
Presente e Futuro: Java EE.next()
Presente e Futuro: Java EE.next()
JAX-RS and CDI Bike the (Reactive) Bridge
JAX-RS and CDI Bike the (Reactive) Bridge
Java EE 7 overview
Java EE 7 overview
Leverage integration cloud_service_for_ebs_
Leverage integration cloud_service_for_ebs_
Java EE 8 Overview (Japanese)
Java EE 8 Overview (Japanese)
What’s new in JSR 367 Java API for JSON Binding
What’s new in JSR 367 Java API for JSON Binding
Leveraging Open Source for Database Development: Database Version Control wit...
Leveraging Open Source for Database Development: Database Version Control wit...
Reactive Jersey Client
Reactive Jersey Client
Oracle Database Management REST API
Oracle Database Management REST API
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
Más de David Delabassee
JVMs in Containers - Best Practices
JVMs in Containers - Best Practices
David Delabassee
JVMs in Containers
JVMs in Containers
David Delabassee
Serverless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
David Delabassee
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
David Delabassee
Randstad Docker meetup - Serverless
Randstad Docker meetup - Serverless
David Delabassee
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed Banff
David Delabassee
Serverless Kotlin
Serverless Kotlin
David Delabassee
REST in an Async World
REST in an Async World
David Delabassee
JAX-RS 2.1 Reloaded
JAX-RS 2.1 Reloaded
David Delabassee
Java EE 8 - February 2017 update
Java EE 8 - February 2017 update
David Delabassee
Java EE Next
Java EE Next
David Delabassee
Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016
David Delabassee
HTTP/2 comes to Java
HTTP/2 comes to Java
David Delabassee
Java EE 8 - Work in progress
Java EE 8 - Work in progress
David Delabassee
HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)
David Delabassee
EJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and Strategy
David Delabassee
HTTP/2 Comes to Java
HTTP/2 Comes to Java
David Delabassee
HTTP/2 Comes to Java
HTTP/2 Comes to Java
David Delabassee
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
David Delabassee
Avatar 2.0
Avatar 2.0
David Delabassee
Más de David Delabassee
(20)
JVMs in Containers - Best Practices
JVMs in Containers - Best Practices
JVMs in Containers
JVMs in Containers
Serverless Java Challenges & Triumphs
Serverless Java Challenges & Triumphs
Serverless Java - Challenges and Triumphs
Serverless Java - Challenges and Triumphs
Randstad Docker meetup - Serverless
Randstad Docker meetup - Serverless
Java Serverless in Action - Voxxed Banff
Java Serverless in Action - Voxxed Banff
Serverless Kotlin
Serverless Kotlin
REST in an Async World
REST in an Async World
JAX-RS 2.1 Reloaded
JAX-RS 2.1 Reloaded
Java EE 8 - February 2017 update
Java EE 8 - February 2017 update
Java EE Next
Java EE Next
Java EE Next - BeJUG JavaOne Afterglow 2016
Java EE Next - BeJUG JavaOne Afterglow 2016
HTTP/2 comes to Java
HTTP/2 comes to Java
Java EE 8 - Work in progress
Java EE 8 - Work in progress
HTTP/2 comes to Java (Dec. 2015 version)
HTTP/2 comes to Java (Dec. 2015 version)
EJB and CDI - Alignment and Strategy
EJB and CDI - Alignment and Strategy
HTTP/2 Comes to Java
HTTP/2 Comes to Java
HTTP/2 Comes to Java
HTTP/2 Comes to Java
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
Avatar 2.0
Avatar 2.0
Último
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
Anthony Dahanne
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
Christian Birchler
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
ssuser9e7c64
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
itservices996
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
osttopstonverter
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
andrehoraa
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
vyaparkranti
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
Lionel Briand
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
OnePlan Solutions
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
preethippts
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
Shane Coughlan
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
Tier1 app
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
Shane Coughlan
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
confluent
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Drew Moseley
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
team-WIBU
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
Marharyta Nedzelska
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
RTS corp
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Applitools
Último
(20)
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Java EE 8 - What’s new on the Web front
1.
Java EE 8
What’s new on the Web front David Delabassee -‐ @delabassee Oracle Copyright © 2015, Oracle and/or its affiliates. All rights reserved. 1
2.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. 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. Safe Harbor Statement
3.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Agenda Context Web Front update Call to Action 1 2 3
4.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Agenda Context Web Front update 1 2 Context Web Front update Call to Action 3
5.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Java EE 8 Cloud Mobile HTTP/2 SECURITY Reactive Programming User Experience
6.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved.
7.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Community-‐Prioritized Features http://glassfish.org/survey
8.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Java EE 8 Themes • HTML5 / Web Tier Enhancements • Ease of Development • Infrastructure for running in the Cloud
9.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Agenda Context Web Front update 1 2 3 Context Web Front update Call to Action
10.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSRs Updated • Servlet • JAX-‐RS • JavaServer Faces • JSON-‐P New • JSON-‐B • MVC 10
11.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON • Java API for JSON Processing • Process JSON • Java API for JSON Binding • Unmarshall JSON to Java • Marshall Java to JSON 11
12.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 Java API for JSON Processing • Keep JSON-‐P spec up-‐to-‐date • Track new standards • Add editing operations to JsonObject and JsonArray • Java SE 8 • JSON Big Data 12
13.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 • String syntax for referencing a JSON value "/0/phone/mobile" JSON-‐Pointer – IETF RFC 6901 13
14.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 JsonArray contacts = … JsonPointer pointer = new JsonPointer("/0/name"); JsonValue value = pointer.getValue(contacts); [ { "name":"Duke", "gender":"M", "phones":{ "home":"650-‐123-‐4567", "mobile":"650-‐234-‐5678"}}, { "name":"Jane", "gender":"F", "phones":{ "mobile":"707-‐555-‐9999"}} ] 14
15.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 • String syntax for referencing a JSON value “/0/name" • Methods – getValue() – JSON operations: add(), replace(), remove() JSON-‐Pointer – IETF RFC 6901 JsonPointer pointer = new JsonPointer("/0/name"); JsonArray result = pointer.replace(contacts, Json.createValue("Alex")); 15
16.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 • Patch is a JSON document – Array of objects / operations for modifying a JSON document – add, replace, remove, move, copy, test JSON-‐Patch – IETF RFC 6902 [ {"op":"replace","path":"/0/phones/mobile","value":"650-‐111-‐222"}, {"op":"remove","path":"/1"} ] 16
17.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 [ { "op":"replace", "path":"/0/phones/mobile", "value":"650-‐111-‐2222"}, { "op":"remove", "path":"/1"} ] [ { "name":"Duke", "gender":"M", "phones":{ "home":"650-‐123-‐4567", "mobile":"650-‐234-‐5678"}}, { "name":"Jane", "gender":"F", "phones":{ "mobile":"707-‐555-‐9999"}} ] 17
18.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 [ { "op":"replace", "path":"/0/phones/mobile", "value":"650-‐111-‐2222"}, { "op":"remove", "path":"/1"} ] [ { "name":"Duke", "gender":"M", "phones":{ "home":"650-‐123-‐4567", "mobile":"650-‐111-‐2222"}}, { "name":"Jane", "gender":"F", "phones":{ "mobile":"707-‐555-‐9999"}} ] 18
19.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 [ { "op":"replace", "path":"/0/phones/mobile", "value":"650-‐111-‐2222"}, { "op":"remove", "path":"/1"} ] [ { "name":"Duke", "gender":"M", "phones":{ "home":"650-‐123-‐4567", "mobile":"650-‐111-‐2222"}} ] 19
20.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JsonArray target = …; JsonArray patch = …; JsonPatch jsonPatch = new JsonPatch(patch); JsonArray result = jsonPatch.apply(target); JSON-‐P 1.1 JsonPatchBuilder builder = new JsonPatchBuilder(); JsonArray result = builder.add("/Joe/phones/office", "1234-‐567") .remove("/Amy/age") .apply(contacts); 20
21.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 JSON-‐Merge Patch – IETF RFC 7386 Orignal Patch Result {"a":"b"} {"a":"c"} {"a":"c"} {"a":"b"} {"b":"c"} {"a":"b", "b":"c"} {"a":"b"} {"a":null} { } {"a":"b", {"a":null} {"b":"c"} "b":"c"} { } {"a": {"a": {"bb": {"bb": {"ccc": {}}} null}}} 21
22.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 { "title": "Hello!", "author": { "familyName": null }, "tags": [ "example" ], "phoneNumber": "+01-‐123-‐456-‐7890" } { "title": "Goodbye!", "author": { "givenName": "John", "familyName": "Doe" }, "tags": [ "example", "sample" ], "content": "This will be unchanged" } { "title": "Hello!", "author": { "givenName": "John" }, "tags": [ "example" ], "content": "This will be unchanged", "phoneNumber": "+01-‐123-‐456-‐7890" } JSON-‐Merge Patch – IETF RFC 7386 22
23.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JsonObject contact = …; // The target to be patched JsonObject patch = …; JsonValue output = JsonMergePatch.mergePatch(target, patch); JSON-‐P 1.1 JSON-‐Merge Patch – IETF RFC 7386 23
24.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 • Reverse operation – Given two objects returns the patch to apply (diff) JSON-‐Patch & JSON-‐Merge Patch Diff JsonValue output = JsonMergePatch.diff(original, target); JsonArray diff = JsonPatch.diff(original, target); 24
25.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 JSON Query using Lambda Operations JsonArray cars = ...; List<String> audis = cars.getValuesAs(JsonObject.class).stream() .filter(x-‐>"Audi".equals(x.getString("brand"))) .map(x-‐>(x.getString("serial")) .collect(Collectors.toList()); 25
26.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 JSON Query collecting results in JsonArray JsonArray cars = ...; JsonArray audis = cars.getValuesAs(JsonObject.class).stream() .filter(x-‐>"Audi".equals(x.getString("brand"))) .map(x-‐>(x.getString("serial")) .collect(JsonCollectors.toJsonArray()); 26
27.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐P 1.1 • Keep JSON-‐P spec up-‐to-‐date • Track new standards • Add editing operations to JsonObject and JsonArray • Java SE 8 • JSON Big Data JSR 374 27
28.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐B • API to marshal/unmarshal Java objects to/from JSON – Similar to JAXB runtime API in XML world • Default mapping of classes to JSON – Annotations to customize the default mappings – JsonProperty, JsonTransient, JsonNillable, JsonValue, … Java API for JSON Binding 28
29.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐B • Draw from best practices of existing JSON binding implementations – Jackson, Genson, EclipseLink MOXy, Fleece, JSON-‐lib, Gson, Flexjson, Json-‐io, JSONiJ, Johnzon, Xstream, etc. • Switch JSON binding providers • Implementations compete on common ground Standard API 29
30.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JSON-‐B // from default JsonbBuilder instance of the default JsonbProvider Jsonb jsonb = JsonbBuilder.create(); JsonbProvider myProvider = JsonbProvider.provider("foo.bar.ProviderImpl"); Jsonb jsonb = JsonbBuilder.newBuilder(myProvider); // UnMarshall Book book = jsonb.fromJson(new File("myBook.json"), Book.class); // Marshall jsonb.toJson(myObject, new File(“foo.json”)); jsonb.toJson(myObject, new PrintWriter(System.out)); 30
31.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Java API for RESTful Web Services 31
32.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Server-‐sent Events • Part of HTML5 standardization • Server-‐to-‐client streaming of text data • Media type: “text/event-‐stream” • Long-‐lived HTTP connection – Client establishes connection – Server pushes update notifications to client 32
33.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Server-‐sent Events • Servlet, WebSocket, JAX-‐RS or standalone API? • JAX-‐RS deemed most natural fit – Streaming HTTP resources already supported – Small extension • Server API: new media type; EventOutput • Client API: new handler for server side events – Convenience of mixing with other HTTP operations; new media type – Jersey already supports SSE 33
34.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Server-‐sent Events @Path("tickers") public class StockTicker { … @Get @Produces("text/event-‐stream") public EventOutput getQuotes() { EventOutput eo = new EventOutput(); new StockThread(eo).start() return eo; } } JAX-‐RS resource class 34
35.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JAX-‐RS StockThread class class StockThread extends Thread { private EventOutput eo; … @Override public void run() { try { … eo.send(new StockQuote("...")); } catch (IOException e) { … } } } Server-‐sent Events 35
36.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. WebTarget target = client.target("http://example.com/tickers"); EventSource eventSource = new EventSource(target) { @Override public void onEvent(InboundEvent inboundEvent) { StockQuote sq = inboundEvent.readData(StockQuote.class); // ... } }; eventSource.open(); JAX-‐RS Client Server-‐sent Events 36
37.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JAX-‐RS 2.1 37 • Server-‐sent Events • Improving integration with CDI • JSON-‐B Integration • Building upon the hypermedia API • NIO support in providers (filters, interceptors, …) • Reactive API • JAX-‐RS resource classes as MVC controllers • …
38.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Java Servlet 38
39.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. HTTP 1.1 circa 1999 • HoLB • HTTP uses TCP poorly - HTTP flows are short and bursty - TCP was built for long-‐lived flows • Solutions - File concatenations, Assets Inlining, Domain sharding, etc. Problems Vs Solutions 39
40.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. HTTP/2 • HTTP/2 – Hypertext Transfer Protocol version 2 -‐ RFC 7540 – HPACK -‐ Header Compression for HTTP/2 -‐ RFC 7541 • Reduce latency • Address the HOL blocking problem • Support parallelism • Retain semantics of HTTP 1.1 • Define interaction with HTTP 1.x Address the Limitations of HTTP 1.x 40
41.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. HTTP/2 • One TCP Connection • Request -‐> Stream – Multiplexed – Prioritised • Binary Framing Layer – Prioritisation – Flow Control – Server Push • Header Compression Multiplexed Binary Frames POST /upload HTTP/1.1 Host: www.test.com Content-‐Type: application/json Content-‐Length: 15 {“name”:“duke”} HTTP 1.1 HTTP/2 HEADERS frame DATA frame 41
42.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Stream Prioritization • Stream Dependency in HEADERS Frame • PRIORITY frame type • An additional 40 bytes - Stream id (31) - Weight (8): [1, 256] - Exclusive bit (1) • Only an advice A B C 4 12 A B CD 4 16 12 exclusive = 0 A B C D 4 12 16 exclusive = 1 42
43.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. HTTP/2 Server Push /index.html : stream 1 /style.css : stream 2 /logo.png : stream 4 Client Server stream 1 HEADERS stream 1 FRAME x stream 2 PROMISE stream 4 PROMISE 43
44.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. HTTP/2 Header Compression 44
45.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Servlet 4.0 • Request/response multiplexing – Servlet Request as HTTP/2 message • Stream prioritization – Add stream priority to HttpServletRequest • Server push • Binary framing • Upgrade from HTTP 1.1 HTTP/2 Features in Servlet API 45
46.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Push PushBuilder builder = baseRequest.getPushBuilder(); builder.addHeader(“X-Pusher", …); builder.path(aResource) .etag(associated._etag) .lastModified(associated._lastModified) .push(); 46
47.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Stream Prioritization 47 • New Priority class – boolean exclusive – int streamId – int weight • New methods to HttpServletRequest – int getStreamId() – Priority getPriority() • New methods to HttpServletResponse – int getStreamId() – Priority getPriority() – void setPriority(Priority p) • Dependency?
48.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. 48
49.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. 49
50.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. 50
51.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. 51
52.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. 52
53.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Model-‐View-‐Controller 53 • Pattern used to implement a User Interface • Consists of 3 major components – Model – View – Controller • Each of the components has a distinct responsibility
54.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Component-‐based MVC • A specific style of MVC made popular by component frameworks • Controller provided by the framework • Examples – JavaServer Faces – Wicket – Tapestry – Seam (discontinued) – Apache Click (retired) 54
55.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Action-‐based MVC • Controller(s) defined by the application • Examples – Struts 1 (end of life), Struts 2 – Spring MVC • No standard Java EE implementation – Good news we are creating one! – Targeted for inclusion in Java EE 8 55
56.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Model-‐View-‐Controller (MVC 1.0) Specification • “Action-‐based” MVC 1.0 JSR • Why? – UI landscape is not one size fits all – Java EE 8 Community Survey – Talking to our customers, etc. JSR 371 56
57.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. MVC 1.0 • Action-‐based MVC • Glues together key Java EE technologies – Model : CDI, Bean Validation, JPA – View : Facelets, JSP, more? – Controller : Invent new technology Vs. Leverage existing technologies 57 Principles
58.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Controller • Combine data models and views to produce web application pages @Path("hello") public class HelloController { @GET @Controller public String hello() { // do something return "hello.jsp"; } } 58
59.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Controller • Class/method decorated with @Controller @Path(“hello") @Controller public class HelloController { @GET @View(“hello.jsp") public void hello() { // do business stuff } } 59
60.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Controller @Path(“hello") @Controller public class HelloController { @GET public Viewable hello() { // some other stuff return new Viewable("hello.jsp"); } } 60
61.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Controller … @GET @Controller public Response getById(@PathParam("id") String id) { if (id.length() == 0) { return Response.status(Response.Status.BAD_REQUEST) .entity(“error.jsp") .build(); } } 61
62.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Model • “Refers to the data” • CDI @Named bean • javax.mvc.Models interface 62
63.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Model @Named(“greeting”) @RequestScoped public class Greeting { private String message; public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } } 63
64.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Model @Path(“hello”) public class HelloController { @Inject private Models models; @GET @Controller public String hello() { models.set(“greeting”, new Greeting(“Salut”)); return “hello.jsp”; } } 64
65.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. View • Define the structure of the output • Can refer to model(s) • Rendered by a View Engine – JSP – Facelets • Not accessible as static resources – /WEB-‐INF/views/ 65
66.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. View <%@ page contentType=“text/html;charset=UTF-8” language=“java” %> <html> <head> <title>Home</title> </head> <body> <p>${greeting.message}</p> </body> </html> 66
67.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. View <html> <head> <title>FreeMarker</title> </head> <body> <p>Hello ${user}</p> … </body> </html> 67
68.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. View Engine • CDI based extension mechanism • javax.mvc.engine.ViewEngine interface boolean supports(String view); void processView(ViewEngineContext context) throws ViewEngineException; • Ozark – JSP & Facelets – FreeMarker, Velocity, Thymeleaf, Mustache, Handlebars, Jade, AsciiDoc, … 68
69.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Miscellaneous • Bootstrap via javax.ws.rs.core.Application • Validation • Exception Mapping Providers • New @RedirectScoped scope • Security • @Produces • CDI Events… 69
70.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. MVC • New annotations – @Controller, @View, @csrf, @RedirectScoped • Doing MVC now is not a bad idea – Leveraging CDI, JAX-‐RS, Facelets, BV – More? Servlet 4.0’s ServerPush – Delivering an easy migration path if you are using JSPs • Offers more choices 70
71.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. JavaServer Faces 71 • CDI Alignment – @Inject FacesContext, ExternalContext, etc. – CDI managed versions of Validator and Converter – Rely on CDI for EL resolving – Invoking CDI managed bean methods directly from Ajax, etc. • “Adjustments” for MVC • Misc. – Multi-‐field validation, etc.
72.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Agenda Context Web Front update 1 2 72 3 Context Web Front update Call to Action
73.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Java EE 8 • Java EE 8 Platform (JSR 366) • CDI 2.0 (JSR 365) • JSON Binding 1.0 (JSR 367) • JMS 2.1 (JSR 368) • Servlet 4.0 (JSR 369) • JAX-‐RS 2.1 (JSR 370) • MVC 1.0 (JSR 371) • JSF 2.3 (JSR 372) • Java EE Management 2.0 (JSR 373) • JSON-‐P 1.1 (JSR 374) • Java EE Security 1.0 (JSR 375) So far….. 73 Early Draft Review
74.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Roadmap • Q4 2015 Early Draft • Q1 2016 Public Review • Q3 2016 Proposed Final Draft • H1 2017 Final Release 74
75.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Contribute! • Join the JCP • “Adopt-‐A-‐JSR” – http://glassfish.java.net/adoptajsr • Get involved – For any Spec, join users mailing list – Test SNAPSHOT and milestone builds of RIs – Tweet, blog, socialize to raise awareness – Fill issues! • The Aquarium Blog – https://blogs.oracle.com/theaquarium/ 75
76.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved. Takk!
77.
Copyright © 2015,
Oracle and/or its affiliates. All rights reserved.
Descargar ahora