Codementor Events

Backend for Frontend Pattern and GraphQL

Published Jul 10, 2018

This is a recording of a presentation I gave at FrontCon Riga. The talk crosscuts frontend and backend development and explores the way of how to build better API’s when your application has multiple different user interfaces.

Imagine an application that has a web, mobile and watch UI. They all offer different functionality and therefore require access to different information and functions. A default solution in such a situation would be to try to build a generic backend that can be used by all clients. But trying to build a one size fits all solution often backfires and raises multiple questions, e.g.:

  • Who owns the API and how to implement changes required by different UI teams?
  • What interface to use?
  • What if two clients need the same data in different shapes?
  • How to optimize the APIs for different clients?
  • What to do when the API gets too large?

Having a generic backend for all UI’s leads to mediocre performance, degraded user experience as well as additional communication overheads for the development teams. Seeing how this approach doesn’t work we can go in another direction: build different API services for different clients. Thus enter Sam Newman’s Backend For Frontend pattern that inroduces the idea of having a separate backend for each type of UI in your application. Add the newly popular GraphQL API on on top, and you now have the means to take this pattern to a whole new level.

The video will explain how the BFF pattern and GraphQL can help us address the quetions we’ve listed before and improve our overall application architecture.

Backend for Frontend Pattern and GraphQL

Discover and read more posts from Pavels Jelisejevs
get started
post commentsBe the first to share your opinion
Show more replies