building blocks of a rest api project - human made · building blocks of a rest api project joe...

Post on 30-May-2020

5 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Building Blocks of a REST API Project

Joe Hoyle @joe_hoyle

Discovering / Learning

Fog of war

Fog of war

Fog of war

A Practical Example

We’re going to build a website

We’re going to build a website

We’re going to build a website

We’re going to build a website

Sign Up

admin-ajax.php

A map with people on it

admin-ajax.php

Facebook API into the app

/facebook-callback

Getting past the “Minimum Viable Product” stage

Jquery suip in the app, complication

/admin-ajax.php

JavaScript Web App

Enter the REST API

We have a place to put our code

REST API

REST API

User City

{ name: ‘Joe’, id: 1, city: 232, _links: { ‘city’: ‘/cities/232’ }}

{ name: ‘London’, id: 232, location: [0,0.232]}

User

{ object: ‘user’, properties: { name: { type: ‘string’, description: ‘The name of the user’ }, id: { type: ‘number’, description: ‘An identifier for the user }, city: { type: ‘number’, description: ‘The id of the city the user is in’ } }}

Scaling Further

Our app is super popular… and slow

Users

REST API

Users

REST API

Custom Caching Middleware

Mobile Application

React Native

Mobile Application

React Native

REST API

OAuth 2

/u/b37hd92kdl8{ name: ‘Joe’, id: 1, city: 232, _links: { ‘city’: ‘/cities/232’ }, _embedded: { city: { name: ‘London’, id: 232, location: [0,0.232] } }}

User Public Endpoint

User Public Endpoint

Joe Hoyle @joe_hoyle

Questions

top related