The second part of this chapter is devoted to the other main type of web services, that is, the REST services . As mentioned previously, we can briefly define them as the creation of web services over HTTP protocol with minimum overload. REST (Representational State Transfer) is a complete architecture for building software defined in 2000 by Roy Fielding http://en.wikipedia.org/wiki/Representational_State_Transfer (http://bit.ly/nnTsYp). We are not covering it, but we will learn how to consume a public REST service.
Typically, most of modern public API web services rely on:
Defining requests via URL parameters (both path and query string)
Simplifying response complexity and weight using formats as JSON (JavaScript Object Notation) instead of XML
Making use of HTTP verbs with full semantic, such as
GET
for reading,PUT
for adding or updating, andDELETE
for erasing
These are also common principles in the REST architecture, but they should not be confused. Here...