In the Eclipse Juno release, EclipseLink is introducing a set of new features to support the development of HTML5 applications that interact with server side Java using REST. In this session we’ll look at the typical HTML5/Java EE REST stack and see how EclipseLink’s new features can be used to both simplify development through the use of declarative metadata as well as how it can enable the development of pure HTML5 applications that rely on database data. We’ll introduce each of the new features and see how they can be used, and combined, to build RESTful services. These features are:
- EclipseLink JPA-RS—provides a service that expose JPA mapped entities over REST either as XML with JAXB or JSON with EclipseLink JSON-B. It supports a full CRUD API as well as named query invocation.
- Resource Mapping—While JAXB and JSON-B provide a way to marshall to and from XML/JSON, RESTful services require a way to define what constitutes a resource. A naive approach of entity==resource may be used but is likely inefficient. With EclipseLink Resource Mapping the classes in a domain model can be declaratively mapped to a resource model which can be exposed using JPA-RS.
- EclipseLink Dynamic Provisioning—provides persistence services to pure HTML5 applications without the need for Java classes. With Dynamic Provisioning, HTML5 clients can dynamically define storage requirements for a set of classes (object types) and EclipseLink will instantiate a full JPA-RS CRUD service for those classes as well as JPQL query support.