SlideShare uma empresa Scribd logo
1 de 48
Baixar para ler offline
@xebiconfr #xebiconfr
GraphQL et Falcor, un
nouveau regard sur les
architectures REST
Abdelhakim
Bachar
Antoine
Le Taxin
@xebiconfr #xebiconfr
Qui sommes-nous ?
Abdelhakim Bachar
@a_bachar
2
Antoine Le Taxin
@modulom
@xebiconfr #xebiconfr
Super, un nouveau projet !
1
3
@xebiconfr #xebiconfr
Besoin
GraphQL for iOS par Simone Civetta
GraphQL est une technologie dont vous avez entendu parler, peut-être, de vos collègues
Front. Il s’agit d’une API middleware, similaire à un ESB, qui…
Tags: Front, GraphQL, FalcorJS, React
Commentaires
Par Abdelhakim Bachar, Il y a 3 mois
An awesome article
Par Antoine Le Taxin, Il y a 3 mois
Wow.. Thanks much for sharing..
4
1a
5 articles, 30 commentaires
@xebiconfr #xebiconfr
RESTful (representational state transfer)
✔ Possibilité de cache
✔ Indépendance entre le modèle et la vue
5
1b
{
"id": 1,
"title": "Lorem ipsum",
"authorId": 1000
}
{
"id": 1000,
"lastName": "Carver",
"firstName": "Kerry"
}
✘ Latence (grand nombre de requêtes ou réponse lourde)
✘ Over fetching
[GET]/post/1 [GET]/user/1000
@xebiconfr #xebiconfr
L’approche GraphQL
2
6
@xebiconfr #xebiconfr
Qu’est ce que GraphQL ?
● Est une Spécification
● Implémentée en plusieurs langages de programmation
● Définit un langage permettant de requêter et récupérer de
manière déclarative des données depuis un back-end
7
2a
@xebiconfr #xebiconfr
Trois points d’histoire
● Créé par Facebook
● Remplacer tous les services REST nécessaires aux applications
mobile
● En production depuis 2012 pour les applications iOS et Android
de Facebook
8
2b
@xebiconfr #xebiconfr
Objectif
Avoir un outil puissant, productif et rétrocompatible pour développer
des applications
9
2c
@xebiconfr #xebiconfr
A quoi ressemble une requête ?
10
2d
// Résultat
{
"user": {
"id": 123456
"name": "Abdelhakim B."
}
}
// Requête GraphQL
{
user(id: 123456) {
id
name
}
}
@xebiconfr #xebiconfr
Les Concepts de Base
● Hiérarchique
● Requêtes spécifiques au client
● Typage fort
● Rétrocompatibilité
● Introspectif
● Indépendant du transport
11
2e
@xebiconfr #xebiconfr
Hiérarchique
12
2f
{
user(id: 1000) {
name
friends {
id
name
}
}
}
@xebiconfr #xebiconfr
Requêtes spécifiques au client
13
2g
Serveur
Possibilités
Client
Besoins
@xebiconfr #xebiconfr
const UserType = new GraphQLObjectType({
name: 'User',
description: 'Define a user resource',
fields: () => ({
firstName: {
type: GraphQLString, resolve: tag => tag.label
},
posts: {
type: new GraphQLList(PostType),
resolve: tag => tag.getPosts()
}
})
});
Typage fort
14
2h
@xebiconfr #xebiconfr
const UserType = new GraphQLObjectType({
fields: () => ({
fullName: {
type: GraphQLString,
isDeprecated: true,
deprecationReason: "You don't need it",
resolve: user => `${user.firstName} ${user.lastName}`
}
})
});
Rétrocompatibilité
15
2i
@xebiconfr #xebiconfr
Introspectif
16
2j
{
__type(name: "User") {
name
kind
}
}
{
"data": {
"__type": {
"name": "User",
"kind": "OBJECT"
}
}
}
@xebiconfr #xebiconfr
Introspectif: Génération de la documentation
17
2k
@xebiconfr #xebiconfr
Indépendant du transport
18
2l
WebSocket
@xebiconfr #xebiconfr
Que des requêtes ?
Non, pas seulement les requêtes, mais aussi la création, la mis à jour
et la suppression grâce au Mutation
19
2m
@xebiconfr #xebiconfr
Comment requêter un serveur GraphQL ?
POST
curl -XPOST -d 'query { user { name } }' http://localhost:3000
GET
http://localhost:3000/graphql?query={user{name}}
20
2n
@xebiconfr #xebiconfr
app.use('/graphql', expressGraphql({
schema,
pretty: true,
graphiql: true
}));
GraphQL HTTP Server Middleware
21
2o
@xebiconfr #xebiconfr
const schema = new GraphQLSchema({
query: queryType,
mutation: mutationType
});
GraphQL Schema
22
2p
@xebiconfr #xebiconfr
const queryType = new GraphQLObjectType({
name: 'Query',
description: 'Root query entry point',
fields: () => ({
users: UserQuery,
posts: PostQuery,
// ...
})
});
GraphQL Query
23
2q
@xebiconfr #xebiconfr
const UserQuery = {
type: new GraphQLList(UserType),
args: {
id: { type: GraphQLInt },
firstName: { type: GraphQLString },
// ...
},
resolve: (root, args) => User.findAll({where: args})
};
UserQuery
24
2s
@xebiconfr #xebiconfr
const UserType = GraphQLObjectType({
name: 'User',
description: 'Blog user',
fields: () => ({
id: {
type: GraphQLInt,
resolve: u => u.id
},
firstName: { type: GraphQLString },
posts: {
type: new GraphQLList(PostType),
resolve: u => u.getPosts()
}
})
});
Type User
25
2t
@xebiconfr #xebiconfr
const mutationType = new GraphQLObjectType({
name: "Mutation",
description: "Root mutation entry point",
fields: () => ({
createUser: {
type: UserType,
args: { firstName: {type: new GraphQLNonNull(GraphQLString)} },
resolve: (source, args) => User.create(Object.assign({}, args))
}
})
});
GraphQL Mutation
26
2r
@xebiconfr #xebiconfr
{
posts(name: 12549) {
id
title
content
author {
id
firstName
lastName
}
comments {
content
author {
id
firstName
lastName
count_comments
count_posts
}
}
}
}
La requête pour notre blog
27
2u
GraphQL for iOS par Simone Civetta
GraphQL est une technologie dont vous avez
entendu parler, peut-être, de vos collègues
Front. Il s’agit d’une API middleware, similaire
à un ESB, qui…
Tags: Front, GraphQL, FalcorJS, React
Commentaires
Par Abdelhakim Bachar, Il y a 3 mois
An awesome article
Par Antoine Le Taxin, Il y a 3 mois
Wow.. Thanks much for sharing..
5 articles, 30 commentaires
@xebiconfr #xebiconfr
L’approche Falcor
3
28
@xebiconfr #xebiconfr
● Est un librairie Javascript open source
● Propose une manière impérative de décrire et d’accéder aux
données
● Embarque un système de cache et d’optimisation de requêtes
Qu’est ce que Falcor ?
29
3a
@xebiconfr #xebiconfr
● Créé par Netflix
● Répond aux besoins de performance, d’éclatement de leur
sources de données et diversité des supports
● En production pour leur applications TV, mobile et desktop et
open source depuis 2015
Trois points d’histoire
30
3b
@xebiconfr #xebiconfr
Avoir un outil centré sur la performance et le cloud, spécialement
adapté aux architectures microservices.
Objectif
31
3c
@xebiconfr #xebiconfr
A quoi ressemble une requête ?
32
3d
// Résultat
{
"user": {
"name": "Abdelhakim B."
}
}
// Requête falcor
model
.get('users[0].name')
.then(
//
)
@xebiconfr #xebiconfr
Les Concepts de Base
33
3e
Paths
JSON Graph
Data SourcesRouter
Model
@xebiconfr #xebiconfr
● Langage de query de Falcor
● Exprime un chemin au travers d’un objet JSON
● Il accepte deux syntaxes :
○ Syntaxe Path String
○ Array de clés
'posts[1].title'
['posts', 1, 'title']
'posts[1..2]['title','content']'
['posts', {from: 1, to: 2}, ['title','content']]
Paths
34
3f
@xebiconfr #xebiconfr
● On accède aux données au travers d’un graph JSON unique
(quelque soit le nombre de sources)
// frontend
var model = new falcor.Model({
source: new falcor.HttpDataSource('api/model.json')
})
// backend
app.use('/api/model.json', falcorExpress.dataSourceRoute((req, res) =>
{
return new Router([ (...) ])
}
)
Model
35
3g
@xebiconfr #xebiconfr
● Retourne les données de manière asynchrone
model
.get(
/.../
)
.then(/.../)
Model
36
3h
@xebiconfr #xebiconfr
Le Modèle optimise les requêtes concurrentes
model
.get(
'posts[0].title',
'posts[1].title',
'posts[0].content',
'posts[1].content,
)
.then(/.../)
// Path envoyé au backend sous form de “query string”
paths:
[["posts",{"from":0,"to":1},["title", “content”]]]
Model
37
3i
@xebiconfr #xebiconfr
Le Modèle optimise les requêtes sortantes grâce au cache
model
.get('posts[0..1].title').then(/.../)
// Path envoyé au backend sous form de “query string”
paths:
[["posts",{"from":0,"to":1},"title"]]
model
.get('posts[0..1][“title”,”content”]').then(/.../)
// Path envoyé au backend est optimisé pour ne chercher que la donnée manquante
paths:
[["posts",{"from":0,"to":1},"content"]]
Model
38
3j
@xebiconfr #xebiconfr
Pour permettre au JSON de passer d’arbre à graph.
Types primitifs supplémentaires :
● Reference (ref) : lien symbolique
● Atom (atom) : valeur json (object / array)
● Error (error) : erreur (surtout utilisé côté routeur)
JSON Graph
39
3k
@xebiconfr #xebiconfr
{
postsByIds: {
1000: {
title: "Aliquip voluptate ",
content: "Ex cupidatat ",
author_id: falcor.Model.ref('usersByIds[1000]')
},
1001: {...}
},
posts: [
{ $type: 'ref', value:['postsByIds', 1000] },
{ $type: 'ref', value:['postsByIds', 1001] }
]
}})
JSON Graph : ref
40
3l
@xebiconfr #xebiconfr
Data Sources
41
3m
Une interface qui permet d’exposer un JSON Graph
Opérations disponibles pour Route ou Model :
● get : lire
● set : modifier
● call : appeler une fonction du graph (non idempotent)
@xebiconfr #xebiconfr
Router
● Pattern matching sur la structure du graph Json.
● Trois types spécifiques :
○ {integers} / {range} / {keys}
● pathSet comprend les arguments du path sous forme d’array
// front
model.get('posts[0].title')
// route
route: "posts[{integers:postId}]['title', 'content']",
get: (pathSet) => {
return someAsyncService.getData(pathSet)
//… pathSet[0] = posts / pathSet[1] = 0 / pathSet[2] = title //
}
42
3n
@xebiconfr #xebiconfr
model.get(
'postsById[12549]["title", "content", "tags", "author"]'
)
model.get(`
authorsById[${data.author.id}]["firstName", "lastName"]
`)
model.get(`
commentsById[${data.comments.from}..${data.comments.to}]
["content", "author"]
`)
model.get(`
authorsById[${data.author.from}..${data.author.to}]
["firstName", "lastName", "count_comments", "count_post"]
`)
La requête pour notre blog
43
3o
GraphQL for iOS par Simone Civetta
GraphQL est une technologie dont vous avez
entendu parler, peut-être, de vos collègues
Front. Il s’agit d’une API middleware, similaire
à un ESB, qui…
Tags: Front, GraphQL, FalcorJS, React
Commentaires
Par Abdelhakim Bachar, Il y a 3 mois
An awesome article
Par Antoine Le Taxin, Il y a 3 mois
Wow.. Thanks much for sharing..
5 articles, 30 commentaires
@xebiconfr #xebiconfr
Take Away
4
44
@xebiconfr #xebiconfr
Avantages / inconvénients de GraphQL
✔ Déclaratif (requête, type)
✔ Documentation vivante
✔ Une seule requête suffit
✔ Exploration facile des données
✔ Contrôle total sur la granularité des informations
✘ Ne supporte ni les opérateurs, ni les fonctions d'agrégation
✘ Pas de gestion automatique du cache
45
4a
@xebiconfr #xebiconfr
Avantages / inconvénients de Falcor
✔ Gestion automatique du cache
✔ Optimisation à la volée des requêtes
✔ Contrôle total sur la granularité des informations
✔ Optimisé pour la gestion de sources de données multiples
✔ Le code front et back utilisent la même librairie
✘ Impératif (pas de type)
✘ Ne supporte ni les opérateurs, ni les fonctions d'agrégation
? Implémentation du backend est laissé à la charge du développeur
46
4b
@xebiconfr #xebiconfr
Cas d’utilisation
Prendre l’une des deux solutions si :
- Beaucoup de lecture, peu d’écriture
- Le réseau et la latence est la principale préoccupation (Mobile)
S’orienter vers GraphQL si :
- Vous voulez une validation du modèle et une documentation
- Vous voulez utiliser autre langage que Javascript
S’orienter vers Falcor si :
- Vos données sont réparties à différents endroits
- Vous voulez un cache géré automatiquement et optimisé
47
4c
@xebiconfr #xebiconfr
Questions ?
Merci !
48

