Understanding RESTFUL Web services with Java Applications

Rest (Representational State Transfer) is a style of architecture  (client and server) for designing Network Applications. Instead of Complex mechanisms like CORBA, RPC or SOAP to connect different machines, here Rest Uses HTTP to make calls between machines. REST is a lightweight alternative to mechanisms like RPC (Remote Procedure Call) and Web Services (SOAP).

REST is not a standard that uses HTTP methods such as  GET  and  POST for all four CRUD (Create/Read/Update/Delete) operations. Most f the Ways World Wide Web itself, based on HTTP, can be viewed as a REST-based architecture.

In RESTful, Web Services are viewed as resources and can be identified by their URLs. REST architecture you typically have a REST server which provides access to the resources and a REST client who accesses and modify the REST resources. Rest is Platform and Language independent.

Another advantage of REST lies with performance. It has better cache support, lightweight requests and responses. It is also reduces network traffic. Some real REST examples are Amazon s S3 storage solution and Atom is a RESTful alternative to RSS.

Let s see How to Implement Restful Webservices in Java. JAX-RS (Java API for Restful Webservices) is a Java API to implement web services according to REST Architecture style. We know   in rest everything consider as resources ,JAX-RS provides some annotations like @Path, @GET, @POST, @DELETE,@ Produces and @Consumes   to aid in mapping a resource class (POJO) as a web resource.

We can implement REST in java application using frameworks like RESTEasy, Jersey and Restlet. Spring, the most popular framework for building Java EE applications, now supports REST in its MVC layer.

RESTEasy – It is a JBoss project that provides various frameworks to help you build RESTful Web Services and RESTful Java applications. If you use JBoss/SEAM then this one is best.

Jersey – It is an open source, most popular JAXRS (JSR 311) Reference implementation for building RESTful Webservices. It contains lot of features like WADL, implicit views, XML/JSON/Atom support. If you want to use spring for Dependency Injection then Jersey is best choice.
I hope this post will be useful for understanding REST and We will see some examples in upcoming posts.

About mohan

This is Mohan Jayapalan author of TechPages Blog.I am a part time blogger and Currently working for private Software Concern.


  1. Ronak Amlani says:

    awesome!! artical really helpful to me TNk u.. 🙂

  2. devlad says:

    @jmohan sathya good artical about intro on RESTful services.

  3. Venky says:

    Very good introductory article on Rest

© Copyright 2010-2016 www.techpages.org · All Rights Reserved · Powered by WordPress ·