GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Notizen

Riot

Nate Portner Englisch 1 Seite

Inhalt der Notizen (1)

Seite 1

APIs

Client <--> REST API <--> Resource

API sends data to client from the resource

GET retrieves data and sends it to the client - often via JSON or XML

PUT inserts data into the resource then returns the result to the client

Represntational State Transfer - architecture design constraints that produce efficient, reliable and scalable systems

rest is not a specific technology

Web Application - each page is a view representing the current state - application sends URI (universal resource identifier) request for a resource to the API, then uses the data to build the view

Application Programming Interface (API) - set of rules and features in a prgoram enabling it to interact with other items, such as software or hardware

URI - URL is a subset of URI. Like URIs, URLS is a unique identifier, but also provides a method of access (such as http:// or ftp://

Within REST APIs, we can use URLs or URNs (Universal resource names - just name of the resource). Both of these are types of URIs

REST Constraints

1. Client-Server architecture - The client manages user interface concerns while the server manages data storage concerns

a. this allows for a complete separation between the content and its representation

b. this also means that multiple clients can interact with the REST server at once

2. Statelessness - no client information or content can be stored on the server

a. in some cases (like authentication keys), the information must be passed to a database and stored for a set period of time.

3. Cacheability - All REST responses must be clearly marked as cacheable or not cacheable. this ensures caching works as expected on the client end.

4. Layered System - The client cannot know - and shouldn't care - whether it's connected directly to the server to an intermediary like a CDN or mirror. This helps with security and scalability

5. Code on Demand - Servers are allowed to transfer executable code like JS and compiled components for clients

6. Uniform interface

6.1 Resource Identification requests - the URI must specify what source its looking for and what format the response should use (i.e. asking for a SQL table in JSON or XML)

6.2 resource manipulation through representations - once a cient has a representation of a resource, it can modify or delete the resource

this essentially means that the client can control what's stored on the server

6.3 Self descriptive messages - Ech representation must describe its own data format - without that, the data can't be reliabvly parsed

6.4 Must use Hypermedia as the engine of the application - Once a client has access to a rest service, it should be able to discover all available resources nd methods hrough the hyperlinks provided (i.e. the resource returned describes it's use)

Informationen

Beschreibung
Notiz am Riot, erstellt von Nate Portner am 24/07/2018.
Erstellt von
Nate Portner · Jul 2018
Aktualisiert
25 Jul 2018
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck