Hypermedia Affordance with BEAR.Sunday
Hypermedia affordancewith BEAR.Sunday@koriym 2017
View Slide
IUUQTFOXJLJQFEJBPSHXJLJ"⒎PSEBODF
IUUQFLSJUTKQXQDPOUFOUVQMPBETDPNJDB⒎PSEBODFQEG
GET /menu
no affordance
rel=“order” !
/order but how ?
OPTIONS /order
POST /order/?name=latte☕
PUT /order?id=123&extra=shot
GET /order?id=123
OPTIONS /payment
PUT: the payment should be idempotent
IUUQTXXXJOGPRDPNKQBSUJDMFTXFCCFSSFTUXPSLqPXResource interface for state machineURI as state " " "
200 GET /menu 201 POST /order/?name=latte 100 PUT /order/?order_id=1234&extra=shot 200 PUT /payment?order_id&card_num=123&expire=101018 URIs as event source
* CQS* CQRS* Discoverable* Cache* Observe* Message Driven Development* Micro Service* Event Sourcing* Decoupled ComponentREST++
Hypermedia API
Hypermedia Driven Development
IUUQTXXXXPSHJOUFHSBUJPOXPSLTIPQQIZQFSNFEJBPSJFOUFEEFTJHOQEG
IUUQTXXXJOGPRDPNKQBSUJDMFTXFCCFSSFTUXPSLqPX
Self-Descriptive API
CURIEs (Compact URI)IUUQTFOXJLJQFEJBPSHXJLJ$63*&
IUUQKTPOTDIFNBPSH
backend + front-endUPEPKTPO UPEPTKTPO
? REST API
REST != CRUD over HTTP
REST != Return JSON with pretty URI
IUUQTXXXJOGPRDPNOFXT$36%3&45
IUUQTUXJUUFSDPNpFMEJOHTUBUVT
Network affordance
Information (+ affordance)NFOV SFMlPSEFSz
hypermedia affordanceSFMlPSEFSz
Internet Programing
= Programing Internet
BEE B⒎PSEBODF