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
650
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
150
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
15年目のiOSアプリを1から作り直す技術
teakun
0
590
Go 1.26でのsliceのメモリアロケーション最適化 / Go 1.26 リリースパーティ #go126party
mazrean
1
330
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
360
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
190
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
190
AIプロダクト時代のQAエンジニアに求められること
imtnd
1
630
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
190
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
1.5k
Python’s True Superpower
hynek
0
190
Agent Skills Workshop - AIへの頼み方を仕組み化する
gotalab555
14
7.7k
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
120
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
420
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
190
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.1k
The browser strikes back
jonoalderson
0
750
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
WCS-LA-2024
lcolladotor
0
470
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.4k
Code Reviewing Like a Champion
maltzj
528
40k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
180
Building Applications with DynamoDB
mza
96
6.9k
My Coaching Mixtape
mlcsv
0
63
Building Adaptive Systems
keathley
44
2.9k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
63
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!