reusable libraries for hypermedia clients: mike amundsen fluent conference speaking session
DESCRIPTION
What if you could create an app using an existing library that already understood a hypermedia format? What if you didn’t need to sweat low-level protocol details and could focus on the UI and the object model supplied by the server? What if this was all done via a standardized hypermedia API that could automatically adjust in small ways over time without requiring new client code or redeployment? What is the same library worked with multiple servers? Multiple APIs? Based material from the new book “RESTful Web APIs”, this talk walks you through the creation of a great UI for a Collection+JSON media type API and then shows how minor changes on the server are automatically handled by the client without rewrites or redeploys. The same library can even used for different APIs with the same smooth results. Reusable libraries for hypermedia clients is a reality.TRANSCRIPT
![Page 1: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/1.jpg)
1
Reusable Libraries for Hypermedia Clients
Mike Amundsen,Director of ArchitectureCA / Layer 7 Technologies@mamund
![Page 2: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/2.jpg)
2
Mike Amundsen
Author, Web Architect, Presenter
Building Hypermedia APIs with HTML5 and Node, 2011
RESTful Web APIs (w/ Leonard Richardson), 2013
![Page 3: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/3.jpg)
3
Reusable
![Page 4: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/4.jpg)
4
Reusable Data Models are Hard
![Page 5: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/5.jpg)
5
Reusable UIs are Hard
![Page 6: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/6.jpg)
6
Reusable
What’s left to re-use?
![Page 7: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/7.jpg)
7
Reusable Middleware
![Page 8: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/8.jpg)
8
Reusable Middleware on the Server
Apache/IIS/nodejs
Business Components
Web Services
![Page 9: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/9.jpg)
9
Reusable Middleware on the Server
Most server middleware is focused on “handling data requests”
![Page 10: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/10.jpg)
10
Reusable Middleware on the Client
JQuery
Bootstrap
Emberjs
![Page 11: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/11.jpg)
11
Reusable Middleware on the Client
Most client middleware is focused on “handling user requests”
![Page 12: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/12.jpg)
12
Reusable Middleware on ….
We need middleware focused on “network requests”
![Page 13: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/13.jpg)
13
Network Requests
The data
The actions
The message
![Page 14: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/14.jpg)
14
Reusable Middleware for the Network
![Page 15: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/15.jpg)
15
Reusable Middleware for the Network
Let’s build some reusable middleware for the network.
![Page 16: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/16.jpg)
16
Reusable Middleware for the Network
Let’s build a hypermedia library.
![Page 17: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/17.jpg)
17
Hypermedia Clients
Hypermedia clients are different…
![Page 18: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/18.jpg)
18
Hypermedia Clients are Different
Don’t code the problem, code the message
Don’t memorize details at build time
Recognize them at run time
Design to react, not dictate
![Page 19: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/19.jpg)
19
Process Steps
Select a media type (Collection+JSON)
Create the library (client-side JS)
Build a Client app (Cj Explorer)
![Page 20: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/20.jpg)
20
Select a Media Type
![Page 21: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/21.jpg)
21
Create the library
Learn about RFC2119 words
Implement all the MUSTS
Implement as many SHOULDs as you can
Implement the MAYs, if you are able
![Page 22: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/22.jpg)
22
Hypermedia Libraries
Let’s look at the code…
![Page 23: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/23.jpg)
23
Maintaining Hypermedia Libraries
Similar to SDKs
Language Support
Stay in tune w/ the spec
![Page 24: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/24.jpg)
24
Reusable Libraries for Hypermedia Clients
Lots of media types to support
- HAL
- Cj
- Siren
- JASON-API
- Mason
- UBER
![Page 25: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/25.jpg)
25
Reusable Libraries for Hypermedia Clients
Reusability at the network level
Spec-reading skills
Similar to SDKs
![Page 26: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/26.jpg)
26
Reusable Middleware for the Network
Let’s build hypermedia libraries!
![Page 27: Reusable Libraries for Hypermedia Clients: Mike Amundsen Fluent Conference Speaking Session](https://reader036.vdocuments.mx/reader036/viewer/2022062703/554f37dfb4c905471e8b479f/html5/thumbnails/27.jpg)
27
Reusable Libraries for Hypermedia Clients
Mike Amundsen,Director of ArchitectureCA / Layer 7 Technologies@mamund