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
Splitting up 8Ball and building/sharing components
Search
Mark Stuart
February 19, 2015
Programming
0
110
Splitting up 8Ball and building/sharing components
Mark Stuart
February 19, 2015
Tweet
Share
More Decks by Mark Stuart
See All by Mark Stuart
JS@PayPal 2015 - Insanely fast rendering w/ Service Workers and Early Flushing
mstuart
0
930
Midwest JS 2014 - Securing your Node.js & Single Page Apps
mstuart
2
350
enterJS 2014 - Securing your Node.js & Single Page Apps
mstuart
4
620
HTML5DevConf 2014 - Securing your JavaScript apps
mstuart
0
180
Other Decks in Programming
See All in Programming
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
240
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.1k
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
0
170
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
110
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
3
730
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
400
Domain-Driven Transformation
hschwentner
2
1.9k
定理証明プラットフォーム lapisla.net
abap34
1
1.7k
プログラミング言語学習のススメ / why-do-i-learn-programming-language
yashi8484
0
120
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
Done Done
chrislema
182
16k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Gamification - CAS2011
davidbonilla
80
5.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
99
18k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
KATA
mclloyd
29
14k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Designing for humans not robots
tammielis
250
25k
Transcript
Splitting up 8ball & Building & Sharing Components: Our Plan
for 2015
go/8ballcomponents
Part 1: App Split
What’s the plan?
Split up the app. Create more server-side modules. Package up
flows, dynamic and static components.
Building
Why split up the app?
Faster/easier releases Benefit #1 ! ! !
Independent releases. Can’t block each other. Less cross-team merge conflicts.
Improved focus Benefit #2 ! ! !
Remove the noise. Write small, focused modules. Better code, better
docs, better tests. Easier ramp up time for new devs.
More stable Benefit #3 ! ! !
Errors and crashes are more contained. Kinda sad, but this
is a nice feature. =)
Able to move forward Benefit #4 ! ! !
It’s hard to change a monolith. It’s easy to change
a small app. Easier to experiment.
Push Schedule 2/24 - settingsnodeweb LTS March - Credit App
LTS April - Transfer App LTS
Okay, so how do components fit into this?
Part 2: Components
Modularize the common parts. Reason #1 ! ! !
Modularize the common parts.
consumerweb-* modules
consumerweb-* TODOs Some failing unit tests. No ESLint. Need to
add CI ASAP. Any takers? =)
Create value ($$$) Reason #2 ! ! !
P2P and Add Bank everywhere. Drive more people to Consumer
Web.
Unified Login… Unified Add Bank?
Components are really tough.
Highly recommended!
No consistent UI platform. Difficult to share code with teams.
No Kraken for the UI. No consistent component APIs.
Delivering UI components
Web Components Option #1 ! ! !
End all be all? ! Encapsulation. Shadow DOM. Natural components.
None
iframes Option #2 ! ! !
The Good Parts (tm) Super old and works everywhere. Easy
to implement. Server-side or Client-side rendered. Encapsulated. UI platform agnostic. Communication via postMessage.
The Bad Parts You can’t pick what you want, you
get it all. Multiple versions of jQuery, etc. Could have performance implications.
Example: P2P 1-line iframe integration
<script src=“loader.js?path=/myaccount/transfer” /> 1. Fetches and loads loader.js 2. loader.js
scrapes off “path” from itself 3. Creates an iframe 4. Sets the iframe’s URL to the “path”
Great part is this is super re-usable. <script src=“loader.js?path=/myaccount/transfer/send” />
<script src=“loader.js?path=/myaccount/wallet/bank/add” /> <script src=“loader.js?path=/myaccount/settings/address” /> …
redirectUrl Option #3 ! ! !
Common pattern. Useful for flows (P2P, Add Bank, etc.) Least
amount of risk. Crappiest UX.
paypal.com/myaccount/transfer?redirectUrl=/merchant/home 1. Store redirectUrl in session. 2. /myaccount/transfer is rendered.
3. If the user exits, redirect to redirectUrl. 4. If the user completes, redirect to redirectUrl.
Next steps Split out as many apps as possible. Keep
building server-side modules. Build UI components for dust/Backbone. Hopefully within 2-3 months =)
Packaging components
Bower out. npm in.
component-creditmodule npm postinstall script Copies files into public/ ! dependencies,
peerDependencies
If you’d like to help out, let me know!