SlideShare a Scribd company logo
HTML HYPERMEDIA APIS
AND
ADAPTIVE WEB DESIGN
Gustaf Nilsson Kotte / @gustaf_nk
ABOUT ME
TWO AREAS OF INTEREST
Hypermedia APIs - No application logic in API clients
Adaptive Web Design - Multi-device web
Working nicely together!
DEMO, KANBAN BOARD
HTML Hypermedia API + Adaptive Web Design
API - FIRST ATTEMPT
GTPS ies
E/OT tm/
{

}

i:13
d 2,
nm:"."
ae ..,
dsrpin "."
ecito: ..,
sau:"ako|okn|eiydn"
tts bclgwrigvrf|oe
SERVER SIDE: ENFORCE RULES
Don't trust clients
CLIENT SIDE: USER FRIENDLY
Hide non-valid transitions
Show primary transitions
"Read the specification"
WITHOUT HYPERMEDIA
PREFER FAT APIS OVER FAT CLIENTS
http://martinfowler.com/articles/richardsonMaturityModel.html
HYPERMEDIA APIS
WHAT IS THE HYPERMEDIA CONSTRAINT?
You do stuff by reading pages
and then either
follow links or submit forms.
— Jon Moore
USE HTML FOR HYPERMEDIA APIS
Lots of hypermedia controls
Old, standardized, everybody knows HTML
Good tooling support

https://vimeo.com/20781278
http://codeartisan.blogspot.se/2012/07/using-html-as-media-type-for-your-api.html
http://amundsen.com/hypermedia/html/
MORE...
Great for learning about hypermedia!
INTERLUDE
JSON is ok :)
EXAMPLE: NON-SEMANTIC HTML
<i
l>
<i>% ie.ae%<dv
dv<= tmnm >/i>
<i>% ie.tts%<dv
dv<= tmsau >/i>
<i>% ie.ecito %<dv
dv<= tmdsrpin >/i>
<i>
dv
..
.
<dv
/i>
<i>
dv
..
.
<dv
/i>
<l>
/i
EXAMPLE: MICROFORMATS2, ENTITIES
<icas"-tm>
l ls=hie"
<i cas"-ae>% ie.ae%<dv
dv ls=pnm"<= tmnm >/i>
<i cas"-tts>% ie.tts%<dv
dv ls=psau"<= tmsau >/i>
<i cas"-ecito"<=ie.ecito %<dv
dv ls=pdsrpin>% tmdsrpin >/i>
<i cas"-om"
dv ls=pfrs>
..
.
<dv
/i>
<i cas"-ik"
dv ls=plns>
..
.
<dv
/i>
<l>
/i
EXAMPLE: MICROFORMATS2, FORMS
<i cas"-om"
dv ls=pfrs>
<omdt-e=mv bclg ato=/tm/ako"mto=PS"
fr aarl"oe ako" cin"iesbclg ehd"OT>
<nu nm=i"tp=hde"vle""
ipt ae"d ye"idn au=4>
<nu tte"umt tp=sbi"vle"oet bclg>
ipt il=sbi" ye"umt au=Mv o ako"
<fr>
/om
<omdt-e=mv vrf nx"ato=/tm/eiy mto=PS"
fr aarl"oe eiy et cin"iesvrf" ehd"OT>
<nu nm=i"tp=hde"vle""
ipt ae"d ye"idn au=4>
<nu tte"umt tp=sbi"vle"oet vrf"
ipt il=sbi" ye"umt au=Mv o eiy>
<fr>
/om
<dv
/i>
HYPERMEDIA APIS
Expose use cases
Maximize user percieved value per request (size)
Avoid "chatty" interactions (latency)
MOBILE FIRST
Expose use cases
Maximize user percieved value per request (size)
Avoid "chatty" interactions (latency)
HTML HYPERMEDIA APIS ❤ MOBILE FIRST
http://filamentgroup.com/lab/ajax_includes_modular_content/
http://bradfrostweb.com/blog/mobile/beyond-media-queries-anatomy-of-an-adaptive-web-design/
http://bradfrostweb.com/blog/mobile/beyond-media-queries-anatomy-of-an-adaptive-web-design/
ADAPTIVE WEB DESIGN
Responsive web design
Feature detection
Device APIs
Performance
Conditional loading
Content strategy
Touch
Platform optimization
Ergonomics
...
http://bradfrostweb.com/blog/mobile/beyond-media-queries-anatomy-of-an-adaptive-web-design
PROGRESSIVE ENHANCEMENT
THE API AND THE WEB
CAN BE THE SAME THING!
HTML Hypermedia APIs ❤ Mobile First
Mobile First ❤ all web browsers and devices
THE API AND THE WEB
CAN BE THE SAME THING!
HTML Hypermedia APIs
❤
Adaptive Web Design
HTML HYPERMEDIA APIS + AWD
HIGH LEVEL VIEW
Same code for web and API
...yes, they share templates too
Separate URLs
Optimize for both perspectives
DEMO: CHANGING THE APPLICATION
SUMMARY
HTML Hypermedia APIs ❤ Mobile First
Mobile First ❤ all web browsers and devices
HTML Hypermedia APIs
❤
Adaptive Web Design
FURTHER EXPLORATION, BOOKS
Mike Amundsen , Building Hypermedia APIs
with HTML5 and Node
Steve Klabnik , Designing Hypermedia APIs
Aaron Gustafson , Adaptive Web Design
FURTHER EXPLORATION, ONLINE
Brad Frost , Beyond Media Queries:
Anatomy of an Adaptive Web Design
Nicolas Zakas , Progressive Enhancement 2.0
Stefan Tilkov (et al), Resource-oriented Client Architecture
THANK YOU!
Gustaf Nilsson Kotte / @gustaf_nk

