Home » Software Development » REST Tooling

About Chris Haddad

Chris Haddad

REST Tooling

In section 6.3 of Roy’s dissertation, he explains how REST applies to HTTP. But the implementing a RESTful approach requires painstaking assembly without REST tooling. Java JAX-RS and API Management infrastructure reduce the learning curve, increase API adoption and decrease development effort by simplifying API creation, publication, and consumption.

The Java API for RESTful Web Services: JAX-RS

JSR 311, JAX-RS, is Java’s RESTful programming model. In JAX-RS, a single class corresponds to a resource. Java annotations are used to specify URI mappings, mime type information, and representation meta-data conforming with REST constraints (see Table 1).

Table 1. Mapping REST concepts to JAX-RS

REST conceptJAX-RS Annotation or classExamples
Addressability@Path and URI Path Template@Path(“/user/{username}”)
Uniform Interface@GET, @PUT, @POST, @DELETE, @HEAD@GET@Produces(“application/json”)public String getUser(String username) { return getUserService(username)); }
Self-descriptive messages@Produces, @Consumes@Produces({“application/xml”, application/json”})
HATEOASUriBuilderUriBuilder.fromUri(“http://localhost/”).   path(“{a}”). queryParam(“name”, “{value}”). build(“segment”, “value”);

WSO2 Application Server relies on Apache CXF to process JAX-RS annotations and expose a RESTful API.   Your existing Apache CXF code can be readily migrated to WSO2 Application Server.

API Management

RESTful APIs may be either naked or managed.  A naked API is not wrapped in security, subscription, usage tracking, and service level management.  A managed API increases reliability, availability, security, and operational visibility.   By placing an API gateway in front of your naked RESTful API or service, you can easily gain advanced capabilities (see Figure 1).

 Figure 1: API Management Capabilities and Topology

Figure 1: API Management Capabilities and Topology

 

The API gateway systematizes the API façade pattern, and enforces authorization, quality of service compliance, and usage monitoring without requiring any back-end API modifications.   Figure 2 demonstrates API facade actions commonly provided by industry leading API gateway products.

 Figure 2: API Façade Operations

Figure 2: API Façade Operations

 

WSO2 API Manager can easily integrate with your RESTful system and rapidly add advanced capabilities.  For more information on API management, read the technical evaluation guide.

Reference: REST Tooling from our JCG partner Chris Haddad at the IT Business Navigation Charts blog.
(0 rating, 0 votes)
You need to be a registered member to rate this.
Start the discussion Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments