Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Nächste SlideShare
The Rest Architectural Style
The Rest Architectural Style
Wird geladen in …3
×

Hier ansehen

1 von 10 Anzeige
Anzeige

Weitere Verwandte Inhalte

Ähnlich wie 80068 (20)

Anzeige

Aktuellste (20)

80068

  1. 1. By S . Ragavi II MSC[CS] Nadar Saraswathi College of Arts and Science Theni
  2. 2. What is REST  REST is acronym for REpresentational State Transfer. It is architectural style for distributed hypermedia systems and was first presented by Roy Fielding in 2000 in his famous dissertation.  Like any other architectural style, REST also does have it’s own 6 guiding constraints which must be satisfied if an interface needs to be referred as RESTful.
  3. 3. Restful Methods  POST – This would be used to create a new employee using the RESTful web service  GET - This would be used to get a list of all employee using the RESTful web service  PUT - This would be used to update all employee using the RESTful web service  DELETE - This would be used to delete all employee using the RESTful web service
  4. 4. Guiding Principles of REST  Client–server – By separating the user interface concerns from the data storage concerns, we improve the portability of the user interface across multiple platforms and improve scalability by simplifying the server components.  Stateless – Each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.  Cacheable – Cache constraints require that the data within a response to a request be implicitly or explicitly labeled as cacheable or non-cacheable. If a response is cacheable, then a client cache is given the right to reuse that response data for later, equivalent requests.
  5. 5.  Uniform interface – By applying the software engineering principle of generality to the component interface, the overall system architecture is simplified and the visibility of interactions is improved. In order to obtain a uniform interface, multiple architectural constraints are needed to guide the behavior of components. REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self-descriptive messages; and, hypermedia as the engine of application state.  Layered system – The layered system style allows an architecture to be composed of hierarchical layers by constraining component behavior such that each component cannot “see” beyond the immediate layer with which they are interacting.  Code on demand (optional) – REST allows client functionality to be extended by downloading and executing code in the form of applets or scripts. This simplifies clients by reducing the number of features required to be pre-implemented.
  6. 6. What is JSON  JSON (JavaScript Object Notation) is most widely used data format for data interchange on the web. This data interchange can happen between two computer applications at different geographical locations or running within the same machine.  The good thing is that JSON is a human-readable as well as a machine-readable format. So while applications/libraries can parse the JSON documents – humans can also look at the data and derive the meaning from it.  All modern programming languages (e.g., Java, JavaScript, Ruby, C#, PHP, Python, and Groovy) and application platforms provide excellent support for producing (serializing) and consuming (deserializing) JSON data.
  7. 7. JSON File and MIME Type  The standard file type for storing a JSON document in the filesystem is .json.  JSON’s Internet Assigned Numbers Authority (IANA) media (or MIME) type is application/json
  8. 8. JSON Document  A JSON document may contain text, curly braces, square brackets, colons, commas, double quotes, and maybe a few other characters.  Primarily, a valid JSON document can contain two structures:  An Object surrounded by curly braces and containing multiple name/value pairs. In various languages, this is realized as an record, struct, dictionary, hash table, keyed list, or associative array.  An Array or Ordered list of values surrounded by square brackets. In most languages, this is realized as an vector, list, or sequence
  9. 9. Difference between REST API and JSON  JSON is a format, commonly associated with REST services, even though REST itself is format agnostic. That means that, while JSON is the most commonly used format, REST allows you to use XML, HTML, pure text, and even custom formats.
  10. 10. THANK YOU

×