Code: https://github.com/gustafnk/kanban-awd-api
Demo: http://kanban-awd.herokuapp.com/ and http://kanban-api.herokuapp.com
Slides: http://www.slideshare.net/GustafKotte/html-hypermedia-apis-and-adaptive-web-design-j

More Related Content

What's hot

Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Gustaf Nilsson Kotte
 

What's hot (20)

Modern Web App Architectures
Modern Web App ArchitecturesModern Web App Architectures
Modern Web App Architectures
 
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
 
Full stack devlopment using django main ppt
Full stack devlopment using django main pptFull stack devlopment using django main ppt
Full stack devlopment using django main ppt
 
Openkapow At Mashup Camp 5
Openkapow At Mashup Camp 5Openkapow At Mashup Camp 5
Openkapow At Mashup Camp 5
 
Single page application
Single page applicationSingle page application
Single page application
 
How to automate your BizTalk Installations and Deployments with Chef
How to automate your BizTalk Installations and Deployments with ChefHow to automate your BizTalk Installations and Deployments with Chef
How to automate your BizTalk Installations and Deployments with Chef
 
Progressive Web Apps - Covering the best of both worlds
Progressive Web Apps - Covering the best of both worldsProgressive Web Apps - Covering the best of both worlds
Progressive Web Apps - Covering the best of both worlds
 
Mobile Web
Mobile WebMobile Web
Mobile Web
 
Web Application Development Fundamentals
Web Application Development FundamentalsWeb Application Development Fundamentals
Web Application Development Fundamentals
 
Backend & Frontend architecture scalability & websockets
Backend & Frontend architecture scalability & websocketsBackend & Frontend architecture scalability & websockets
Backend & Frontend architecture scalability & websockets
 
Modern Web Applications
Modern Web ApplicationsModern Web Applications
Modern Web Applications
 
Single page application and Framework
Single page application and FrameworkSingle page application and Framework
Single page application and Framework
 
Forget the Web Backend: Static Serverless + Client-Side Code for the Win!
Forget the Web Backend: Static Serverless + Client-Side Code for the Win!Forget the Web Backend: Static Serverless + Client-Side Code for the Win!
Forget the Web Backend: Static Serverless + Client-Side Code for the Win!
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
 