Mais conteúdo relacionado

Mais procurados

XebiCon'18 - Comment j'ai développé un jeu vidéo avec des outils de développe...
XebiCon'18 - Comment j'ai développé un jeu vidéo avec des outils de développe...XebiCon'18 - Comment j'ai développé un jeu vidéo avec des outils de développe...
XebiCon'18 - Comment j'ai développé un jeu vidéo avec des outils de développe...Publicis Sapient Engineering
 
XebiCon'16 : Orange - Transformation DevOps, les conteneurs sont vos alliés !
XebiCon'16 : Orange - Transformation DevOps, les conteneurs sont vos alliés !XebiCon'16 : Orange - Transformation DevOps, les conteneurs sont vos alliés !
XebiCon'16 : Orange - Transformation DevOps, les conteneurs sont vos alliés !Publicis Sapient Engineering
 
XebiCon'16 : La programmation concurrente en Go. Par Jérome Doucet et Diana O...
XebiCon'16 : La programmation concurrente en Go. Par Jérome Doucet et Diana O...XebiCon'16 : La programmation concurrente en Go. Par Jérome Doucet et Diana O...
XebiCon'16 : La programmation concurrente en Go. Par Jérome Doucet et Diana O...Publicis Sapient Engineering
 
XebiCon'18 - La sécurité, douce illusion même en 2018
XebiCon'18 - La sécurité, douce illusion même en 2018XebiCon'18 - La sécurité, douce illusion même en 2018
XebiCon'18 - La sécurité, douce illusion même en 2018Publicis Sapient Engineering
 
