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
From Backbone to Thorax
Search
mulderp
February 20, 2014
Programming
1
640
From Backbone to Thorax
An overview on the MV* pattern, Handlebars and resulting in Thorax.
mulderp
February 20, 2014
Tweet
Share
More Decks by mulderp
See All by mulderp
Node.js for Embedded Systems
mulderp
1
2.8k
Nodebotsday
mulderp
1
140
I2C basics with Arduino
mulderp
0
230
Sharing hardware with JavaScript
mulderp
1
220
Arduino October meetup
mulderp
0
130
Physical JavaScript with Johnny-5, Cylon and Tessel
mulderp
1
1.1k
Blogging and writing about JavaScript
mulderp
2
940
Minimum Viable Interactions
mulderp
3
630
Arduino July Meetup
mulderp
0
110
Other Decks in Programming
See All in Programming
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
190
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
940
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
40k
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
660
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.5k
Data-Centric Kaggle
isax1015
2
560
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
160
TestingOsaka6_Ozono
o3
0
280
ゆくKotlin くるRust
exoego
1
200
Implementation Patterns
denyspoltorak
0
170
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
450
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
210
Featured
See All Featured
Statistics for Hackers
jakevdp
799
230k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
700
Building Adaptive Systems
keathley
44
2.9k
Why Our Code Smells
bkeepers
PRO
340
58k
Everyday Curiosity
cassininazir
0
120
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
230
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
75
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Optimizing for Happiness
mojombo
379
70k
Navigating Weather and Climate Data
rabernat
0
72
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Transcript
From Backbone to Thorax MV* with 100% JavaScript Patrick Mulder
http://www.flickr.com/photos/the_foz/6219860966/
None
MV*
MVC pattern� http://amix.dk/blog/post/19615 user
View Collections/Models Subscribe UI Events Server RESTful DOM Templates Publish
Backbone MV*�
Demo 1� MV* basics
None
Why Thorax ?
Handlebars�
Backbone + handlebars
Demo 2� Handlebars MVC editor
Thorax.HelperView� {{#collection movies}} {{#link "details/{{_key}}" expand-tokens=true}} <li>{{title}}</li> {{/link}} {{/collection}}
itemFilter: function (model) { if (active) { return model.get('genre') ===
active; } else { return true; } } Supports filtering�
Thorax.Layout� layout.setView( ... ) <div class=“container"> {{layout-element}} </div>
subviews� <div class="header"> {{view header}} </div>
events� var listView = new Thorax.View({ el: "#movies", events: {
collection: { 'all': function(ev) { console.log(ev) }, filter: function(ev) { } } } }
model binding� $(event.target).model();
Demo 3� Thorax fiddles
Fiddles� • Filtering collections: – http://jsfiddle.net/mulderp/Q4aMh/3/ • LayoutView: • http://jsfiddle.net/mulderp/e8RzY/
The Thorax Generator
None
|-js! |! |---libs! |-----backbone! |-----impress! |-----masonry! |-----jquery! |-----jquery-fileupload! |-----jquery-ui! |-----require!
|-----underscore! |! |---modules! |! |! |-templates! |---dashboard! |---directory! |---shared! development production HTTP Loading JS Modules�
RequireJS�
Bower Yeoman
None
And more, e.g. for testing�
„Chef‘s choice“�
Development API server�
BUILD PROCESS
Demo 3� workflow automation�
Root View Thanks !
Let‘s discuss ! http://github.com/mulderp/thorax_sandbox! http://thinkingonthinking.com! http://pipefishbook.com! ! ! @mulpat!