Single Page Applications
Single Page ApplicationsSingle Page Applications
Single Page Applications
 
What’s right & wrong with WCF-WebHTTP Adapter?
What’s right & wrong with WCF-WebHTTP Adapter?What’s right & wrong with WCF-WebHTTP Adapter?
What’s right & wrong with WCF-WebHTTP Adapter?
 
single page application
single page applicationsingle page application
single page application
 
Top web development tools
Top web development toolsTop web development tools
Top web development tools
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVM
 
Rapid app building with loopback framework
Rapid app building with loopback frameworkRapid app building with loopback framework
Rapid app building with loopback framework
 

Similar to HTML Hypermedia APIs and Adaptive Web Design - jDays 2013

Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
JAXLondon2014
 

Similar to HTML Hypermedia APIs and Adaptive Web Design - jDays 2013 (20)

RefCard API Architecture Strategy
RefCard API Architecture StrategyRefCard API Architecture Strategy
RefCard API Architecture Strategy
 
PHP in a mobile ecosystem
PHP in a mobile ecosystem PHP in a mobile ecosystem
PHP in a mobile ecosystem
 
Introduction to (web) APIs - definitions, examples, concepts and trends
Introduction to (web) APIs - definitions, examples, concepts and trendsIntroduction to (web) APIs - definitions, examples, concepts and trends
Introduction to (web) APIs - definitions, examples, concepts and trends
 
Azure api management
Azure api managementAzure api management
Azure api management
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
 
Open API and API Management - Introduction and Comparison of Products: TIBCO ...
Open API and API Management - Introduction and Comparison of Products: TIBCO ...Open API and API Management - Introduction and Comparison of Products: TIBCO ...
Open API and API Management - Introduction and Comparison of Products: TIBCO ...
 
WHAT IS HTML5?(20100510)
WHAT IS HTML5?(20100510)WHAT IS HTML5?(20100510)
WHAT IS HTML5?(20100510)
 
MongoDB & Chirp
MongoDB & ChirpMongoDB & Chirp
MongoDB & Chirp
 
Top 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementationTop 7 wrong common beliefs about Enterprise API implementation
Top 7 wrong common beliefs about Enterprise API implementation
 
Octo API-days 2015
Octo API-days 2015Octo API-days 2015
Octo API-days 2015
 
What’s behind a high quality web API? Ensure your APIs are more than just a ...
What’s behind a high quality web API? Ensure your APIs are more than just a ...What’s behind a high quality web API? Ensure your APIs are more than just a ...
What’s behind a high quality web API? Ensure your APIs are more than just a ...
 
Joomla in a world of ubiquitous computing
Joomla in a world of ubiquitous computingJoomla in a world of ubiquitous computing
Joomla in a world of ubiquitous computing
 
IBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep Dive
 
API Management Workshop (at Startupbootcamp Berlin)
API Management Workshop (at Startupbootcamp Berlin)API Management Workshop (at Startupbootcamp Berlin)
API Management Workshop (at Startupbootcamp Berlin)
 
Azure API Management - why should I care?
Azure API Management - why should I care?Azure API Management - why should I care?
Azure API Management - why should I care?
 
Jarkko Moilanen, APInf, “Get Control of Your IoT Cruisers” - Mindtrek 2017
Jarkko Moilanen, APInf, “Get Control of Your IoT Cruisers” - Mindtrek 2017Jarkko Moilanen, APInf, “Get Control of Your IoT Cruisers” - Mindtrek 2017
Jarkko Moilanen, APInf, “Get Control of Your IoT Cruisers” - Mindtrek 2017
 
Designing & Building Secure Web APIs
Designing & Building Secure Web APIsDesigning & Building Secure Web APIs
Designing & Building Secure Web APIs
 
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCFMigrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
Migrate a on-prem platform to the public cloud with Java - SpringBoot and PCF
 
Don't screw it up! How to build durable API
Don't screw it up! How to build durable API Don't screw it up! How to build durable API
Don't screw it up! How to build durable API
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 

HTML Hypermedia APIs and Adaptive Web Design - jDays 2013