SlideShare a Scribd company logo
1 of 59
Download to read offline
(HTML Hypermedia APIs and Adaptive Web Design)



              Gustaf Nilsson Kotte
@gustaf_nk
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!
• Connected physical devices
• Types of devices
• Platforms
• Device models




http://gigaom.com/2010/04/14/ericsson-sees-the-internet-of-things-by-2020/
Improved quality




                                               Improved price



http://en.wikipedia.org/wiki/Commoditization
3%

                                  7%




                                                    54%
                           35%




                                                                       Google   Apple   RIM   Microsoft




http://www.comscore.com/Insights/Press_Releases/2013/1/comScore_Reports_November_2012_U.S._Mobile_Subscriber_Market_Share
http://opensignal.com/reports/fragmentation.php
Move slowly

  Hungry

   Angry

Lots of them
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!
iOS   Android   …   …           …   Web   ?




                        API




                        Store
iOS   Android   …   …           …   Web              ?




                        API




                        Store
                                          http://roca-style.org/#application-logic
http://martinfowler.com/articles/richardsonMaturityModel.html
Jon Moore




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



                                                                               Jon Moore




             http://codeartisan.blogspot.com/2012/07/using-html-as-media-type-for-your-api.html
Support for out-bound navigational links (HTTP GET)
<a href="http://www.example.org/search" title="view search page">Search</a>



Support for non-idempotent updates (HTTP POST)
<form method="post" action="http://www.example.org/my-keywords"/>
    <label>Keywords:</label>
    <input name="keywords" type="text" value="" />
    <input type="submit" />
</form>
                                                   http://amundsen.com/hypermedia/hfactor/
Rich semantics

<ul> => bag
<ol> => list
                                                                                 Jon Moore
<dl> => map




               http://codeartisan.blogspot.com/2012/07/using-html-as-media-type-for-your-api.html
Extend using micro format style



                                                                                Jon Moore




              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">JFokus 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>
Already standardized, everybody knows it



                                                                                Jon Moore




              http://codeartisan.blogspot.com/2012/07/using-html-as-media-type-for-your-api.html
Good tooling support



                                                                               Jon Moore




             http://codeartisan.blogspot.com/2012/07/using-html-as-media-type-for-your-api.html
“Optimize where it matters”
Primary use-cases => Native
Secondary use-cases => Render HTML response
• Hypermedia Controls (read/write)?
• Rich semantics?
• Extendable?
• Standardized?
• Everybody knows it?
• Good tooling support (server/clients)?
”Building Hypermedia APIs
with HTML5 and Node”, Mike Amundsen




             http://www.amazon.com/Building-Hypermedia-APIs-HTML5-Node/dp/1449306578
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!
”Mobile first”

Simple HTML
~3kB CSS
Avoid JavaScript!
RestBugs: Mobile web
How to make a “desktop web app” with better UX?
“An escalator can never break: it
can only become stairs.”
                 – Mitch Hedberg
http://easy-readers.net/books/adaptive-web-design   Aaron Gustafson
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
“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


                         Mobile first




          “Minimalistic HTML”
Native apps (80/20)


Web browsers              HTML Hypermedia API
                                  +
                                AWD


Enhanced web (80/20)



   No application logic      Application logic
www.example.com
api.example.com
RestBugs: HTML Hypermedia API + AWD
(Inline javascript code in responses)

use 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”)
};

if (renderWeb):
  redirect to index page
else:
  return 201 Created;
(app.js)
renderWeb = function(){
   return host.contains(":9200")
};

(server template)
<% if(renderWeb) { %>
  <script>…</script>
  <link href="/css/mobile.css" … />
<% } %>
• Connected physical devices
• Types of devices
• Platforms
• Device models
• 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!
Native apps (80/20)


Web browsers              HTML Hypermedia API
                                  +
                                AWD


Enhanced web (80/20)



   No application logic      Application logic
@gustaf_nk
https://github.com/gustafnk/RestBugs

More Related Content

What's hot

What's hot (20)

