Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Launching into Orbit.js
Sibiu Web Meetup
November 23, 2019
Programming
0
27
Launching into Orbit.js
Sibiu Web Meetup
November 23, 2019
Tweet
Share
More Decks by Sibiu Web Meetup
See All by Sibiu Web Meetup
Ethereum: Quick & Dirty
sibiuwebmeetup
0
15
Automation in Code Reviews
sibiuwebmeetup
0
26
useState(props.title)
sibiuwebmeetup
0
68
Introduction into ClojureScript
sibiuwebmeetup
0
13
Static website generators
sibiuwebmeetup
0
17
Static website generators in PHP
sibiuwebmeetup
0
17
Running a Public API Do's and Don'ts
sibiuwebmeetup
0
43
Concurrency in Ember
sibiuwebmeetup
0
38
Mobile JavaScript Development
sibiuwebmeetup
1
66
Other Decks in Programming
See All in Programming
ZOZOTOWNにおけるDatadogの活用と、それを支える全社管理者の取り組み / 2022-07-27
tippy
1
3.1k
パスワードに関する最近の動向
kenchan0130
1
320
SGGとは
inoue2002
0
430
「困りごと」から始める個人開発
ikumatadokoro
4
250
Cloudflare WorkersでGoのHTTPサーバーを動かすライブラリを作った話
syumai
0
140
YATA: collaborative documents and how to make them fast
horusiath
1
150
Google IO 2022 社内LT会 / What's new in Android development tools
shingo_kobayashi
0
400
読みやすいコード クラスメソッド 2022 年度新卒研修
januswel
0
2.9k
サーバーレスパターンから学ぶデータ分析基盤構築 / devio2022
kasacchiful
0
480
ファーストペンギンを志すものに伝えたい - 1人目のアジャイル推進者がたどった成功と失敗
psj59129
0
100
kintoneでランダム取得を作ってみた(imoniCamp 2022-07-27)
shokun1108
0
140
パラメタライズドテスト
ledsun
0
220
Featured
See All Featured
Unsuck your backbone
ammeep
659
55k
Ruby is Unlike a Banana
tanoku
91
9.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
498
130k
In The Pink: A Labor of Love
frogandcode
131
21k
Bootstrapping a Software Product
garrettdimon
296
110k
How GitHub (no longer) Works
holman
297
140k
Debugging Ruby Performance
tmm1
65
10k
Teambox: Starting and Learning
jrom
123
7.7k
Producing Creativity
orderedlist
PRO
334
37k
Art Directing for the Web. Five minutes with CSS Template Areas
malarkey
196
9.5k
Navigating Team Friction
lara
175
11k
Clear Off the Table
cherdarchuk
79
290k
Transcript
LAUNCHING INTO ORBIT.JS
mercury ABOUT ME Stamate Cosmin @monovertex
venus ABOUT ORBIT.JS • Overcharged ORM • Framework for interacting
with and synchronizing various data sources • Offline/online transitions
earth INSPIRATION • “Ember in Orbit - Building apps for
Outer Space Connectivity” • Miguel Camba @cibernox • Ember{{fest}} 2019 • https://youtu.be/ b7-VegI-WX8
mars ORBIT.JS PHILOSOPHY • Everything is interchangeable • Incremental complexity
• Easy wiring • Glue APIs and strategies together with minimal friction
jupiter MAIN DIRECTIVES
io (jupiter) GOALS • Optimistic/pessimistic strategies • Plug n’ play
• Client-first • Branching/merging • Change tracking => undo/redo support
europa (jupiter) CONSTRAINTS • Disparate data sources • Compatible interfaces
• Normalized data • Notifications and change tracking
saturn PRIMITIVES
mimas (saturn) RECORD • Data in normalized form • Has
an id • Has a type • It can include other attributes or relationships
enceladus (saturn) SCHEMA • The entirety of Models • Models
describe a record type • Think of Models as classes, records as instances and of schema as domain/project
dione (saturn) SOURCE • Sources are providers and managers of
data • Each source understands how data of any given schema should be stored in their corresponding backend
tethys (saturn) TRANSFORM • A set of Operations • Operations
describe a mutation on a record • Transforms are atomic • E.g. a new record, an attribute update, a relationship deletion
rhea (saturn) QUERY • An expression to retrieve specific data
• Same meaning as in traditional database systems • Query builder
iapetus (saturn) LOG TASK BUCKET • Log: history of transforms
• Task: handle actions in async or synchronous manners • Bucket: a database backup for database state; holds transient information
hyperion (saturn) COORDINATOR • Higher order component • The Coordinator
dictates strategies • Handles wiring between a set of sources • Declarative
uranus DATA SOURCES
ariel (uranus) MEMORY • @orbit/memory • Tab-specific • Lives in
memory allocated for the JS process • Immutable data structures • Cheap forking/merging
miranda (uranus) JSONAPI • @orbit/jsonapi • JSON:API is a set
of conventions for building APIs with data formatted as JSON objects • Modern standard that allows for better integration
umbriel (uranus) INDEXEDDB • @orbit/indexeddb • Client-side database • Provides
a persistent, domain-specific structured storage solution • Especially useful for PWAs, if available
titania (uranus) LOCAL STORAGE • @orbit/local-storage • Synchronous storage •
Designed for smaller amounts of data • Can be a fallback from indexeddb, but performance can be impacted
oberon (uranus) OTHER SOURCES • Adapters for other sources can
be easily implemented • Custom REST APIs • orbitdb/orbit-db - peer-to-peer database • Google Drive - a spreadsheet or a JSON file • Local file system (nodejs/native apps)
neptune Q&A
pluto THANK YOU!