webapp #4 : consuming rest apis

20
WebApp : Consuming REST APIs

Upload: jean-michel

Post on 08-Jul-2015

120 views

Category:

Software


1 download

DESCRIPTION

WebApp #4 : Consuming REST APIs

TRANSCRIPT

Page 1: WebApp #4 : Consuming REST APIs

WebApp : Consuming REST APIs

Page 2: WebApp #4 : Consuming REST APIs

1. Le problème

Page 3: WebApp #4 : Consuming REST APIs

Architecture

App mobile

Website

Requête http

API

Requête http

JSON / XML

JSON / XML

App hybride

Requête http

JSON / XML

Page 4: WebApp #4 : Consuming REST APIs

Comment faire communiquer le client et l’API ?

mais alors …

Page 5: WebApp #4 : Consuming REST APIs

JavaScript !

Page 6: WebApp #4 : Consuming REST APIs

mais pourquoi ?

Ajax-

Compatibilité -

Standard

Page 7: WebApp #4 : Consuming REST APIs

2. A JavaScript journey

Page 8: WebApp #4 : Consuming REST APIs

Old JS & DOM

Page 9: WebApp #4 : Consuming REST APIs

JS & library

Page 10: WebApp #4 : Consuming REST APIs

JS & OOP

Source : http://stackoverflow.com/questions/17118956/clarifying-javascript-prototype-nomenclature-and-mechanism

Page 11: WebApp #4 : Consuming REST APIs

JS & frameworks (1)

Page 12: WebApp #4 : Consuming REST APIs

JS & frameworks (2)

Source : http://todomvc.com

Page 13: WebApp #4 : Consuming REST APIs

3. WebApp and JavaScript components

Page 14: WebApp #4 : Consuming REST APIs

Organiser le code

MV*

Page 15: WebApp #4 : Consuming REST APIs

Utilisation des données

Ajax & binding

Page 16: WebApp #4 : Consuming REST APIs

Afficher les données

Templating

Page 17: WebApp #4 : Consuming REST APIs

Gestion des urls

Routing

Page 18: WebApp #4 : Consuming REST APIs

Gestion des événements

Event Handlers

Page 19: WebApp #4 : Consuming REST APIs

Merci pour votre attention.

Page 20: WebApp #4 : Consuming REST APIs

Bibliographie

When does it make sense to use an MVC framework for JavaScript? - Quora http://www.quora.com/When-does-it-make-sense-to-use-an-MVC-framework-for-JavaScript

Understanding MVVM – A Guide For JavaScript Developers - Addy Osmani http://addyosmani.com/blog/understanding-mvvm-a-guide-for-javascript-developers/

Journey Through The JavaScript MVC Jungle - Addy Osmani http://www.smashingmagazine.com/2012/07/27/journey-through-the-javascript-mvc-jungle/

TodoMVC - Addy Osmani, Sindre Sorhus, Pascal Hartig, Stephen Sawchuk & Colin Eberhardt http://todomvc.com