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 Calypso-like Applications
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Nikolay Bachiyski
January 28, 2016
Programming
870
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Building Calypso-like Applications
@ A Day of REST
Nikolay Bachiyski
January 28, 2016
More Decks by Nikolay Bachiyski
See All by Nikolay Bachiyski
React.js for WordPress Developers
nb
0
300
Else Considered Harmful
nb
2
1.1k
On Learning
nb
2
830
WordPress: To OOP or not to OOP
nb
4
8.2k
On Creeds and Manifestos
nb
2
240
Welcome to the Chaos – The Distributed Workplace
nb
3
240
To a thousand servers and beyond: scaling a massive PHP application
nb
3
1.6k
Взимане на продуктови решения (Making product decisions)
nb
0
170
Other Decks in Programming
See All in Programming
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
280
AI時代に学ぶ 好きなルール 嫌いなルール Linter編
shorty5121
0
700
Cloudflare is Agents
chimame
0
190
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
560
AIに既存システムを理解させる技術 ~レガシーを見捨てないハーネスエンジニアリング入門~
ochtum
0
180
AI駆動開発にグラフDBを重ねてみた
satoshi256kbyte
2
500
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
460
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
130
Pythonの実行はどこまで賢くなったのか? CPythonとPyPyから見る最適化のしくみ
curekoshimizu
4
2.4k
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
600
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
30年振りにコンパイラの定数整数除算を改善した
herumi
9
4.4k
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
270
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
How to train your dragon (web standard)
notwaldorf
97
6.8k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
220
Making Projects Easy
brettharned
120
6.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Test your architecture with Archunit
thirion
2
2.4k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
410
Transcript
BUILDING CALYPSO-LIKE APPLICATIONS
TODAY ▸ What did we learn when building Calypso ▸
How can it help you build similar applcations
WHAT IS CALYPSO?
None
HTTP://WORDPRESS.COM/
https://github.com/Automattic/wp-calypso
CALYPSO GOALS
0. BETTER USER EXPERIENCE
1. FASTER PRODUCT ITERATION
2. BETTER DEVELOPER EXPERIENCE
HOW DOES CALYPSO WORK?
OPEN WORDPRESS.COM?
None
WEBPACK
<script src="/calypso/vendor.7040ada5ffb545212814.min.js"></script> <script src="/calypso/build-production.7040ada5ffb545212814.min.js"></script> <script src="/calypso/reader.f90bc942cc65cc1988e9.min.js"></script>
A USER VISITS A (NEW) URL
page( '/me', controller.sidebar, controller.profile ); page( '/me/account', controller.sidebar, controller.account );
WE RENDER A REACT COMPONENT
COMPONENT = HTML + JS
BUT THE DATA?
WORDPRESS.COM REST API
WP.COM REST API V2 === WP-API
wpcom.js
FETCHING IN CONTROLLER
DUMB
render: function() { const size = this.props.size; if ( !
this.props.user ) { return <span className="gravatar is-placeholder" style={ { width: size, height: size } } />; } const alt = this.props.alt || this.props.user.display_name; const avatarURL = this._getResizedImageURL( safeImageURL( this.props.user.avatar_URL ) ); return ( <img alt={ alt } className="gravatar" src={ avatarURL } width={ size } height={ size } /> ); }
None
<Post post={} user={} alltags={}> {this.props.post} <PostUser user={} /> <TagSelector tags={}
/> </Post>
SMART/CONNECTED CONTAINERS
STORES/GLOBAL STATE ▸ Users ▸ Posts ▸ Fetch Errors
USER ACTIONS
export function requestSitePosts( siteId, query = {} ) { return
( dispatch ) => { dispatch( { type: POSTS_REQUEST, siteId, query } ); return wpcom.site( siteId ).postsList( query ).then( ( { found, posts } ) => { dispatch( receivePosts( posts ) ); dispatch( { type: POSTS_REQUEST_SUCCESS, siteId, query, found, posts } ); } ).catch( ( error ) => { dispatch( { type: POSTS_REQUEST_FAILURE, siteId, query, error } ); } ); }; }
FLUX
REUSABLE COMPONENTS
https://wpcalypso.wordpress.com/devdocs/design
None
THERE’S MORE…
!!! Честит рожден ден, Ю.
WHAT’S IN IT FOR YOU?
DO YOU NEED A SINGLE-PAGE APP?
▸ A lot of user interaction ▸ Quick transitions ▸
Multiple front-ends (web, mobile, desktop) ▸ Skill: JavaScript ▸ Skill: new type of architecture
CHOOSING TECHNOLOGY
EMBER
ANGULAR
REACT + FRIENDS
UNDERSTANDING
UNI-DIRECTIONAL WORKFLOW
→
PROJECTS AROUND REACT
REDUX
http://redux.js.org https://egghead.io/series/getting-started-with-redux
REACT ROUTER
FOMO
FUN
Q? EXTRAPOLATE.ME @NIKOLAYB