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

PDF
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
PPTX
PPTX
Dev sum hypemedia talk
PDF
HTML Hypermedia APIs and Adaptive Web Design - jDays 2013
PDF
HTML Hypermedia APIs and Adaptive Web Design - reject.js
PDF
My Journey into the Terrifying World of Hypermedia
PPT
Openkapow At Mashup Camp 5
PDF
Why should i care about hypermedia
Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013
Dev sum hypemedia talk
HTML Hypermedia APIs and Adaptive Web Design - jDays 2013
HTML Hypermedia APIs and Adaptive Web Design - reject.js
My Journey into the Terrifying World of Hypermedia
Openkapow At Mashup Camp 5
Why should i care about hypermedia

What's hot (20)

PDF
Design Hypermedia APIs
PDF
Web Analytics
PPTX
Intro to Azure Api Management - With Cats
PPTX
Instant Security & Scalable User Management with Spring Boot
PPT
Building Components and Services for the Programmable Web
PDF
Use the PnP SharePoint Starter Kit to create your intranet in a box
PPTX
Startup hackers toolbox
PDF
BaaS Comparison - iOS.mn
PPT
Google Chronicles: Analytics And Chrome
PPTX
Adding Rules on Existing Hypermedia APIs
ODP
Backend as a Service Comparison
PDF
Working with Web 2.0 APIs (or, maybe just defining)
DOCX
Resume Priyanka Bandekar MS CSYE
DOCX
Resume Priyanka Bandekar MS CSYE
PPTX
VJCD2017 SharePoint Framework (SPFx)
PDF
CTO view on Firebase. How I used Firebase in my projects? Where I loved, wher...
PPTX
APIs 101: What are they? What do they have to do with genealogy?
PDF
Towards an API Commons
PDF
WordPress: React Way
PDF
Hypermedia APIs – Why, what, how?
Design Hypermedia APIs
Web Analytics
Intro to Azure Api Management - With Cats
Instant Security & Scalable User Management with Spring Boot
Building Components and Services for the Programmable Web
Use the PnP SharePoint Starter Kit to create your intranet in a box
Startup hackers toolbox
BaaS Comparison - iOS.mn
Google Chronicles: Analytics And Chrome
Adding Rules on Existing Hypermedia APIs
Backend as a Service Comparison
Working with Web 2.0 APIs (or, maybe just defining)
Resume Priyanka Bandekar MS CSYE
Resume Priyanka Bandekar MS CSYE
VJCD2017 SharePoint Framework (SPFx)
CTO view on Firebase. How I used Firebase in my projects? Where I loved, wher...
APIs 101: What are they? What do they have to do with genealogy?
Towards an API Commons
WordPress: React Way
Hypermedia APIs – Why, what, how?
Ad

Viewers also liked (10)

PDF
AngularJS in large applications - AE NV
PDF
Together Cheerfully to Walk with Hypermedia
PDF
Using a hypermedia API with Angular.js
PPTX
Sull’adattamento dell’individuo al cambiamento - Elisei
PPTX
Hypermedia in API Design: Enterprise as an Early Adopter
PPTX
Making Sense of Hypermedia APIs – Hype or Reality?
PDF
The hypermedia api
PDF
Javantura v4 - True RESTful Java Web Services with JSON API and Katharsis - M...
PDF
Deep-dive into Microservice Outer Architecture
PDF
Hypermedia: The Missing Element to Building Adaptable Web APIs in Rails
AngularJS in large applications - AE NV
Together Cheerfully to Walk with Hypermedia
Using a hypermedia API with Angular.js
Sull’adattamento dell’individuo al cambiamento - Elisei
Hypermedia in API Design: Enterprise as an Early Adopter
Making Sense of Hypermedia APIs – Hype or Reality?
The hypermedia api
Javantura v4 - True RESTful Java Web Services with JSON API and Katharsis - M...
Deep-dive into Microservice Outer Architecture
Hypermedia: The Missing Element to Building Adaptable Web APIs in Rails
Ad

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

PDF
What is HTML5
PDF
HTML Hypermedia APIs and Adaptive Web Design - RuPy
KEY
WHAT IS HTML5? (at CSS Nite Osaka)
PPTX
Android App Development using HTML5 Technology
PDF
Creating Rajanikant Powered Site
KEY
WHAT IS HTML5?(20100510)
PDF
Midgard Create and VIE
PDF
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
PDF
Multi screen HTML5
PDF
Making Of PHP Based Web Application
PDF
HTML5 & Renesas RZ/G
PDF
FEDM Meetup: Introducing Mojito
PPTX
HTML5: An Overview
PDF
Create.js - Inline editing for any website
PPTX
What is HTML 5?
PDF
Android
PPTX
PDF
Summit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan Wright
PPTX
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
PDF
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)
What is HTML5
HTML Hypermedia APIs and Adaptive Web Design - RuPy
WHAT IS HTML5? (at CSS Nite Osaka)
Android App Development using HTML5 Technology
Creating Rajanikant Powered Site
WHAT IS HTML5?(20100510)
Midgard Create and VIE
It is not HTML5. but ... / HTML5ではないサイトからHTML5を考える
Multi screen HTML5
Making Of PHP Based Web Application
HTML5 & Renesas RZ/G
FEDM Meetup: Introducing Mojito
HTML5: An Overview
Create.js - Inline editing for any website
What is HTML 5?
Android
Summit Australia 2019 - PowerApp Portals - Andrew Ly & Lachlan Wright
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
전문가토크릴레이 1탄 html5 전망 (전종홍 박사)

More from Gustaf Nilsson Kotte (8)

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

HTML Hypermedia APIs and Adaptive Web Design - Nordic APIs