Why should i care about hypermedia
Why should i care about hypermediaWhy should i care about hypermedia
Why should i care about hypermedia
 
Openkapow At Mashup Camp 5
Openkapow At Mashup Camp 5Openkapow At Mashup Camp 5
Openkapow At Mashup Camp 5
 
Sliding away from Roy Fielding's REST model (Filippos Vasilakis)
Sliding away from Roy Fielding's REST model (Filippos Vasilakis)Sliding away from Roy Fielding's REST model (Filippos Vasilakis)
Sliding away from Roy Fielding's REST model (Filippos Vasilakis)
 
WordCamp GR 2012 Web Apps for the Masses
WordCamp GR 2012 Web Apps for the MassesWordCamp GR 2012 Web Apps for the Masses
WordCamp GR 2012 Web Apps for the Masses
 
Design Hypermedia APIs
Design Hypermedia APIsDesign Hypermedia APIs
Design Hypermedia APIs
 
API Design in the Age of Bots, IoT, and Voice
API Design in the Age of Bots, IoT, and VoiceAPI Design in the Age of Bots, IoT, and Voice
API Design in the Age of Bots, IoT, and Voice
 
Building SPA’s using ReactJS and ASP NET Core
Building SPA’s using ReactJS and ASP NET CoreBuilding SPA’s using ReactJS and ASP NET Core
Building SPA’s using ReactJS and ASP NET Core
 
Spa's com Reactjs e Asp Net Core
Spa's com Reactjs e Asp Net CoreSpa's com Reactjs e Asp Net Core
Spa's com Reactjs e Asp Net Core
 
Adding Rules on Existing Hypermedia APIs
Adding Rules on Existing Hypermedia APIsAdding Rules on Existing Hypermedia APIs
Adding Rules on Existing Hypermedia APIs
 
Introduction to Srb4j
Introduction to Srb4jIntroduction to Srb4j
Introduction to Srb4j
 
Mobile Mashups
Mobile MashupsMobile Mashups
Mobile Mashups
 
Feide Connect
Feide ConnectFeide Connect
Feide Connect
 
Building a Better BaaS
Building a Better BaaSBuilding a Better BaaS
Building a Better BaaS
 
Events on the outside, on the inside and at the core - Chris Richardson
Events on the outside, on the inside and at the core - Chris RichardsonEvents on the outside, on the inside and at the core - Chris Richardson
Events on the outside, on the inside and at the core - Chris Richardson
 
Preventing Security Leaks in SharePoint with Joel Oleson & Christian Buckley
Preventing Security Leaks in SharePoint with Joel Oleson & Christian BuckleyPreventing Security Leaks in SharePoint with Joel Oleson & Christian Buckley
Preventing Security Leaks in SharePoint with Joel Oleson & Christian Buckley
 
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
O365Con18 - Reach for the Cloud Build Solutions with the Power of Microsoft G...
 
Top web development tools
Top web development toolsTop web development tools
Top web development tools
 
Modern App Development using DreamSpark
Modern App Development using DreamSparkModern App Development using DreamSpark
Modern App Development using DreamSpark
 
