Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Building Calypso-like Applications
Search
Nikolay Bachiyski
January 28, 2016
Programming
900
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
Transcript
55 slides
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
More Decks by Nikolay Bachiyski
See All by Nikolay Bachiyski
React.js for WordPress Developers
nb
0
310
Else Considered Harmful
nb
2
1.1k
On Learning
nb
2
850
WordPress: To OOP or not to OOP
nb
4
8.3k
On Creeds and Manifestos
nb
2
250
Welcome to the Chaos – The Distributed Workplace
nb
3
250
To a thousand servers and beyond: scaling a massive PHP application
nb
3
1.6k
Взимане на продуктови решения (Making product decisions)
nb
0
180
Other Decks in Programming
See All in Programming
Going Full Circle with Virtual Graphs and Relational Databases
michaelsimons
1
120
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
530
エージェントの管理もエージェントに – herdr-core と自作バックログで作る司令塔 –
nearme_tech
PRO
2
190
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
260
Promiseの向こう側へコンテキストを届ける ― proposal-async-context
seriseri
1
1.2k
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
220
ビジネスロジックを堅牢に~Scala 3のドメインプリミティブ~
j5ik2o
0
240
AIエージェントの「テストは通るのに本番で壊れる」を減らす
shibuiwilliam
3
140
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
2
1.4k
[DroidKnights 2026] Workflow AX 적용기 — 자동 정책 정리부터 E2E까지
dayeon
0
130
観測者から当事者へ、AI 時代にドメインへ深入りする知識と技術 / From Observer to Practitioner: Going Deep into Domains in the Age of AI
nrslib
3
1.7k
眠らない開発チームの作り方
biwakonbu
0
180
Featured
See All Featured
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
970
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
320
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
550
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Ruling the World: When Life Gets Gamed
codingconduct
0
450
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
2k
Designing Experiences People Love
moore
143
24k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
49k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k