본문 바로가기

프로그래밍

REST - Representational State Transfer(from Sun Tech Days 2)


Rest is architecture style is not standard
CRUD Method -> URI sets
CRUD -> GET, POST, PUT, DELETE
         get - retrieve resource(select)
         put - update with known ID(update)
         post create new resource(insert)
         delete - remove(delete)

RPC(Remote Procedure Call)

REST specifications
step 1. Every "Thing" has an ID
  - "thing" == resource class
  - ID provided by @path annotation
step 2. "Things" are linked together (Data of "things" contains reference to related "things", Use URI)
step 3. Access with Standard Methods(by CRUD)
step 4. Multiple representation(xml, json and so on...)
step 5. Stateless Communication(Client is in charge of application states)

REST key benefits
Server side
 - works well web infrastructures
 - reduce coupling
 - straightforward failover
 - cacheable(fast processing)

Client side
 - bookmarkable
 - can use veriaty devolope lanauage
 - choice of data formats(xml, json...)