SlideShare a Scribd company logo
Gustaf Nilsson Kotte
@gustaf_nk
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
How to scale development of apps?
How to make our web work on every browser?
How to scale development of apps? => HTML Hypermedia APIs
How to make our web work on every browser? => AWD

HTML Hypermedia APIs + AWD => Perfect combo!
RestBugs fork: HTML Hypermedia API + Adaptive Web Design




                                        https://github.com/gustafnk/RestBugs
iOS   Android   …   …           …   Web   ?




                        API




                        Store
iOS   Android   …   …           …   Web   ?




                        API




                        Store
http://martinfowler.com/articles/richardsonMaturityModel.html
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
Jon Moore




http://codeartisan.blogspot.com/2012/07/using-html-as-media-type-for-your-api.html
Hypermedia controls (read + write)

Old, standardized, everybody knows it
                                                                                Jon Moore
Good tooling support (server + clients)




              http://codeartisan.blogspot.com/2012/07/using-html-as-media-type-for-your-api.html
<div id="bugs">
  <ul class="all">
    <li>
      <span class="title">Nordic APIs bug</span>
      <span class="description">The description of the bug</span>

      <form class="move working next"
            action="/bugs/working" method="POST" title="Move to Working">
          <input name="id" type="hidden" value="...">
          <input name="submit" type="submit" value="Move to Working">
      </form>
    </li>
  </ul>
</div>
HTML Hypermedia APIs


                         Mobile first




          “Minimalistic HTML”
HTML Hypermedia APIs + Mobile web
Mobile web         Desktop web
             AWD

                   “Modern mobile”
                   …
Responsive Web Design
                                                        Unobtrusive JavaScript
Delayed content loading                                               Hijax
                               Bundling AJAX requests
                Conditionally loaded content
Feature detection                                                Performance
     HTML5 Navigation Timing




             http://bradfrostweb.com/blog/mobile/beyond-media-queries-anatomy-of-an-adaptive-web-design
“An escalator can never break: it
can only become stairs.”
                 – Mitch Hedberg
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
Same logical endpoint

Native apps (80/20)


Web browsers                  HTML Hypermedia API
                                      +
                                    AWD


Enhanced web



      No application logic        Application logic
www.example.com
api.example.com
(app.js)
renderWeb = function(){
   return host.contains(":9200")
};

POST /bugs:
  …
  if(renderWeb())
    redirect to index page
  else
    return 201 Created;
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
• How to scale development of apps? => HTML Hypermedia APIs
• How to make our web work on every browser? => AWD

HTML Hypermedia APIs + AWD => Perfect combo!
Same logical endpoint

Native apps (80/20)


Web browsers                  HTML Hypermedia API
                                      +
                                    AWD


Enhanced web



      No application logic        Application logic
http://www.amazon.com/Building-Hypermedia-APIs-HTML5-Node/dp/1449306578
                          http://easy-readers.net/books/adaptive-web-design
“Progressive Enhancement 2.0”, Nicolas Zakas

“Resource-Oriented Client Architecture”




                        http://www.webmonkey.com/2012/03/video-progressive-enhancement-2-0
                                                                         http://roca-style.org
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
@gustaf_nk
https://github.com/gustafnk/RestBugs

http://www.slideshare.net/GustafKotte
HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs
(Inline javascript code in responses)

using harvey.js // polyfill for media queries

  configuration "large screen":
    on:
      $.getScript("/js/client.min.js");
      $.get("/css/client.min.css", function(css) {…});
    off:
      location.reload()
(client.min.js)

links = $("#links a[rel!=index]");
addForm = $("form.new");
load template containing angular.js markup
clear <body>
bootstrap angular

foreach link in links:
  htmlResponse = GET link
  parse htmlResponse
  populate view model

Enable hijax for add and move forms
(app.js)
renderWeb = function(){
   return host.contains(":9200")
};

(server template)
<% if(renderWeb) { %>
  <script>…</script>
  <link href="/css/mobile.css" … />
<% } %>

More Related Content

What's hot (20)

PDF
Design Hypermedia APIs
Gustaf Nilsson Kotte
 
PDF
Web Analytics
Sarah Dutkiewicz
 
PPTX
Intro to Azure Api Management - With Cats
Xamariners
 
PPTX
Instant Security & Scalable User Management with Spring Boot
Stormpath
 
PPT
Building Components and Services for the Programmable Web
goodfriday
 
PDF
Use the PnP SharePoint Starter Kit to create your intranet in a box
Fabio Franzini
 
