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
ERDDUG - Backbone.js
Search
kmckelvin
March 18, 2012
Programming
2
150
ERDDUG - Backbone.js
Demo of Backbone.js at ERDDUG on 17 March 2012
kmckelvin
March 18, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
AtCoder Conference 2025
shindannin
0
1.1k
SourceGeneratorのススメ
htkym
0
200
CSC307 Lecture 06
javiergs
PRO
0
680
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
200
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
700
AgentCoreとHuman in the Loop
har1101
5
240
Package Management Learnings from Homebrew
mikemcquaid
0
220
Oxlintはいいぞ
yug1224
5
1.3k
並行開発のためのコードレビュー
miyukiw
0
130
Architectural Extensions
denyspoltorak
0
290
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
94
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
A designer walks into a library…
pauljervisheath
210
24k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
So, you think you're a good person
axbom
PRO
2
1.9k
Crafting Experiences
bethany
1
49
Designing for humans not robots
tammielis
254
26k
What's in a price? How to price your products and services
michaelherold
247
13k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.6k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
110
Transcript
ERDDUG - 17 March 2012 Kevin McKelvin Sunday 18 March
12
Speaker.bio Kevin McKelvin @kmckelvin www.mcdev.za.net Sunday 18 March 12
JavaScript (for n00bz!) “JavaScript is the one language people feel
they can use, without having to learn it first.” Sunday 18 March 12
setName = function(name) { this.name = name } obj =
{ setObjName: setName } obj.setObjName(“John”); setName.call(obj, “John”); setName.apply(obj, [“John”]); this? Sunday 18 March 12
Constructors Album = function(name) { this.name = name; this.showName =
function() { console.log(this.name) }; } abbey_road = new Album(‘Abbey Road’); abbey_road.showName(); # Logs “Abbey Road” Sunday 18 March 12
Prototypes Album.prototype.showName = function() { console.log(this.name); } Album = function(name)
{ this.name = name; } abbey_road.showName(); # Logs “Abbey Road” abbey_road = new Album(‘Abbey Road’); Sunday 18 March 12
Prototypical Inheritance AudioAlbum = function(name) { this.name = name; }
AudioAlbum.prototype = Album audio = new AudioAlbum(“Deep Purple”); audio.showName(); # Logs “Deep Purple” Sunday 18 March 12
Sunday 18 March 12
What is Backbone.js? Sunday 18 March 12
JAVASCRIPT ”MVC” Sunday 18 March 12
Models Album = Backbone.Model.extend({ ... }) Sunday 18 March 12
collections AlbumCollection = Backbone.Collection.extend({ model: Album, url: ‘/albums’ }); Sunday
18 March 12
views AlbumView = Backbone.View.extend({ tagName: ‘li’, initialize: function() { this.template
= ... }, render: function() { ... } }) Sunday 18 March 12
templates <script id="user" type="text/html"> <li> <p class="name">Hello I'm {{ name
}}</p> <p> <a href="http://twitter.com/ {{ twitter }}">@{{ twitter }} </a> </p> </li> </script> Sunday 18 March 12
ROUTER var Workspace = Backbone.Router.extend({ routes: { "help": "help", //
#help "search/:query": "search", // #search/kiwis "search/:query/p:page": "search" // #search/kiwis/p7 }, help: function() { ... }, search: function(query, page) { ... } }); Sunday 18 March 12
DEMO :) Sunday 18 March 12
resources backbonejs.org underscorejs.org peepcode.com Sunday 18 March 12