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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
1k
Midwest JS 2014 - Securing your Node.js & Single Page Apps
mstuart
2
350
enterJS 2014 - Securing your Node.js & Single Page Apps
mstuart
4
630
HTML5DevConf 2014 - Securing your JavaScript apps
mstuart
0
180
Other Decks in Programming
See All in Programming
CSC307 Lecture 06
javiergs
PRO
0
680
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
170
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6k
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
Apache Iceberg V3 and migration to V3
tomtanaka
0
150
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
680
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
CSC307 Lecture 02
javiergs
PRO
1
770
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
KIKI_MBSD Cybersecurity Challenges 2025
ikema
0
1.3k
Fragmented Architectures
denyspoltorak
0
150
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
1
2.7k
The Language of Interfaces
destraynor
162
26k
How to build a perfect <img>
jonoalderson
1
4.9k
Balancing Empowerment & Direction
lara
5
880
Marketing to machines
jonoalderson
1
4.6k
Raft: Consensus for Rubyists
vanstee
141
7.3k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
4 Signs Your Business is Dying
shpigford
187
22k
Designing Experiences People Love
moore
144
24k
Odyssey Design
rkendrick25
PRO
1
490
How to Ace a Technical Interview
jacobian
281
24k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
110
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!