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
96
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
180
Mistakes I made writing React/Redux applications
asantos00
0
94
Other Decks in Programming
See All in Programming
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
930
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
flutterkaigi_2024.pdf
kyoheig3
0
150
イベント駆動で成長して委員会
happymana
1
340
Outline View in SwiftUI
1024jp
1
330
CSC509 Lecture 12
javiergs
PRO
0
160
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
240
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
480
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Designing Experiences People Love
moore
138
23k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
GraphQLとの向き合い方2022年版
quramy
43
13k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Designing the Hi-DPI Web
ddemaree
280
34k
Documentation Writing (for coders)
carmenintech
65
4.4k
The Invisible Side of Design
smashingmag
298
50k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Adopting Sorbet at Scale
ufuk
73
9.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Music & Morning Musume
bryan
46
6.2k
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