Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building a production-ready front-end even if y...
Search
Alexandre Santos
January 09, 2020
Programming
1
97
Building a production-ready front-end even if your API does not exist
require('lx')
Alexandre Santos
January 09, 2020
Tweet
Share
More Decks by Alexandre Santos
See All by Alexandre Santos
Deno - Why should you care
asantos00
0
29
E2E tests with Cypress.io
asantos00
0
190
Mistakes I made writing React/Redux applications
asantos00
0
100
Other Decks in Programming
See All in Programming
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
190
functionalなアプローチで動的要素を排除する
ryopeko
1
870
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
600
Vue.jsでiOSアプリを作る方法
hal_spidernight
0
120
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
150
SpringBoot3.4の構造化ログ #kanjava
irof
2
730
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
630
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.3k
HTML/CSS超絶浅い説明
yuki0329
0
210
2025.01.17_Sansan × DMM.swift
riofujimon
2
640
Spring gRPC について / About Spring gRPC
mackey0225
0
160
毎日13時間もかかるバッチ処理をたった3日で60%短縮するためにやったこと
sho_ssk_
1
680
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Rails Girls Zürich Keynote
gr2m
94
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
270
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Bash Introduction
62gerente
610
210k
Thoughts on Productivity
jonyablonski
68
4.4k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Done Done
chrislema
182
16k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
GraphQLとの向き合い方2022年版
quramy
44
13k
Transcript
Alexandre Santos Production-ready front-end even if the API does not
exist 9th January 2020
Who am I? Alexandre Santos, 25 January 9th 2020 Full-stack
developer Software architecture, TDD, product
Develop an amazing user experience Against a finished and documented
API That's always stable With fully decided feature requirements Front-end
None
The goal Develop an amazing user experience
Against an almost finished & not documented API That's probably
unstable With fast changing feature requirements The Conditions
None
Problems Not finished API Unstable remote environment Fast changing requirements
Problems Front-end ahead of back-end Local environment Emulate back-end changes
locally Solutions Not finished API Unstable remote environment Fast changing requirements
Possible solution Local mocks
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
Taking a few steps back... Develop an amazing user experience
Flickering UI No loading states Possible unknown crashes No feedback
given to the user Amazing user experience?
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?
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.
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
Demo time
Problems Front-end ahead of back-end Local environment Emulate back-end changes
locally Solutions Not finished API Unstable remote environment Fast changing requirements ✅ ✅ ✅
Future ideas Node.js support Better TypeScript typings Chaos Engineering approach
to miragejs OpenAPI miragejs generator
We’d love your help! miragejs/miragejs miragejs/website miragejs-caos miragejs-open-api [insert your
package] Join us on Discord Mirage JS
Thank you Questions? Github: asantos00 Twitter: ampsantos0