XebiCon'16 : Le futur de la télévision, les applications ! Par Fabien Mirault...
XebiCon'16 : Le futur de la télévision, les applications ! Par Fabien Mirault...XebiCon'16 : Le futur de la télévision, les applications ! Par Fabien Mirault...
XebiCon'16 : Le futur de la télévision, les applications ! Par Fabien Mirault...Publicis Sapient Engineering
 
XebiCon'18 - Les utilisateurs finaux, les oubliés de nos produits !
XebiCon'18 - Les utilisateurs finaux, les oubliés de nos produits !XebiCon'18 - Les utilisateurs finaux, les oubliés de nos produits !
XebiCon'18 - Les utilisateurs finaux, les oubliés de nos produits !Publicis Sapient Engineering
 
Xebicon2016 - React Native & Redux
Xebicon2016 - React Native & ReduxXebicon2016 - React Native & Redux
Xebicon2016 - React Native & Reduxpgdejardin
 
Paris Container Day 2016 : Cloudunit v2 (Treeptik)
Paris Container Day 2016 : Cloudunit v2 (Treeptik)Paris Container Day 2016 : Cloudunit v2 (Treeptik)
Paris Container Day 2016 : Cloudunit v2 (Treeptik)Publicis Sapient Engineering
 
Paris Container Day 2016 : Conteneurisation de l’usine logicielle (Retour d'e...
Paris Container Day 2016 : Conteneurisation de l’usine logicielle (Retour d'e...Paris Container Day 2016 : Conteneurisation de l’usine logicielle (Retour d'e...
Paris Container Day 2016 : Conteneurisation de l’usine logicielle (Retour d'e...Publicis Sapient Engineering
 
Monitoring de conteneurs en production - Jonathan Raffre & Jean-Pascal Thiery
Monitoring de conteneurs en production - Jonathan Raffre & Jean-Pascal ThieryMonitoring de conteneurs en production - Jonathan Raffre & Jean-Pascal Thiery
Monitoring de conteneurs en production - Jonathan Raffre & Jean-Pascal ThieryParis Container Day
 
XebiCon'17 : Kotlin, état de l'art - Benjamin Lacroix et Sergio Dos Santos
XebiCon'17 : Kotlin, état de l'art - Benjamin Lacroix et Sergio Dos SantosXebiCon'17 : Kotlin, état de l'art - Benjamin Lacroix et Sergio Dos Santos
XebiCon'17 : Kotlin, état de l'art - Benjamin Lacroix et Sergio Dos SantosPublicis Sapient Engineering
 
Paris Container Day 2016 : De la construction au déploiement d’applications...
Paris Container Day 2016 :  De la construction au déploiement d’applications...Paris Container Day 2016 :  De la construction au déploiement d’applications...
Paris Container Day 2016 : De la construction au déploiement d’applications...Publicis Sapient Engineering
 
Devoxx 17 - Orchestration de conteneurs : le choix des armes !
Devoxx 17 - Orchestration de conteneurs : le choix des armes !Devoxx 17 - Orchestration de conteneurs : le choix des armes !
Devoxx 17 - Orchestration de conteneurs : le choix des armes !Publicis Sapient Engineering
 
OVHcloud Tech-Talk S01E04 - La télémétrie au service de l'agilité
OVHcloud Tech-Talk S01E04 - La télémétrie au service de l'agilitéOVHcloud Tech-Talk S01E04 - La télémétrie au service de l'agilité
OVHcloud Tech-Talk S01E04 - La télémétrie au service de l'agilitéOVHcloud
 
XebiCon'16 : Realtime React par Cédric Hauber, Cloud Designer et Builder chez...
XebiCon'16 : Realtime React par Cédric Hauber, Cloud Designer et Builder chez...XebiCon'16 : Realtime React par Cédric Hauber, Cloud Designer et Builder chez...
XebiCon'16 : Realtime React par Cédric Hauber, Cloud Designer et Builder chez...Publicis Sapient Engineering
 
Paris Container Day 2016 : Architecture microservices hautement disponible au...
Paris Container Day 2016 : Architecture microservices hautement disponible au...Paris Container Day 2016 : Architecture microservices hautement disponible au...
Paris Container Day 2016 : Architecture microservices hautement disponible au...Publicis Sapient Engineering
 
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...Publicis Sapient Engineering
 
Développement : mettez le turbo ! - Liferay France Symposium 2017
Développement : mettez le turbo ! - Liferay France Symposium 2017Développement : mettez le turbo ! - Liferay France Symposium 2017
Développement : mettez le turbo ! - Liferay France Symposium 2017Sébastien Le Marchand
 
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...Publicis Sapient Engineering
 
XebiCon'16 : A la découverte de Nomad d'Hashicorp. Par Sergio Dos Santos, Dév...
XebiCon'16 : A la découverte de Nomad d'Hashicorp. Par Sergio Dos Santos, Dév...XebiCon'16 : A la découverte de Nomad d'Hashicorp. Par Sergio Dos Santos, Dév...
XebiCon'16 : A la découverte de Nomad d'Hashicorp. Par Sergio Dos Santos, Dév...Publicis Sapient Engineering
 

Mais procurados (20)

XebiCon'18 - Comment j'ai développé un jeu vidéo avec des outils de développe...
XebiCon'18 - Comment j'ai développé un jeu vidéo avec des outils de développe...XebiCon'18 - Comment j'ai développé un jeu vidéo avec des outils de développe...
XebiCon'18 - Comment j'ai développé un jeu vidéo avec des outils de développe...
 
XebiCon'16 : Orange - Transformation DevOps, les conteneurs sont vos alliés !
XebiCon'16 : Orange - Transformation DevOps, les conteneurs sont vos alliés !XebiCon'16 : Orange - Transformation DevOps, les conteneurs sont vos alliés !
XebiCon'16 : Orange - Transformation DevOps, les conteneurs sont vos alliés !
 
XebiCon'16 : La programmation concurrente en Go. Par Jérome Doucet et Diana O...
XebiCon'16 : La programmation concurrente en Go. Par Jérome Doucet et Diana O...XebiCon'16 : La programmation concurrente en Go. Par Jérome Doucet et Diana O...
XebiCon'16 : La programmation concurrente en Go. Par Jérome Doucet et Diana O...
 
XebiCon'18 - La sécurité, douce illusion même en 2018
XebiCon'18 - La sécurité, douce illusion même en 2018XebiCon'18 - La sécurité, douce illusion même en 2018
XebiCon'18 - La sécurité, douce illusion même en 2018
 
XebiCon'16 : Le futur de la télévision, les applications ! Par Fabien Mirault...
XebiCon'16 : Le futur de la télévision, les applications ! Par Fabien Mirault...XebiCon'16 : Le futur de la télévision, les applications ! Par Fabien Mirault...
XebiCon'16 : Le futur de la télévision, les applications ! Par Fabien Mirault...
 
XebiCon'18 - Les utilisateurs finaux, les oubliés de nos produits !
XebiCon'18 - Les utilisateurs finaux, les oubliés de nos produits !XebiCon'18 - Les utilisateurs finaux, les oubliés de nos produits !
XebiCon'18 - Les utilisateurs finaux, les oubliés de nos produits !
 
Xebicon2016 - React Native & Redux
Xebicon2016 - React Native & ReduxXebicon2016 - React Native & Redux
Xebicon2016 - React Native & Redux
 
Paris Container Day 2016 : Cloudunit v2 (Treeptik)
Paris Container Day 2016 : Cloudunit v2 (Treeptik)Paris Container Day 2016 : Cloudunit v2 (Treeptik)
Paris Container Day 2016 : Cloudunit v2 (Treeptik)
 
Paris Container Day 2016 : Conteneurisation de l’usine logicielle (Retour d'e...
Paris Container Day 2016 : Conteneurisation de l’usine logicielle (Retour d'e...Paris Container Day 2016 : Conteneurisation de l’usine logicielle (Retour d'e...
Paris Container Day 2016 : Conteneurisation de l’usine logicielle (Retour d'e...
 
Monitoring de conteneurs en production - Jonathan Raffre & Jean-Pascal Thiery
Monitoring de conteneurs en production - Jonathan Raffre & Jean-Pascal ThieryMonitoring de conteneurs en production - Jonathan Raffre & Jean-Pascal Thiery
Monitoring de conteneurs en production - Jonathan Raffre & Jean-Pascal Thiery
 
XebiCon'17 : Kotlin, état de l'art - Benjamin Lacroix et Sergio Dos Santos
XebiCon'17 : Kotlin, état de l'art - Benjamin Lacroix et Sergio Dos SantosXebiCon'17 : Kotlin, état de l'art - Benjamin Lacroix et Sergio Dos Santos
XebiCon'17 : Kotlin, état de l'art - Benjamin Lacroix et Sergio Dos Santos
 
Paris Container Day 2016 : De la construction au déploiement d’applications...
Paris Container Day 2016 :  De la construction au déploiement d’applications...Paris Container Day 2016 :  De la construction au déploiement d’applications...
Paris Container Day 2016 : De la construction au déploiement d’applications...
 
Devoxx 17 - Orchestration de conteneurs : le choix des armes !
Devoxx 17 - Orchestration de conteneurs : le choix des armes !Devoxx 17 - Orchestration de conteneurs : le choix des armes !
Devoxx 17 - Orchestration de conteneurs : le choix des armes !
 
OVHcloud Tech-Talk S01E04 - La télémétrie au service de l'agilité
OVHcloud Tech-Talk S01E04 - La télémétrie au service de l'agilitéOVHcloud Tech-Talk S01E04 - La télémétrie au service de l'agilité
OVHcloud Tech-Talk S01E04 - La télémétrie au service de l'agilité
 
XebiCon'16 : Realtime React par Cédric Hauber, Cloud Designer et Builder chez...
XebiCon'16 : Realtime React par Cédric Hauber, Cloud Designer et Builder chez...XebiCon'16 : Realtime React par Cédric Hauber, Cloud Designer et Builder chez...
XebiCon'16 : Realtime React par Cédric Hauber, Cloud Designer et Builder chez...
 
Paris Container Day 2016 : Architecture microservices hautement disponible au...
Paris Container Day 2016 : Architecture microservices hautement disponible au...Paris Container Day 2016 : Architecture microservices hautement disponible au...
Paris Container Day 2016 : Architecture microservices hautement disponible au...
 
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
 
Développement : mettez le turbo ! - Liferay France Symposium 2017
Développement : mettez le turbo ! - Liferay France Symposium 2017Développement : mettez le turbo ! - Liferay France Symposium 2017
Développement : mettez le turbo ! - Liferay France Symposium 2017
 
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
Paris Container Day 2016 : Choisissez votre style avec docker & Amazon Web Se...
 
XebiCon'16 : A la découverte de Nomad d'Hashicorp. Par Sergio Dos Santos, Dév...
XebiCon'16 : A la découverte de Nomad d'Hashicorp. Par Sergio Dos Santos, Dév...XebiCon'16 : A la découverte de Nomad d'Hashicorp. Par Sergio Dos Santos, Dév...
XebiCon'16 : A la découverte de Nomad d'Hashicorp. Par Sergio Dos Santos, Dév...
 

Destaque

API design principles for accelerated development
API design principles for accelerated developmentAPI design principles for accelerated development
API design principles for accelerated developmentJonathan LeBlanc
 
Take Control of your APIs in a Microservice Architecture
Take Control of your APIs in a Microservice ArchitectureTake Control of your APIs in a Microservice Architecture
Take Control of your APIs in a Microservice Architecture3scale
 
How to use Donuts and Onions for Scaling API Programs
How to use Donuts and Onions for Scaling API ProgramsHow to use Donuts and Onions for Scaling API Programs
How to use Donuts and Onions for Scaling API Programs3scale
 
APIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside OutAPIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside Out3scale
 
API Management architect presentation
API Management architect presentationAPI Management architect presentation
API Management architect presentationsflynn073
 
Integrating, exposing and managing distributed data with RESTful APIs and op...
Integrating, exposing and managing distributed data with RESTful APIs and op...Integrating, exposing and managing distributed data with RESTful APIs and op...
Integrating, exposing and managing distributed data with RESTful APIs and op...3scale
 
The Fundamentals of Platform Strategy: Creating Genuine Value with APIs
The Fundamentals of Platform Strategy: Creating Genuine Value with APIsThe Fundamentals of Platform Strategy: Creating Genuine Value with APIs
The Fundamentals of Platform Strategy: Creating Genuine Value with APIs3scale
 
Test and Protect Your API
Test and Protect Your APITest and Protect Your API
Test and Protect Your APISmartBear
 
The API-Application Semantic Gap
The API-Application Semantic GapThe API-Application Semantic Gap
The API-Application Semantic Gap3scale
 

Destaque (10)

API design principles for accelerated development
API design principles for accelerated developmentAPI design principles for accelerated development
API design principles for accelerated development
 
Take Control of your APIs in a Microservice Architecture
Take Control of your APIs in a Microservice ArchitectureTake Control of your APIs in a Microservice Architecture
Take Control of your APIs in a Microservice Architecture
 
How to use Donuts and Onions for Scaling API Programs
How to use Donuts and Onions for Scaling API ProgramsHow to use Donuts and Onions for Scaling API Programs
How to use Donuts and Onions for Scaling API Programs
 
APIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside OutAPIS for Startups - Running your Business Inside Out
APIS for Startups - Running your Business Inside Out
 
Oracle api gateway overview
Oracle api gateway overviewOracle api gateway overview
Oracle api gateway overview
 
API Management architect presentation
API Management architect presentationAPI Management architect presentation
API Management architect presentation
 
Integrating, exposing and managing distributed data with RESTful APIs and op...
Integrating, exposing and managing distributed data with RESTful APIs and op...Integrating, exposing and managing distributed data with RESTful APIs and op...
Integrating, exposing and managing distributed data with RESTful APIs and op...
 
The Fundamentals of Platform Strategy: Creating Genuine Value with APIs
The Fundamentals of Platform Strategy: Creating Genuine Value with APIsThe Fundamentals of Platform Strategy: Creating Genuine Value with APIs
The Fundamentals of Platform Strategy: Creating Genuine Value with APIs
 
Test and Protect Your API
Test and Protect Your APITest and Protect Your API
Test and Protect Your API
 
The API-Application Semantic Gap
The API-Application Semantic GapThe API-Application Semantic Gap
The API-Application Semantic Gap
 

Semelhante a XebiCon'16 : GraphQL et Falcor, un nouveau regard sur les architectures REST ? Par Antoine Le Taxin et Abdelhakim Bachar, Développeurs Front-End chez Xebia

Introduction aux RIA (Rich Internet Applications)
Introduction aux RIA (Rich Internet Applications)Introduction aux RIA (Rich Internet Applications)
Introduction aux RIA (Rich Internet Applications)Tugdual Grall
 
Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et JavascriptCodedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascriptcodedarmor
 
Développer sereinement avec Node.js
Développer sereinement avec Node.jsDévelopper sereinement avec Node.js
Développer sereinement avec Node.jsJulien Giovaresco
 
Big Data Viz (and much more!) with Apache Zeppelin
Big Data Viz (and much more!) with Apache ZeppelinBig Data Viz (and much more!) with Apache Zeppelin
Big Data Viz (and much more!) with Apache ZeppelinBruno Bonnin
 
Grails from scratch to prod - MixIT 2011
Grails from scratch to prod - MixIT 2011Grails from scratch to prod - MixIT 2011
Grails from scratch to prod - MixIT 2011Aurélien Maury
 
De Java à Kotlin - L'histoire d'une migration
De Java à Kotlin - L'histoire d'une migrationDe Java à Kotlin - L'histoire d'une migration
De Java à Kotlin - L'histoire d'une migrationRobin Penea
 
Linq et Entity framework
Linq et Entity frameworkLinq et Entity framework
Linq et Entity frameworkDNG Consulting
 
Introduction à Angularjs
Introduction à AngularjsIntroduction à Angularjs
Introduction à AngularjsRossi Oddet
 
Visual Studio 2008 Overview
Visual Studio 2008 OverviewVisual Studio 2008 Overview
Visual Studio 2008 OverviewGregory Renard
 
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017) Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017) univalence
 
5 android web_service
5 android web_service5 android web_service
5 android web_serviceSaber LAJILI
 
Room ou Realm : Quelle base de données pour vos applications Android ?
Room ou Realm : Quelle base de données pour vos applications Android ?Room ou Realm : Quelle base de données pour vos applications Android ?
Room ou Realm : Quelle base de données pour vos applications Android ?Ludovic ROLAND
 
Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?GreenIvory
 
2014 03-12-fr schema design and app architecture-2
2014 03-12-fr schema design and app architecture-22014 03-12-fr schema design and app architecture-2
2014 03-12-fr schema design and app architecture-2MongoDB
 
Hands on lab Elasticsearch
Hands on lab ElasticsearchHands on lab Elasticsearch
Hands on lab ElasticsearchDavid Pilato
 
Les concepts de la programmation fonctionnelle illustrés avec java 8
Les concepts de la programmation fonctionnelle illustrés avec java 8Les concepts de la programmation fonctionnelle illustrés avec java 8
Les concepts de la programmation fonctionnelle illustrés avec java 8Yannick Chartois
 

Semelhante a XebiCon'16 : GraphQL et Falcor, un nouveau regard sur les architectures REST ? Par Antoine Le Taxin et Abdelhakim Bachar, Développeurs Front-End chez Xebia (20)

Refcard GraphQL
Refcard GraphQLRefcard GraphQL
Refcard GraphQL
 
Introduction aux RIA (Rich Internet Applications)
Introduction aux RIA (Rich Internet Applications)Introduction aux RIA (Rich Internet Applications)
Introduction aux RIA (Rich Internet Applications)
 
Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et JavascriptCodedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
Codedarmor 2012 - 06/03 - HTML5, CSS3 et Javascript
 
Développer sereinement avec Node.js
Développer sereinement avec Node.jsDévelopper sereinement avec Node.js
Développer sereinement avec Node.js
 
Big Data Viz (and much more!) with Apache Zeppelin
Big Data Viz (and much more!) with Apache ZeppelinBig Data Viz (and much more!) with Apache Zeppelin
Big Data Viz (and much more!) with Apache Zeppelin
 
Grails from scratch to prod - MixIT 2011
Grails from scratch to prod - MixIT 2011Grails from scratch to prod - MixIT 2011
Grails from scratch to prod - MixIT 2011
 
De Java à Kotlin - L'histoire d'une migration
De Java à Kotlin - L'histoire d'une migrationDe Java à Kotlin - L'histoire d'une migration
De Java à Kotlin - L'histoire d'une migration
 
Linq et Entity framework
Linq et Entity frameworkLinq et Entity framework
Linq et Entity framework
 
Introduction à Angularjs
Introduction à AngularjsIntroduction à Angularjs
Introduction à Angularjs
 
Visual Studio 2008 Overview
Visual Studio 2008 OverviewVisual Studio 2008 Overview
Visual Studio 2008 Overview
 
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017) Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
Spark-adabra, Comment Construire un DATALAKE ! (Devoxx 2017)
 
5 android web_service
5 android web_service5 android web_service
5 android web_service
 
Room ou Realm : Quelle base de données pour vos applications Android ?
Room ou Realm : Quelle base de données pour vos applications Android ?Room ou Realm : Quelle base de données pour vos applications Android ?
Room ou Realm : Quelle base de données pour vos applications Android ?
 
C# 7 - Nouveautés
C# 7 - NouveautésC# 7 - Nouveautés
C# 7 - Nouveautés
 
Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?Flex, une techno RIA incontournable pour les futures app web ?
Flex, une techno RIA incontournable pour les futures app web ?
 
2014 03-12-fr schema design and app architecture-2
2014 03-12-fr schema design and app architecture-22014 03-12-fr schema design and app architecture-2
2014 03-12-fr schema design and app architecture-2
 
Hands on lab Elasticsearch
Hands on lab ElasticsearchHands on lab Elasticsearch
Hands on lab Elasticsearch
 
Les concepts de la programmation fonctionnelle illustrés avec java 8
Les concepts de la programmation fonctionnelle illustrés avec java 8Les concepts de la programmation fonctionnelle illustrés avec java 8
Les concepts de la programmation fonctionnelle illustrés avec java 8
 
Javascript proprement
Javascript proprementJavascript proprement
Javascript proprement
 
ORM
ORMORM
ORM
 

Mais de Publicis Sapient Engineering

XebiCon'18 - L'algorithme de reconnaissance de formes par le cerveau humain
XebiCon'18 - L'algorithme de reconnaissance de formes par le cerveau humainXebiCon'18 - L'algorithme de reconnaissance de formes par le cerveau humain
XebiCon'18 - L'algorithme de reconnaissance de formes par le cerveau humainPublicis Sapient Engineering
 
XebiCon'18 - La Web App d'aujourd'hui et de demain : état de l'art et bleedin...
XebiCon'18 - La Web App d'aujourd'hui et de demain : état de l'art et bleedin...XebiCon'18 - La Web App d'aujourd'hui et de demain : état de l'art et bleedin...
XebiCon'18 - La Web App d'aujourd'hui et de demain : état de l'art et bleedin...Publicis Sapient Engineering
 
XebiCon'18 - Des notebook pour le monitoring avec Zeppelin
XebiCon'18 - Des notebook pour le monitoring avec Zeppelin XebiCon'18 - Des notebook pour le monitoring avec Zeppelin
XebiCon'18 - Des notebook pour le monitoring avec Zeppelin Publicis Sapient Engineering
 
XebiCon'18 - Event Sourcing et RGPD, incompatibles ?
XebiCon'18 - Event Sourcing et RGPD, incompatibles ?XebiCon'18 - Event Sourcing et RGPD, incompatibles ?
XebiCon'18 - Event Sourcing et RGPD, incompatibles ?Publicis Sapient Engineering
 
XebiCon'18 - Boostez vos modèles avec du Deep Learning distribué
XebiCon'18 - Boostez vos modèles avec du Deep Learning distribuéXebiCon'18 - Boostez vos modèles avec du Deep Learning distribué
XebiCon'18 - Boostez vos modèles avec du Deep Learning distribuéPublicis Sapient Engineering
 
XebiCon'18 - Comment fausser l'interprétation de vos résultats avec des dataviz
XebiCon'18 - Comment fausser l'interprétation de vos résultats avec des datavizXebiCon'18 - Comment fausser l'interprétation de vos résultats avec des dataviz
XebiCon'18 - Comment fausser l'interprétation de vos résultats avec des datavizPublicis Sapient Engineering
 
XebiCon'18 - Sécuriser son API avec OpenID Connect
XebiCon'18 - Sécuriser son API avec OpenID ConnectXebiCon'18 - Sécuriser son API avec OpenID Connect
XebiCon'18 - Sécuriser son API avec OpenID ConnectPublicis Sapient Engineering
 
XebiCon'18 - Structuration du Temps et Dynamique de Groupes, Théorie organisa...
XebiCon'18 - Structuration du Temps et Dynamique de Groupes, Théorie organisa...XebiCon'18 - Structuration du Temps et Dynamique de Groupes, Théorie organisa...
XebiCon'18 - Structuration du Temps et Dynamique de Groupes, Théorie organisa...Publicis Sapient Engineering
 
XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...
XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...
XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...Publicis Sapient Engineering
 
XebiCon'18 - Ce que l'histoire du métro Parisien m'a enseigné sur la création...
XebiCon'18 - Ce que l'histoire du métro Parisien m'a enseigné sur la création...XebiCon'18 - Ce que l'histoire du métro Parisien m'a enseigné sur la création...
XebiCon'18 - Ce que l'histoire du métro Parisien m'a enseigné sur la création...Publicis Sapient Engineering
 
XebiCon'18 - La guerre des Frameworks n'aura pas lieu
XebiCon'18 - La guerre des Frameworks n'aura pas lieuXebiCon'18 - La guerre des Frameworks n'aura pas lieu
XebiCon'18 - La guerre des Frameworks n'aura pas lieuPublicis Sapient Engineering
 
XebiCon'18 - Orchestration : Conteneurs vs Musique
XebiCon'18 - Orchestration : Conteneurs vs MusiqueXebiCon'18 - Orchestration : Conteneurs vs Musique
XebiCon'18 - Orchestration : Conteneurs vs MusiquePublicis Sapient Engineering
 
XebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
XebiCon'18 - Passage à l'échelle de mes applications Kafka-StreamsXebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
XebiCon'18 - Passage à l'échelle de mes applications Kafka-StreamsPublicis Sapient Engineering
 
TEch4Exec - OUI.sncf propose des voyages moins chers grâce au Big Data et au ...
TEch4Exec - OUI.sncf propose des voyages moins chers grâce au Big Data et au ...TEch4Exec - OUI.sncf propose des voyages moins chers grâce au Big Data et au ...
TEch4Exec - OUI.sncf propose des voyages moins chers grâce au Big Data et au ...Publicis Sapient Engineering
 
Tech4Exec - Pourquoi faut-il gérer votre projet (Big) data comme une start-up...
Tech4Exec - Pourquoi faut-il gérer votre projet (Big) data comme une start-up...Tech4Exec - Pourquoi faut-il gérer votre projet (Big) data comme une start-up...
Tech4Exec - Pourquoi faut-il gérer votre projet (Big) data comme une start-up...Publicis Sapient Engineering
 

Mais de Publicis Sapient Engineering (20)

XebiCon'18 - L'algorithme de reconnaissance de formes par le cerveau humain
XebiCon'18 - L'algorithme de reconnaissance de formes par le cerveau humainXebiCon'18 - L'algorithme de reconnaissance de formes par le cerveau humain
XebiCon'18 - L'algorithme de reconnaissance de formes par le cerveau humain
 
Xebicon'18 - IoT: From Edge to Cloud
Xebicon'18 - IoT: From Edge to CloudXebicon'18 - IoT: From Edge to Cloud
Xebicon'18 - IoT: From Edge to Cloud
 
XebiCon'18 - Modern Infrastructure
XebiCon'18 - Modern InfrastructureXebiCon'18 - Modern Infrastructure
XebiCon'18 - Modern Infrastructure
 
XebiCon'18 - La Web App d'aujourd'hui et de demain : état de l'art et bleedin...
XebiCon'18 - La Web App d'aujourd'hui et de demain : état de l'art et bleedin...XebiCon'18 - La Web App d'aujourd'hui et de demain : état de l'art et bleedin...
XebiCon'18 - La Web App d'aujourd'hui et de demain : état de l'art et bleedin...
 
XebiCon'18 - Des notebook pour le monitoring avec Zeppelin
XebiCon'18 - Des notebook pour le monitoring avec Zeppelin XebiCon'18 - Des notebook pour le monitoring avec Zeppelin
XebiCon'18 - Des notebook pour le monitoring avec Zeppelin
 
XebiCon'18 - Event Sourcing et RGPD, incompatibles ?
XebiCon'18 - Event Sourcing et RGPD, incompatibles ?XebiCon'18 - Event Sourcing et RGPD, incompatibles ?
XebiCon'18 - Event Sourcing et RGPD, incompatibles ?
 
XebiCon'18 - Boostez vos modèles avec du Deep Learning distribué
XebiCon'18 - Boostez vos modèles avec du Deep Learning distribuéXebiCon'18 - Boostez vos modèles avec du Deep Learning distribué
XebiCon'18 - Boostez vos modèles avec du Deep Learning distribué
 
XebiCon'18 - Comment fausser l'interprétation de vos résultats avec des dataviz
XebiCon'18 - Comment fausser l'interprétation de vos résultats avec des datavizXebiCon'18 - Comment fausser l'interprétation de vos résultats avec des dataviz
XebiCon'18 - Comment fausser l'interprétation de vos résultats avec des dataviz
 
XebiCon'18 - Le développeur dans la Pop Culture
XebiCon'18 - Le développeur dans la Pop Culture XebiCon'18 - Le développeur dans la Pop Culture
XebiCon'18 - Le développeur dans la Pop Culture
 
XebiCon'18 - Sécuriser son API avec OpenID Connect
XebiCon'18 - Sécuriser son API avec OpenID ConnectXebiCon'18 - Sécuriser son API avec OpenID Connect
XebiCon'18 - Sécuriser son API avec OpenID Connect
 
XebiCon'18 - Structuration du Temps et Dynamique de Groupes, Théorie organisa...
XebiCon'18 - Structuration du Temps et Dynamique de Groupes, Théorie organisa...XebiCon'18 - Structuration du Temps et Dynamique de Groupes, Théorie organisa...
XebiCon'18 - Structuration du Temps et Dynamique de Groupes, Théorie organisa...
 
XebiCon'18 - Spark NLP, un an après
XebiCon'18 - Spark NLP, un an aprèsXebiCon'18 - Spark NLP, un an après
XebiCon'18 - Spark NLP, un an après
 
XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...
XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...
XebiCon'18 - Utiliser Hyperledger Fabric pour la création d'une blockchain pr...
 
XebiCon'18 - Ce que l'histoire du métro Parisien m'a enseigné sur la création...
XebiCon'18 - Ce que l'histoire du métro Parisien m'a enseigné sur la création...XebiCon'18 - Ce que l'histoire du métro Parisien m'a enseigné sur la création...
XebiCon'18 - Ce que l'histoire du métro Parisien m'a enseigné sur la création...
 
XebiCon'18 - La guerre des Frameworks n'aura pas lieu
XebiCon'18 - La guerre des Frameworks n'aura pas lieuXebiCon'18 - La guerre des Frameworks n'aura pas lieu
XebiCon'18 - La guerre des Frameworks n'aura pas lieu
 
XebiCon'18 - Orchestration : Conteneurs vs Musique
XebiCon'18 - Orchestration : Conteneurs vs MusiqueXebiCon'18 - Orchestration : Conteneurs vs Musique
XebiCon'18 - Orchestration : Conteneurs vs Musique
 
XebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
XebiCon'18 - Passage à l'échelle de mes applications Kafka-StreamsXebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
XebiCon'18 - Passage à l'échelle de mes applications Kafka-Streams
 
XebiCon'18 - Data Science Done Wrong
XebiCon'18 - Data Science Done WrongXebiCon'18 - Data Science Done Wrong
XebiCon'18 - Data Science Done Wrong
 
TEch4Exec - OUI.sncf propose des voyages moins chers grâce au Big Data et au ...
TEch4Exec - OUI.sncf propose des voyages moins chers grâce au Big Data et au ...TEch4Exec - OUI.sncf propose des voyages moins chers grâce au Big Data et au ...
TEch4Exec - OUI.sncf propose des voyages moins chers grâce au Big Data et au ...
 
Tech4Exec - Pourquoi faut-il gérer votre projet (Big) data comme une start-up...
Tech4Exec - Pourquoi faut-il gérer votre projet (Big) data comme une start-up...Tech4Exec - Pourquoi faut-il gérer votre projet (Big) data comme une start-up...
Tech4Exec - Pourquoi faut-il gérer votre projet (Big) data comme une start-up...
 

XebiCon'16 : GraphQL et Falcor, un nouveau regard sur les architectures REST ? Par Antoine Le Taxin et Abdelhakim Bachar, Développeurs Front-End chez Xebia

  • 1. @xebiconfr #xebiconfr GraphQL et Falcor, un nouveau regard sur les architectures REST Abdelhakim Bachar Antoine Le Taxin
  • 2. @xebiconfr #xebiconfr Qui sommes-nous ? Abdelhakim Bachar @a_bachar 2 Antoine Le Taxin @modulom
  • 3. @xebiconfr #xebiconfr Super, un nouveau projet ! 1 3
  • 4. @xebiconfr #xebiconfr Besoin GraphQL for iOS par Simone Civetta GraphQL est une technologie dont vous avez entendu parler, peut-être, de vos collègues Front. Il s’agit d’une API middleware, similaire à un ESB, qui… Tags: Front, GraphQL, FalcorJS, React Commentaires Par Abdelhakim Bachar, Il y a 3 mois An awesome article Par Antoine Le Taxin, Il y a 3 mois Wow.. Thanks much for sharing.. 4 1a 5 articles, 30 commentaires
  • 5. @xebiconfr #xebiconfr RESTful (representational state transfer) ✔ Possibilité de cache ✔ Indépendance entre le modèle et la vue 5 1b { "id": 1, "title": "Lorem ipsum", "authorId": 1000 } { "id": 1000, "lastName": "Carver", "firstName": "Kerry" } ✘ Latence (grand nombre de requêtes ou réponse lourde) ✘ Over fetching [GET]/post/1 [GET]/user/1000
  • 7. @xebiconfr #xebiconfr Qu’est ce que GraphQL ? ● Est une Spécification ● Implémentée en plusieurs langages de programmation ● Définit un langage permettant de requêter et récupérer de manière déclarative des données depuis un back-end 7 2a
  • 8. @xebiconfr #xebiconfr Trois points d’histoire ● Créé par Facebook ● Remplacer tous les services REST nécessaires aux applications mobile ● En production depuis 2012 pour les applications iOS et Android de Facebook 8 2b
  • 9. @xebiconfr #xebiconfr Objectif Avoir un outil puissant, productif et rétrocompatible pour développer des applications 9 2c
  • 10. @xebiconfr #xebiconfr A quoi ressemble une requête ? 10 2d // Résultat { "user": { "id": 123456 "name": "Abdelhakim B." } } // Requête GraphQL { user(id: 123456) { id name } }
  • 11. @xebiconfr #xebiconfr Les Concepts de Base ● Hiérarchique ● Requêtes spécifiques au client ● Typage fort ● Rétrocompatibilité ● Introspectif ● Indépendant du transport 11 2e
  • 13. @xebiconfr #xebiconfr Requêtes spécifiques au client 13 2g Serveur Possibilités Client Besoins
  • 14. @xebiconfr #xebiconfr const UserType = new GraphQLObjectType({ name: 'User', description: 'Define a user resource', fields: () => ({ firstName: { type: GraphQLString, resolve: tag => tag.label }, posts: { type: new GraphQLList(PostType), resolve: tag => tag.getPosts() } }) }); Typage fort 14 2h
  • 15. @xebiconfr #xebiconfr const UserType = new GraphQLObjectType({ fields: () => ({ fullName: { type: GraphQLString, isDeprecated: true, deprecationReason: "You don't need it", resolve: user => `${user.firstName} ${user.lastName}` } }) }); Rétrocompatibilité 15 2i
  • 16. @xebiconfr #xebiconfr Introspectif 16 2j { __type(name: "User") { name kind } } { "data": { "__type": { "name": "User", "kind": "OBJECT" } } }
  • 18. @xebiconfr #xebiconfr Indépendant du transport 18 2l WebSocket
  • 19. @xebiconfr #xebiconfr Que des requêtes ? Non, pas seulement les requêtes, mais aussi la création, la mis à jour et la suppression grâce au Mutation 19 2m
  • 20. @xebiconfr #xebiconfr Comment requêter un serveur GraphQL ? POST curl -XPOST -d 'query { user { name } }' http://localhost:3000 GET http://localhost:3000/graphql?query={user{name}} 20 2n
  • 21. @xebiconfr #xebiconfr app.use('/graphql', expressGraphql({ schema, pretty: true, graphiql: true })); GraphQL HTTP Server Middleware 21 2o
  • 22. @xebiconfr #xebiconfr const schema = new GraphQLSchema({ query: queryType, mutation: mutationType }); GraphQL Schema 22 2p
  • 23. @xebiconfr #xebiconfr const queryType = new GraphQLObjectType({ name: 'Query', description: 'Root query entry point', fields: () => ({ users: UserQuery, posts: PostQuery, // ... }) }); GraphQL Query 23 2q
  • 24. @xebiconfr #xebiconfr const UserQuery = { type: new GraphQLList(UserType), args: { id: { type: GraphQLInt }, firstName: { type: GraphQLString }, // ... }, resolve: (root, args) => User.findAll({where: args}) }; UserQuery 24 2s
  • 25. @xebiconfr #xebiconfr const UserType = GraphQLObjectType({ name: 'User', description: 'Blog user', fields: () => ({ id: { type: GraphQLInt, resolve: u => u.id }, firstName: { type: GraphQLString }, posts: { type: new GraphQLList(PostType), resolve: u => u.getPosts() } }) }); Type User 25 2t
  • 26. @xebiconfr #xebiconfr const mutationType = new GraphQLObjectType({ name: "Mutation", description: "Root mutation entry point", fields: () => ({ createUser: { type: UserType, args: { firstName: {type: new GraphQLNonNull(GraphQLString)} }, resolve: (source, args) => User.create(Object.assign({}, args)) } }) }); GraphQL Mutation 26 2r
  • 27. @xebiconfr #xebiconfr { posts(name: 12549) { id title content author { id firstName lastName } comments { content author { id firstName lastName count_comments count_posts } } } } La requête pour notre blog 27 2u GraphQL for iOS par Simone Civetta GraphQL est une technologie dont vous avez entendu parler, peut-être, de vos collègues Front. Il s’agit d’une API middleware, similaire à un ESB, qui… Tags: Front, GraphQL, FalcorJS, React Commentaires Par Abdelhakim Bachar, Il y a 3 mois An awesome article Par Antoine Le Taxin, Il y a 3 mois Wow.. Thanks much for sharing.. 5 articles, 30 commentaires
  • 29. @xebiconfr #xebiconfr ● Est un librairie Javascript open source ● Propose une manière impérative de décrire et d’accéder aux données ● Embarque un système de cache et d’optimisation de requêtes Qu’est ce que Falcor ? 29 3a
  • 30. @xebiconfr #xebiconfr ● Créé par Netflix ● Répond aux besoins de performance, d’éclatement de leur sources de données et diversité des supports ● En production pour leur applications TV, mobile et desktop et open source depuis 2015 Trois points d’histoire 30 3b
  • 31. @xebiconfr #xebiconfr Avoir un outil centré sur la performance et le cloud, spécialement adapté aux architectures microservices. Objectif 31 3c
  • 32. @xebiconfr #xebiconfr A quoi ressemble une requête ? 32 3d // Résultat { "user": { "name": "Abdelhakim B." } } // Requête falcor model .get('users[0].name') .then( // )
  • 33. @xebiconfr #xebiconfr Les Concepts de Base 33 3e Paths JSON Graph Data SourcesRouter Model
  • 34. @xebiconfr #xebiconfr ● Langage de query de Falcor ● Exprime un chemin au travers d’un objet JSON ● Il accepte deux syntaxes : ○ Syntaxe Path String ○ Array de clés 'posts[1].title' ['posts', 1, 'title'] 'posts[1..2]['title','content']' ['posts', {from: 1, to: 2}, ['title','content']] Paths 34 3f
  • 35. @xebiconfr #xebiconfr ● On accède aux données au travers d’un graph JSON unique (quelque soit le nombre de sources) // frontend var model = new falcor.Model({ source: new falcor.HttpDataSource('api/model.json') }) // backend app.use('/api/model.json', falcorExpress.dataSourceRoute((req, res) => { return new Router([ (...) ]) } ) Model 35 3g
  • 36. @xebiconfr #xebiconfr ● Retourne les données de manière asynchrone model .get( /.../ ) .then(/.../) Model 36 3h
  • 37. @xebiconfr #xebiconfr Le Modèle optimise les requêtes concurrentes model .get( 'posts[0].title', 'posts[1].title', 'posts[0].content', 'posts[1].content, ) .then(/.../) // Path envoyé au backend sous form de “query string” paths: [["posts",{"from":0,"to":1},["title", “content”]]] Model 37 3i
  • 38. @xebiconfr #xebiconfr Le Modèle optimise les requêtes sortantes grâce au cache model .get('posts[0..1].title').then(/.../) // Path envoyé au backend sous form de “query string” paths: [["posts",{"from":0,"to":1},"title"]] model .get('posts[0..1][“title”,”content”]').then(/.../) // Path envoyé au backend est optimisé pour ne chercher que la donnée manquante paths: [["posts",{"from":0,"to":1},"content"]] Model 38 3j
  • 39. @xebiconfr #xebiconfr Pour permettre au JSON de passer d’arbre à graph. Types primitifs supplémentaires : ● Reference (ref) : lien symbolique ● Atom (atom) : valeur json (object / array) ● Error (error) : erreur (surtout utilisé côté routeur) JSON Graph 39 3k
  • 40. @xebiconfr #xebiconfr { postsByIds: { 1000: { title: "Aliquip voluptate ", content: "Ex cupidatat ", author_id: falcor.Model.ref('usersByIds[1000]') }, 1001: {...} }, posts: [ { $type: 'ref', value:['postsByIds', 1000] }, { $type: 'ref', value:['postsByIds', 1001] } ] }}) JSON Graph : ref 40 3l
  • 41. @xebiconfr #xebiconfr Data Sources 41 3m Une interface qui permet d’exposer un JSON Graph Opérations disponibles pour Route ou Model : ● get : lire ● set : modifier ● call : appeler une fonction du graph (non idempotent)
  • 42. @xebiconfr #xebiconfr Router ● Pattern matching sur la structure du graph Json. ● Trois types spécifiques : ○ {integers} / {range} / {keys} ● pathSet comprend les arguments du path sous forme d’array // front model.get('posts[0].title') // route route: "posts[{integers:postId}]['title', 'content']", get: (pathSet) => { return someAsyncService.getData(pathSet) //… pathSet[0] = posts / pathSet[1] = 0 / pathSet[2] = title // } 42 3n
  • 43. @xebiconfr #xebiconfr model.get( 'postsById[12549]["title", "content", "tags", "author"]' ) model.get(` authorsById[${data.author.id}]["firstName", "lastName"] `) model.get(` commentsById[${data.comments.from}..${data.comments.to}] ["content", "author"] `) model.get(` authorsById[${data.author.from}..${data.author.to}] ["firstName", "lastName", "count_comments", "count_post"] `) La requête pour notre blog 43 3o GraphQL for iOS par Simone Civetta GraphQL est une technologie dont vous avez entendu parler, peut-être, de vos collègues Front. Il s’agit d’une API middleware, similaire à un ESB, qui… Tags: Front, GraphQL, FalcorJS, React Commentaires Par Abdelhakim Bachar, Il y a 3 mois An awesome article Par Antoine Le Taxin, Il y a 3 mois Wow.. Thanks much for sharing.. 5 articles, 30 commentaires
  • 45. @xebiconfr #xebiconfr Avantages / inconvénients de GraphQL ✔ Déclaratif (requête, type) ✔ Documentation vivante ✔ Une seule requête suffit ✔ Exploration facile des données ✔ Contrôle total sur la granularité des informations ✘ Ne supporte ni les opérateurs, ni les fonctions d'agrégation ✘ Pas de gestion automatique du cache 45 4a
  • 46. @xebiconfr #xebiconfr Avantages / inconvénients de Falcor ✔ Gestion automatique du cache ✔ Optimisation à la volée des requêtes ✔ Contrôle total sur la granularité des informations ✔ Optimisé pour la gestion de sources de données multiples ✔ Le code front et back utilisent la même librairie ✘ Impératif (pas de type) ✘ Ne supporte ni les opérateurs, ni les fonctions d'agrégation ? Implémentation du backend est laissé à la charge du développeur 46 4b
  • 47. @xebiconfr #xebiconfr Cas d’utilisation Prendre l’une des deux solutions si : - Beaucoup de lecture, peu d’écriture - Le réseau et la latence est la principale préoccupation (Mobile) S’orienter vers GraphQL si : - Vous voulez une validation du modèle et une documentation - Vous voulez utiliser autre langage que Javascript S’orienter vers Falcor si : - Vos données sont réparties à différents endroits - Vous voulez un cache géré automatiquement et optimisé 47 4c