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
660
1
Share
From Backbone to Thorax
An overview on the MV* pattern, Handlebars and resulting in Thorax.
mulderp
February 20, 2014
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
140
Physical JavaScript with Johnny-5, Cylon and Tessel
mulderp
1
1.1k
Blogging and writing about JavaScript
mulderp
2
950
Minimum Viable Interactions
mulderp
3
630
Arduino July Meetup
mulderp
0
120
Other Decks in Programming
See All in Programming
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
120
ファインチューニングせずメインコンペを解く方法
pokutuna
0
260
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
120
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
340
安いハードウェアでVulkan
fadis
1
890
AIエージェントで業務改善してみた
taku271
0
410
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
130
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
5
2.5k
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
160
Vibe하게 만드는 Flutter GenUI App With ADK , 박제창, BWAI Incheon 2026
itsmedreamwalker
0
540
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
230
存在論的プログラミング: 時間と存在を記述する
koriym
5
770
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
174
15k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
BBQ
matthewcrist
89
10k
How GitHub (no longer) Works
holman
316
150k
How to make the Groovebox
asonas
2
2.1k
Faster Mobile Websites
deanohume
310
31k
Being A Developer After 40
akosma
91
590k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.5k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
100
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
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!