PPTX
Startup hackers toolbox
Shem Magnezi
 
PDF
BaaS Comparison - iOS.mn
pyro2927
 
PPT
Google Chronicles: Analytics And Chrome
Sarah Dutkiewicz
 
PPTX
Adding Rules on Existing Hypermedia APIs
Michael Petychakis
 
ODP
Backend as a Service Comparison
Serhiy Snizhny
 
PDF
Working with Web 2.0 APIs (or, maybe just defining)
Bridget S
 
DOCX
Resume Priyanka Bandekar MS CSYE
Priyanka Bandekar
 
DOCX
Resume Priyanka Bandekar MS CSYE
Priyanka Bandekar
 
PPTX
VJCD2017 SharePoint Framework (SPFx)
Seiji Noro
 
PDF
CTO view on Firebase. How I used Firebase in my projects? Where I loved, wher...
GameCamp
 
PPTX
APIs 101: What are they? What do they have to do with genealogy?
Colleen Greene
 
PDF
Towards an API Commons
3scale
 
PDF
WordPress: React Way
Oleksandr Strikha
 
PDF
Hypermedia APIs – Why, what, how?
Vesa Vänskä
 
Design Hypermedia APIs
Gustaf Nilsson Kotte
 
Web Analytics
Sarah Dutkiewicz
 
Intro to Azure Api Management - With Cats
Xamariners
 
Instant Security & Scalable User Management with Spring Boot
Stormpath
 
Building Components and Services for the Programmable Web
goodfriday
 
Use the PnP SharePoint Starter Kit to create your intranet in a box
Fabio Franzini
 
Startup hackers toolbox
Shem Magnezi
 
BaaS Comparison - iOS.mn
pyro2927
 
Google Chronicles: Analytics And Chrome
Sarah Dutkiewicz
 
Adding Rules on Existing Hypermedia APIs
Michael Petychakis
 
Backend as a Service Comparison
Serhiy Snizhny
 
Working with Web 2.0 APIs (or, maybe just defining)
Bridget S
 
Resume Priyanka Bandekar MS CSYE
Priyanka Bandekar
 
Resume Priyanka Bandekar MS CSYE
Priyanka Bandekar
 
VJCD2017 SharePoint Framework (SPFx)
Seiji Noro
 
CTO view on Firebase. How I used Firebase in my projects? Where I loved, wher...
GameCamp
 
APIs 101: What are they? What do they have to do with genealogy?
Colleen Greene
 
Towards an API Commons
3scale
 
WordPress: React Way
Oleksandr Strikha
 
Hypermedia APIs – Why, what, how?
Vesa Vänskä
 

Viewers also liked (10)

PDF
AngularJS in large applications - AE NV
AE - architects for business and ict
 
PDF
Together Cheerfully to Walk with Hypermedia
Vladimir Tsukur
 
PDF
Using a hypermedia API with Angular.js
Pieter Herroelen
 
PPTX
Sull’adattamento dell’individuo al cambiamento - Elisei
CAF CIA
 
PPTX
Hypermedia in API Design: Enterprise as an Early Adopter
Apigee | Google Cloud
 
PPTX
Making Sense of Hypermedia APIs – Hype or Reality?
Akana
 
PDF
The hypermedia api
Inviqa
 
PDF
Javantura v4 - True RESTful Java Web Services with JSON API and Katharsis - M...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Deep-dive into Microservice Outer Architecture
WSO2
 
PDF
Hypermedia: The Missing Element to Building Adaptable Web APIs in Rails
Toru Kawamura
 
AngularJS in large applications - AE NV
AE - architects for business and ict
 
Together Cheerfully to Walk with Hypermedia
Vladimir Tsukur
 
Using a hypermedia API with Angular.js
Pieter Herroelen
 
Sull’adattamento dell’individuo al cambiamento - Elisei
CAF CIA
 
Hypermedia in API Design: Enterprise as an Early Adopter
Apigee | Google Cloud
 
Making Sense of Hypermedia APIs – Hype or Reality?
Akana
 
The hypermedia api
Inviqa
 
Javantura v4 - True RESTful Java Web Services with JSON API and Katharsis - M...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Deep-dive into Microservice Outer Architecture
WSO2
 
Hypermedia: The Missing Element to Building Adaptable Web APIs in Rails
Toru Kawamura
 
Ad

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

PDF
HTML5 and the dawn of rich mobile web applications pt 1
James Pearce
 
PDF
Cross platform mobile web apps
James Pearce
 
