Slide 1

Slide 1 text

Ready. Steady. Go! The speed of Web Service Creation With JavaScript Oliver Mensah

Slide 2

Slide 2 text

Oliver Mensah Software Developer, Technical Writer, Developer Community Evangelist ● Recent Computer Science Graduate ● National Service Personnel at AgroInnova ● Facebook Developer Circle: Accra Co-Organizer ● Previously at Google Developer Group: Ashesi Twitter: @Oliver_Mensah GitHub: @OMENSAH Email: Olivermensah96@gmail.com

Slide 3

Slide 3 text

Once Upon a Time? How Applications were: Built Thought of

Slide 4

Slide 4 text

Then there was an evolution Web Services Application Programming Interface  A single point of contact for each of client facing applications. Strategies  REST  GraphQL

Slide 5

Slide 5 text

Creating a REST API Using Nodejs  Bootstrapping Project with Dependencies  Designing the RESTful API Endpoints  Data Modeling and Storage(Mocked Data)  Data Validation  Authorization of endpoint  Cross Origin  Interaction between API and Client

Slide 6

Slide 6 text

Bootstrapping project with dependencies  Add what you need

Slide 7

Slide 7 text

Designing RESTful Endpoints Build around main Entities(resource) Model these Entities Operations occur on the model

Slide 8

Slide 8 text

Data Modeling and Storage/Mocked Data Model Data based on  Inherent structure of the data itself   Application usage of data(queries, updates and data processing

Slide 9

Slide 9 text

Data Validation Where should data be validated  Logic Layer(Controller)  - required  Model Layer(Data Storage)  - optional

Slide 10

Slide 10 text

Cross Origin Request Restrictions:  Get Requests on same origin  CORS request from different domains and ports  - API failure 

Slide 11

Slide 11 text

Demo Interaction between API and Client

Slide 12

Slide 12 text

RESTful APIs Pain Points  More or less data Writing lots of endpoints ● Less endpoints with query parameters ●

Slide 13

Slide 13 text

Can we do better with Our APIs?

Slide 14

Slide 14 text

Using Nodejs  Bootstrapping Project with Dependencies  Designing the GraphQL Data Model  Developing queries and mutations with Data Storage(Mocked Data)  Authorization to Access Queries and Fields  Interaction between API and Client Creating GraphQL API

Slide 15

Slide 15 text

Questions?

Slide 16

Slide 16 text

Thanks !

Slide 17

Slide 17 text

No content