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

41
Building Blocks of a REST API Project Joe Hoyle @joe_hoyle

Upload: others

Post on 30-May-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Building Blocks of a REST API Project

Joe Hoyle @joe_hoyle

Page 2: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Discovering / Learning

Page 3: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Fog of war

Page 4: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super
Page 5: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Fog of war

Page 6: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Fog of war

Page 7: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

A Practical Example

Page 8: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

We’re going to build a website

Page 9: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

We’re going to build a website

Page 10: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

We’re going to build a website

Page 11: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

We’re going to build a website

Page 12: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Sign Up

admin-ajax.php

Page 13: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

A map with people on it

Page 14: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

admin-ajax.php

Page 15: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Facebook API into the app

/facebook-callback

Page 16: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Getting past the “Minimum Viable Product” stage

Page 17: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Jquery suip in the app, complication

Page 18: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super
Page 19: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

/admin-ajax.php

JavaScript Web App

Page 20: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Enter the REST API

Page 21: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

We have a place to put our code

Page 22: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

REST API

Page 23: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super
Page 24: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super
Page 25: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

REST API

User City

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

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

Page 26: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

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’ } }}

Page 27: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super
Page 28: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Scaling Further

Page 29: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Our app is super popular… and slow

Page 30: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Users

REST API

Page 31: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Users

REST API

Custom Caching Middleware

Page 32: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Mobile Application

Page 33: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

React Native

Page 34: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Mobile Application

React Native

Page 35: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super
Page 36: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

REST API

OAuth 2

Page 37: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

/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

Page 38: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

User Public Endpoint

Page 39: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super
Page 40: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super
Page 41: Building Blocks of a REST API Project - Human Made · Building Blocks of a REST API Project Joe Hoyle @joe_hoyle. Discovering / Learning. Fog of war. Fog of war. ... Our app is super

Joe Hoyle @joe_hoyle

Questions