PDF
Anatomy of an HTML 5 mobile web app
Ivano Malavolta
 
PDF
A Snapshot of the Mobile HTML5 Revolution
James Pearce
 
PDF
HTML Hypermedia APIs and Adaptive Web Design - RuPy
Gustaf Nilsson Kotte
 
PDF
An Intro to Mobile HTML5
James Pearce
 
PPTX
Building Mobile Web Apps using ASP.NET MVC, HTML5, & jQuery Mobile
Jon Cortez
 
PPT
The Mobile Development Landscape
Ambert Ho
 
PDF
HTML5 and the dawn of rich mobile web applications
James Pearce
 
PDF
Inside Mobile Widgets Publish
360|Conferences
 
PDF
Mobile Widgets Development
Maximiliano Firtman
 
PDF
Mobile App Development
Chris Morrell
 
KEY
Real-world Dojo Mobile
Andrew Ferrier
 
KEY
Michael Slater Mobile Opportunity
NorthBayWeb
 
PDF
Devon 2011-f-1 반응형 웹 디자인
Daum DNA
 
PDF
Producing a mobile presence. Timeline: Yesterday...
Nick DeNardis
 
KEY
Library Mobile Web Design: Tips, Tricks and Resources
Rachel Vacek
 
PPTX
A Mobile Web Framework for the UC System
Brett Pollak
 
PDF
Making mobile apps with web technology (revised)
Manyoung Cho
 
PDF
Building cross platform mobile web apps
James Pearce
 
HTML5 and the dawn of rich mobile web applications pt 1
James Pearce
 
Cross platform mobile web apps
James Pearce
 
Anatomy of an HTML 5 mobile web app
Ivano Malavolta
 
A Snapshot of the Mobile HTML5 Revolution
James Pearce
 
HTML Hypermedia APIs and Adaptive Web Design - RuPy
Gustaf Nilsson Kotte
 
An Intro to Mobile HTML5
James Pearce
 
Building Mobile Web Apps using ASP.NET MVC, HTML5, & jQuery Mobile
Jon Cortez
 
The Mobile Development Landscape
Ambert Ho
 
HTML5 and the dawn of rich mobile web applications
James Pearce
 
Inside Mobile Widgets Publish
360|Conferences
 
Mobile Widgets Development
Maximiliano Firtman
 
Mobile App Development
Chris Morrell
 
Real-world Dojo Mobile
Andrew Ferrier
 
Michael Slater Mobile Opportunity
NorthBayWeb
 
Devon 2011-f-1 반응형 웹 디자인
Daum DNA
 
Producing a mobile presence. Timeline: Yesterday...
Nick DeNardis
 
Library Mobile Web Design: Tips, Tricks and Resources
Rachel Vacek
 
A Mobile Web Framework for the UC System
Brett Pollak
 
Making mobile apps with web technology (revised)
Manyoung Cho
 
Building cross platform mobile web apps
James Pearce
 
Ad

More from Gustaf Nilsson Kotte (8)

PDF
Microservice Websites – Øredev 2017
Gustaf Nilsson Kotte
 
PDF
Microservice Websites – Micro CPH
Gustaf Nilsson Kotte
 
PDF
Microservice Websites (microXchg 2017)
Gustaf Nilsson Kotte
 
PDF
Simpler Web Architectures Now! (At The Frontend 2016)
Gustaf Nilsson Kotte
 
PDF
A Simpler Web App Architecture (jDays 2016)
Gustaf Nilsson Kotte
 
PDF
Jayway Web Tech Radar 2015
Gustaf Nilsson Kotte
 
PDF
Surviving the Zombie Apocalpyse of Connected Devices
Gustaf Nilsson Kotte
 
PPTX
Windows 8 for Web Developers
Gustaf Nilsson Kotte
 
Microservice Websites – Øredev 2017
Gustaf Nilsson Kotte
 
Microservice Websites – Micro CPH
Gustaf Nilsson Kotte
 
Microservice Websites (microXchg 2017)
Gustaf Nilsson Kotte
 
Simpler Web Architectures Now! (At The Frontend 2016)
Gustaf Nilsson Kotte
 
A Simpler Web App Architecture (jDays 2016)
Gustaf Nilsson Kotte
 
Jayway Web Tech Radar 2015
Gustaf Nilsson Kotte
 
Surviving the Zombie Apocalpyse of Connected Devices
Gustaf Nilsson Kotte
 
Windows 8 for Web Developers
Gustaf Nilsson Kotte
 

HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs