Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building a production-ready front-end even if y...

Building a production-ready front-end even if your API does not exist

require('lx')

Alexandre Santos

January 09, 2020
Tweet

More Decks by Alexandre Santos

Other Decks in Programming

Transcript

  1. Who am I? Alexandre Santos, 25 January 9th 2020 Full-stack

    developer Software architecture, TDD, product
  2. Develop an amazing user experience Against a finished and documented

    API That's always stable With fully decided feature requirements Front-end
  3. Against an almost finished & not documented API That's probably

    unstable With fast changing feature requirements The Conditions
  4. Problems Front-end ahead of back-end Local environment Emulate back-end changes

    locally Solutions Not finished API Unstable remote environment Fast changing requirements
  5. Advantages of local mocks Quickly develop and ship the working

    front-end to a testing environment. Develop for the happy path seamlessly Payload is exactly what front-end needs
  6. Disadvantages of local mocks Ignoring network Only develop for the

    happy path APIs can change, paths can change Loading states? Error scenarios? Feedback to the user?
  7. Presenting Mirage JS Mirage JS is an API mocking library

    that lets you build, test and share a complete working JavaScript application without having to rely on any backend services.
  8. Started with ember.js in 2015 - ember-cli-mirage Front-end first development

    Widely used (around 30k weekly) Recently extracted to a vanilla JS package A little bit of history
  9. Problems Front-end ahead of back-end Local environment Emulate back-end changes

    locally Solutions Not finished API Unstable remote environment Fast changing requirements ✅ ✅ ✅