Engineering Full Stack Apps with Java and JavaScript
REST stands for Representational State Transfer and is a newer addition to the web service family.
Roy Fielding coined the acronym REST in his Ph.D dissertation to describe an architectural style in the design of scalable web services.
REST is based on existing web-standards like the HTTP protocol and a set of standard http operations like POST, GET, PUT, and DELETE. In a REST-style service, a client might send a standard HTTP request to a web service and receives an appropriate response in a MIME-TYPE of their choice like XML, Text, JSON, user-defined etc. Also do remember that REST is not actually protocol specific, though people almost always use it with HTTP.
REST is also based on guidelines, than based on strict rules as in the case of SOAP web services.
If you are new to web services, then you may first read about web services @ http://javajee.com/introduction-to-web-services-in-java. If you are not familiar with HTTP, I would recommend you go through the complete notes or atleast the initial notes available @ http://javajee.com/java-ee-web-components-part1-http-servlets-and-security.
REST follows resource oriented architecture as opposed to the popular service oriented architecture followed by SOAP web services. A resource is a source of representations, and a representation is data about the current state of a resource. You may read more @ http://javajee.com/resource-oriented-architecture.
REST web services are based on existing web-standards like the HTTP protocol and a set of standard http operations like POST, GET, PUT, and DELETE. So an understanding of the HTTP protocol and even the Java EE environment, will help you learn and understand REST better. Read more about HTTP, Servlets and Security @ http://javajee.com/java-ee-web-components-part1-http-servlets-and-security.
Web services are services that can be located and invoked by client applications over a network (e.g. internet) automatically without human interaction.
Web services are different from web applications. While web applications are applications with web pages that reside on a server, primarily for use by humans, a web service is a server-based application component meant primarily for interaction with other programs. A web application might use a web service to retrieve and populate some data from another server without the end user knowing about it.
In SOAP based web services messages (requests and responses) are exchanged in an XML format called SOAP, unlike REST that uses existing HTTP protocol and support multiple data formats.
Read more about web services, SOAP and differences of SOAP and REST @ http://javajee.com/introduction-to-web-services-in-java.
REST is a software architecture style consisting of guidelines and best practices for creating scalable web services, and not a protocol that enforces a set of rules as in the case of SOAP.
An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. Architectural patterns are similar to software design patterns, in that both of them provide a general, reusable solution to a commonly occurring problem. However architecture patterns have a broader scope than design patterns.
Architecture has a broader scope than design and hence architectural patterns have a broader scope than design patterns. Architectural decisions include which programming language to use, what design approach to use or which application server to use etc. along with many other things.
Based on the architecture, the designer will design the application usually using diagrams like UML and specifies how a developer should implement the application.
All design patterns take care of mainly code maintainability as their primary goal. Architectural patterns also address various issues in software engineering, such as computer hardware performance limitations, high availability and minimization of a business risk.
http://en.wikipedia.org/wiki/Representational_state_transfer
http://en.wikipedia.org/wiki/Architectural_pattern
RESTful Java with JAX-RS by Bill Burke
RESTful Web Services by Leonard Richardson
Comments
nice and crisp introduction .
nice and crisp introduction ...I would like to add definition for ROA here..
A resource-oriented architecture (ROA) is the structural design supporting the internetworking of resources. A resource, in this context, is any entity that can be identified and assigned a uniform resource identifier (URI)