Table of Contents for
RESTful Web Clients
Close
Version ebook
/
Retour
RESTful Web Clients
by Mike Amundsen
Published by O'Reilly Media, Inc., 2017
nav
Cover
Praise for RESTful Web Clients
RESTful Web Clients
RESTful Web Clients
Dedication
Foreword
Preface
Prologue: Well, That Was a Fun Trip, Eh?
Bob, Carol, and BigCo, Inc.
1. Our HTML Roots and Simple Web APIs
2. JSON Clients
3. The Representor Pattern
4. HAL Clients
5. The Challenge of Reusable Client Apps
6. Siren Clients
7. Versioning and the Web
8. Collection+JSON Clients
9. Hypermedia and Microservices
Epilogue: Welcome to Your Future
A. Project List
B. Tools and Resources
Index
About the Author
Colophon
Foreword
Preface
What’s in This Book
The Chapters
The Dialogues
The Artwork
What’s Not in This Book
User Interface Design
Basics of Hypermedia
Programming with HTML, CSS, and JavaScript
Source Code
External References
Conventions Used in This Book
O’Reilly Safari
How to Contact Us
Acknowledgments
Prologue: Well, That Was a Fun Trip, Eh?
References
Bob, Carol, and BigCo, Inc.
Credits
1. Our HTML Roots and Simple Web APIs
The Task Processing System (TPS) Web App
HTML from the Server
Common Web Browser as the Client
Observations
The Task Services Web API
Web API Common Practice
Designing the TPS Web API
Implementing the TPS Web API
Observations
Summary
References
2. JSON Clients
The JSON Web API Client
Objects
Addresses
Actions
Quick Summary
The JSON SPA Client
The HTML Container
The Top-Level Parse Loop
Objects, Addresses, and Actions
Dealing with Change
Adding a Field and Filter
Coding a New Client
Summary
References
3. The Representor Pattern
XML or JSON: Pick a Side!
The New Crop of Hypermedia Formats
The Fallacy of The Right One
Reframing the Problem
The Representor Pattern
Separating Format from Functionality
The Selection Algorithm
Adapting and Translating
A Server-Side Model
Handling the HTTP Accept Header
Implementing the Message Translator Pattern
General Representor Modules
The WeSTL Format
A Sample Representor
Summary
References
4. HAL Clients
The HAL Format
Links
Objects and Properties
Embedded Links and Objects
Quick Summary
The HAL Representor
Links
Properties
Embedded
Sample TPS Output from the HAL Representor
The HAL SPA Client
The HTML Container
The Top-Level Parse Loop
Links
Embedded
Properties
Handling Actions for HAL
Quick Summary
Dealing with Change
Adding an Action
The HAL-FORMS Extension
The Specification
The Implementation
Summary
References
5. The Challenge of Reusable Client Apps
What Problem Are You Solving?
Double Diamond Model of Design
Closed Solution Versus Open Solution
Modeling Interaction
Maldonado’s Mechanisms
Verplank’s Humans
A Hypermedia Interaction Loop
The Request, Parse, Wait Loop
Implementing RPW in Code
Handling Verplank’s KNOW Step
Summary
References
6. Siren Clients
The Siren Format
Entities
Class
Properties
Links
Actions
SubEntities
Quick Summary
The Siren Representor
The Top-Level Loop
Class
Properties
Entities
Actions
Links
Sample TPS Output from the Siren Representor
The Siren SPA Client
The HTML Container
The Top-Level Parse Loop
Links
Entities
Properties
Actions
Quick Summary
Dealing with Change
Adding the Email Field and Filter
Testing the Email Field
The Profile Object Description (POD) Extension
The POD Specification
The Implementation
Displaying Objects in Siren Using POD
Quick Summary
Summary
References
7. Versioning and the Web
Versioning for the Internet
TCP/IP’s Robustness Principle
HTTP’s Must Ignore
HTML’s Backward Compatibility
Guidelines for Non-Breaking Changes
API Designers
Server Implementors
Client Implementors
Summary
References
8. Collection+JSON Clients
The Collection+JSON Format
Links
Items
Queries
Template
Error
A Quick Summary
The Collection+JSON Representor
The Top-Level Processing Loop
Links
Items
Queries
Template
Error
The Collection+JSON SPA Client
The HTML Container
The Top-Level Parse Loop
Links
Items
Queries
Template
Error
Quick Summary
Dealing with Change
Adding the Note Object to the TPS API
Cj and the OAA Challenge
Quick Summary
Extending Collection+JSON
Supporting Improved Input with Cj-Types
The Cj-Suggest Extension
Quick Summary
Summary
References
9. Hypermedia and Microservices
The Unix Philosophy
The TPS Microservices at BigCo
The Tasks Service with Collection+JSON
The User Service with Siren
The Notes Service with HAL
One Client to Rule Them All
The Home Service
The Multiformat Client SPA Container
The Format-Switching Client UI
Summary
References
Epilogue: Welcome to Your Future
A. Project List
Chapter 1, Our HTML Roots and Simple Web APIs
Chapter 2, JSON Clients
Chapter 3, The Representor Pattern
Chapter 4, HAL Clients
Chapter 5, The Challenge of Reusable Client Apps
Chapter 6, Siren Clients
Chapter 7, Versioning and the Web
Chapter 8, Collection+JSON Clients
Chapter 9, Hypermedia and Microservices
B. Tools and Resources
Hardware
Software
Libraries
Services
Index