Fast RESTful WS development with JEE8
@augustojimenez1
Augusto Alonso de Cruz Jimenez
Enero de 2019
"Make everything as simple as possible, but not simpler."
Albert Einstein
Augusto Alonso de Cruz Jimenez
@augustojimenez1
There are many implementations of de JVM Platform
Azul Zulu
Bck2Brwsr
CACAO
Codename One
DoppioJVM
OpenJ9
GraalVM CE
HaikuVM
HotSpot
Jamiga
JamVM
Jelatine JVM.
Jikes RVM
JVM.go
JVM.go
leJOS
Maxine
Multi-OS Engine
RopeVM
uJVM
JEE 7+ is designed to use POJO to turn them into managed objects
There is an initiative called Microprofile, which is designed to align with microservices architecture style applications.
A recommended article about the JEE's evolution (and another topics) is Microprofile: Mucho camino para llegar aquí, by @rugy
Java EE 8 was approved by the JCP EC on Aug 21, 2017. The final specification is available for download on this link.
Java EE 8 has 35+ specs, including:
Servlet, JAX-WS, JAX-RS, JPA, JAXB, JSONP, WebSockets, JSF, EL, JSTL, Batch, CDI, Bean Validation, etc.
A condensed list of specifications can be found at oracle.com
Java EE 8 is a spec
There are many providers (implementers)
The Expert Group validate the implementation.
Some Java EE8 certified Full implementations of the spec are:
Officially:
JSR 370: Java™ API for RESTful Web Services (JAX-RS 2.1) Specification
Implementations:
If an application server is fully compatible with JAX-RS, the same JAX-RS code is executed in any of them.
Provides some annotations to aid in mapping a resource class (a POJO) as a web resource. They include:
How a POJO annotated with JAX-RS looks like? It's time to code!!!
package com.example.book.restapi;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@Path("books")
public class BookResource {
@GET
public String resourceInfo() {
return "Book information";
}
}