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
220
Mistakes I made writing React/Redux applications
asantos00
0
140
Other Decks in Programming
See All in Programming
CSC307 Lecture 04
javiergs
PRO
0
640
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
2.2k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
120
JETLS.jl ─ A New Language Server for Julia
abap34
2
480
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
5.4k
TestingOsaka6_Ozono
o3
0
270
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
0
570
Cap'n Webについて
yusukebe
0
170
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
130
はじめてのカスタムエージェント【GitHub Copilot Agent Mode編】
satoshi256kbyte
0
170
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
210
Grafana:建立系統全知視角的捷徑
blueswen
0
290
Featured
See All Featured
How Software Deployment tools have changed in the past 20 years
geshan
0
31k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
89
Tell your own story through comics
letsgokoyo
1
790
Visualization
eitanlees
150
16k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
110
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
48
The World Runs on Bad Software
bkeepers
PRO
72
12k
What's in a price? How to price your products and services
michaelherold
246
13k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
69
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Google's AI Overviews - The New Search
badams
0
890
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
120
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