[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence
[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence
[White/Himmelstein] Bridge the Cloud Divide with Hybrid Business Intelligence
 
Ionic
IonicIonic
Ionic
 

Similar to Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013

Daniel_Moret_Resume_2015
Daniel_Moret_Resume_2015Daniel_Moret_Resume_2015
Daniel_Moret_Resume_2015
Daniel Moret
 
The challenges of building mobile HTML5 applications - FEEC Brazil 2012 - Recife
The challenges of building mobile HTML5 applications - FEEC Brazil 2012 - RecifeThe challenges of building mobile HTML5 applications - FEEC Brazil 2012 - Recife
The challenges of building mobile HTML5 applications - FEEC Brazil 2012 - Recife
Caridy Patino
 

Similar to Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013 (20)

Best Practices for Mobile Web Design
Best Practices for Mobile Web DesignBest Practices for Mobile Web Design
Best Practices for Mobile Web Design
 
Multi screen HTML5
Multi screen HTML5Multi screen HTML5
Multi screen HTML5
 
Desenvolvimento Mobile Híbrido
Desenvolvimento Mobile HíbridoDesenvolvimento Mobile Híbrido
Desenvolvimento Mobile Híbrido
 
Creating Rajanikant Powered Site
Creating Rajanikant Powered SiteCreating Rajanikant Powered Site
Creating Rajanikant Powered Site
 
FEDM Meetup: Introducing Mojito
FEDM Meetup: Introducing MojitoFEDM Meetup: Introducing Mojito
FEDM Meetup: Introducing Mojito
 
Webworks
WebworksWebworks
Webworks
 
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...Google I/O 2012 - Protecting your user experience while integrating 3rd party...
Google I/O 2012 - Protecting your user experience while integrating 3rd party...
 
Best Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppBest Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile App
 
Daniel_Moret_Resume_2015
Daniel_Moret_Resume_2015Daniel_Moret_Resume_2015
Daniel_Moret_Resume_2015
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
The challenges of building mobile HTML5 applications - FEEC Brazil 2012 - Recife
The challenges of building mobile HTML5 applications - FEEC Brazil 2012 - RecifeThe challenges of building mobile HTML5 applications - FEEC Brazil 2012 - Recife
The challenges of building mobile HTML5 applications - FEEC Brazil 2012 - Recife
 
Fast Prototyping Strategies for UI design
Fast Prototyping Strategies for UI designFast Prototyping Strategies for UI design
Fast Prototyping Strategies for UI design
 
Angular jS Introduction by Google
Angular jS Introduction by GoogleAngular jS Introduction by Google
Angular jS Introduction by Google
 
SharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning ModelsSharePoint 2013 App Provisioning Models
SharePoint 2013 App Provisioning Models
 
What is HTML 5?
What is HTML 5?What is HTML 5?
What is HTML 5?
 
We don’t need no stinkin app server! Building a Two-Tier Mobile App
We don’t need no stinkin app server! Building a Two-Tier Mobile AppWe don’t need no stinkin app server! Building a Two-Tier Mobile App
We don’t need no stinkin app server! Building a Two-Tier Mobile App
 
Mobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery MobileMobile Apps with PhoneGap and jQuery Mobile
Mobile Apps with PhoneGap and jQuery Mobile
 
MUHAMMAD SAJID_Final
MUHAMMAD SAJID_FinalMUHAMMAD SAJID_Final
MUHAMMAD SAJID_Final
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020
 
Developing web applications in 2010
Developing web applications in 2010Developing web applications in 2010
Developing web applications in 2010
 

More from Gustaf Nilsson Kotte

More from Gustaf Nilsson Kotte (7)

Microservice Websites – Øredev 2017
Microservice Websites – Øredev 2017Microservice Websites – Øredev 2017
Microservice Websites – Øredev 2017
 
Microservice Websites – Micro CPH
Microservice Websites – Micro CPHMicroservice Websites – Micro CPH
Microservice Websites – Micro CPH
 
Microservice Websites (microXchg 2017)
Microservice Websites (microXchg 2017)Microservice Websites (microXchg 2017)
Microservice Websites (microXchg 2017)
 
Simpler Web Architectures Now! (At The Frontend 2016)
Simpler Web Architectures Now! (At The Frontend 2016)Simpler Web Architectures Now! (At The Frontend 2016)
Simpler Web Architectures Now! (At The Frontend 2016)
 
A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)A Simpler Web App Architecture (jDays 2016)
A Simpler Web App Architecture (jDays 2016)
 
Jayway Web Tech Radar 2015
Jayway Web Tech Radar 2015Jayway Web Tech Radar 2015
Jayway Web Tech Radar 2015
 
Windows 8 for Web Developers
Windows 8 for Web DevelopersWindows 8 for Web Developers
Windows 8 for Web Developers
 

Recently uploaded

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 

Surviving the Zombie Apocalypse of Connected devices - Jfokus 2013