Motivation - Legacy Application Stack
16.10.17 9
- Mostly MVC(Spring/Rails) with REST Endpoints
- Server-Side rendered HTML with Ajax calls
- One React JS Front End Client
Slide 10
Slide 10 text
Motivation - Requirements
16.10.17 10
- Complex UI
- Public API
- Faster Development
- Reduce integration effort
- Reduce project onboarding
- Performance
Slide 11
Slide 11 text
Motivation - Solutions?
16.10.17 11
Complex UI
- Experience with React.JS for over a year
- Future Implementation in most of the clients
- Developer team React knowledge
Slide 12
Slide 12 text
Motivation - Solutions?
16.10.17 12
Public API
- Pure REST standard is hard to implement
- Unique URI´s, request methods has to have a meaning(PUT or POST?)
- Need a Gateway for security and performance
/product or /products
PUT or POST
which Content-Type ?
Transition: Client Requirements
06.07.17 lokalleads 24
lokalleads
- Concurrent request
- Different data sources
- Reactive: On user action more requests
Slide 25
Slide 25 text
Transition: Development Process
Schema Design Backend && Frontend Production
Slide 26
Slide 26 text
Transition: GraphQL Schema
Prefer building a Graph-QL schema that describes
how clients use the data,
rather than mirroring the legacy database schema.
Slide 27
Slide 27 text
Transition: GraphQL Schema
Slide 28
Slide 28 text
Transition - Mock Data
REST responses were used as mock data.
Slide 29
Slide 29 text
Transition: Development Process
Schema Design Production
Development
Slide 30
Slide 30 text
Transition: Client App Based
View 1 View 1 View 1 View 1 View 1
GraphQL Server
Resolver2 Resolver 2 Resolver1
Slide 31
Slide 31 text
Transition - GraphiQL
Slide 32
Slide 32 text
Transition - Apollo Client
Slide 33
Slide 33 text
Transition - Voyager
Slide 34
Slide 34 text
Transition: Development Process
Schema Design Production
Backend && Frontend
Slide 35
Slide 35 text
Transition: Production Tips
Slide 36
Slide 36 text
Transition: Production Tips
Slide 37
Slide 37 text
Challenges: Thinking in Graphs
06.07.17 lokalleads 37
In the REST implementation data is modeled in terms of
network services.
/campaigns
/campaigns_and_metrics
/campaigns_and_statistics
Slide 38
Slide 38 text
Challenges: Thinking in Graphs
06.07.17 lokalleads 38
With GraphQL, you model your business domain as a graph.
/campaigns
/campaigns_and_metrics
/campaigns_and_statistics
Slide 39
Slide 39 text
Challenges: Thinking in Graphs
06.07.17 lokalleads 39
Slide 40
Slide 40 text
Challenges - Thinking in Graphs
06.07.17 lokalleads 40
Slide 41
Slide 41 text
Challenges - Schema Agreement
06.07.17 lokalleads 41
- Development starts with the
Schema
- Hard types force the team to agree
before hand