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
110
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
37
E2E tests with Cypress.io
asantos00
0
210
Mistakes I made writing React/Redux applications
asantos00
0
120
Other Decks in Programming
See All in Programming
Your Perfect Project Setup for Angular @BASTA! 2025 in Mainz
manfredsteyer
PRO
0
140
Model Pollution
hschwentner
1
190
10年もののAPIサーバーにおけるCI/CDの改善の奮闘
mbook
0
790
『毎日の移動』を支えるGoバックエンド内製開発
yutautsugi
2
210
SpecKitでどこまでできる? コストはどれくらい?
leveragestech
0
610
CSC509 Lecture 02
javiergs
PRO
0
410
Web Components で実現する Hotwire とフロントエンドフレームワークの橋渡し / Bridging with Web Components
da1chi
3
1.9k
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
850
After go func(): Goroutines Through a Beginner’s Eye
97vaibhav
0
240
Swift Concurrency - 状態監視の罠
objectiveaudio
2
480
Introducing ReActionView: A new ActionView-Compatible ERB Engine @ Kaigi on Rails 2025, Tokyo, Japan
marcoroth
3
950
Serena MCPのすすめ
wadakatu
4
920
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
53
7.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
19
1.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
The Cost Of JavaScript in 2023
addyosmani
53
9k
A Tale of Four Properties
chriscoyier
160
23k
The Straight Up "How To Draw Better" Workshop
denniskardys
237
140k
Being A Developer After 40
akosma
91
590k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
YesSQL, Process and Tooling at Scale
rocio
173
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
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