Enviar búsqueda
Cargar
Backbone js
•
Descargar como ODP, PDF
•
2 recomendaciones
•
835 vistas
Yuri Omelchuk
Seguir
Tecnología
Meditación
Denunciar
Compartir
Denunciar
Compartir
1 de 15
Descargar ahora
Recomendados
Dive into AngularJS Routing
Dive into AngularJS Routing
Egor Miasnikov
Desymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus Bundles
Albert Jessurum
Angular JS Routing
Angular JS Routing
kennystoltz
炎炎夏日學 Android 課程 - Part3: Android app 實作
炎炎夏日學 Android 課程 - Part3: Android app 實作
Johnny Sung
Survey Graphs: SAC Landscape Assessment
Survey Graphs: SAC Landscape Assessment
Milano The New School
Know004
Know004
the pooh
Eröffnungspodium Opco12 - Fragebogen
Eröffnungspodium Opco12 - Fragebogen
e-teaching.org
Know005
Know005
the pooh
Recomendados
Dive into AngularJS Routing
Dive into AngularJS Routing
Egor Miasnikov
Desymfony 2011 - Habemus Bundles
Desymfony 2011 - Habemus Bundles
Albert Jessurum
Angular JS Routing
Angular JS Routing
kennystoltz
炎炎夏日學 Android 課程 - Part3: Android app 實作
炎炎夏日學 Android 課程 - Part3: Android app 實作
Johnny Sung
Survey Graphs: SAC Landscape Assessment
Survey Graphs: SAC Landscape Assessment
Milano The New School
Know004
Know004
the pooh
Eröffnungspodium Opco12 - Fragebogen
Eröffnungspodium Opco12 - Fragebogen
e-teaching.org
Know005
Know005
the pooh
Ilmiöpohjainen oppiminen
Ilmiöpohjainen oppiminen
Aki Luostarinen
Java Course Day 21
Java Course Day 21
Oleg Yushchenko
Daily Deals from Buy.com
Daily Deals from Buy.com
drocallaghan
Sails.js - Overview
Sails.js - Overview
Sebastian Pożoga
Mason_Marcus_Igniteslideshow
Mason_Marcus_Igniteslideshow
Marcus Mason
hachioji.pm #40 : asynchronous in JS
hachioji.pm #40 : asynchronous in JS
Kotaro Kawashima
Small kevinvisualresume
Small kevinvisualresume
kevinsmall
What's an infidel
What's an infidel
Nona Savta
Sr 3 2057791987 price lease opportunity ora-06503 plsql function returned wit...
Sr 3 2057791987 price lease opportunity ora-06503 plsql function returned wit...
Quang Nguyen
Silicon Valley Code Camp 2010: Social Platforms : What goes on under the hood
Silicon Valley Code Camp 2010: Social Platforms : What goes on under the hood
Manish Pandit
Fa 27 assignment 3 part 1
Fa 27 assignment 3 part 1
zgalasso
FFunction: We Love Python !
FFunction: We Love Python !
FFunction inc
Differentiate or Die
Differentiate or Die
SalesChannel International
Merb jQuery
Merb jQuery
Yehuda Katz
Merb Pluming - The Router
Merb Pluming - The Router
carllerche
Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008
Rob
Test upload
Test upload
Darrell Lawson Jr.
More Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
jeresig
Building Web Interface On Rails
Building Web Interface On Rails
Wen-Tien Chang
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentation
railsconf
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Sergey Ilinsky
Gae
Gae
guest0e51364
Más contenido relacionado
La actualidad más candente
Ilmiöpohjainen oppiminen
Ilmiöpohjainen oppiminen
Aki Luostarinen
Java Course Day 21
Java Course Day 21
Oleg Yushchenko
Daily Deals from Buy.com
Daily Deals from Buy.com
drocallaghan
Sails.js - Overview
Sails.js - Overview
Sebastian Pożoga
Mason_Marcus_Igniteslideshow
Mason_Marcus_Igniteslideshow
Marcus Mason
hachioji.pm #40 : asynchronous in JS
hachioji.pm #40 : asynchronous in JS
Kotaro Kawashima
Small kevinvisualresume
Small kevinvisualresume
kevinsmall
La actualidad más candente
(7)
Ilmiöpohjainen oppiminen
Ilmiöpohjainen oppiminen
Java Course Day 21
Java Course Day 21
Daily Deals from Buy.com
Daily Deals from Buy.com
Sails.js - Overview
Sails.js - Overview
Mason_Marcus_Igniteslideshow
Mason_Marcus_Igniteslideshow
hachioji.pm #40 : asynchronous in JS
hachioji.pm #40 : asynchronous in JS
Small kevinvisualresume
Small kevinvisualresume
Destacado
What's an infidel
What's an infidel
Nona Savta
Sr 3 2057791987 price lease opportunity ora-06503 plsql function returned wit...
Sr 3 2057791987 price lease opportunity ora-06503 plsql function returned wit...
Quang Nguyen
Silicon Valley Code Camp 2010: Social Platforms : What goes on under the hood
Silicon Valley Code Camp 2010: Social Platforms : What goes on under the hood
Manish Pandit
Fa 27 assignment 3 part 1
Fa 27 assignment 3 part 1
zgalasso
FFunction: We Love Python !
FFunction: We Love Python !
FFunction inc
Differentiate or Die
Differentiate or Die
SalesChannel International
Destacado
(6)
What's an infidel
What's an infidel
Sr 3 2057791987 price lease opportunity ora-06503 plsql function returned wit...
Sr 3 2057791987 price lease opportunity ora-06503 plsql function returned wit...
Silicon Valley Code Camp 2010: Social Platforms : What goes on under the hood
Silicon Valley Code Camp 2010: Social Platforms : What goes on under the hood
Fa 27 assignment 3 part 1
Fa 27 assignment 3 part 1
FFunction: We Love Python !
FFunction: We Love Python !
Differentiate or Die
Differentiate or Die
Similar a Backbone js
Merb jQuery
Merb jQuery
Yehuda Katz
Merb Pluming - The Router
Merb Pluming - The Router
carllerche
Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008
Rob
Test upload
Test upload
Darrell Lawson Jr.
More Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
jeresig
Building Web Interface On Rails
Building Web Interface On Rails
Wen-Tien Chang
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentation
railsconf
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Sergey Ilinsky
Gae
Gae
guest0e51364
JavaScript on Rails 튜토리얼
JavaScript on Rails 튜토리얼
Sukjoon Kim
Nodejs.meetup
Nodejs.meetup
Vivian S. Zhang
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
nicdev
Merb Router
Merb Router
Bryan Ray
WordPress and Ajax
WordPress and Ajax
Ronald Huereca
Mojolicious on Steroids
Mojolicious on Steroids
Tudor Constantin
Intro Open Social and Dashboards
Intro Open Social and Dashboards
Atlassian
WordPress as a Content Management System
WordPress as a Content Management System
Valent Mustamin
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013
Amazon Web Services
State Machines to State of the Art
State Machines to State of the Art
Rowan Merewood
Struts,Jsp,Servlet
Struts,Jsp,Servlet
dasguptahirak
Similar a Backbone js
(20)
Merb jQuery
Merb jQuery
Merb Pluming - The Router
Merb Pluming - The Router
Rugalytics | Ruby Manor Nov 2008
Rugalytics | Ruby Manor Nov 2008
Test upload
Test upload
More Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
Building Web Interface On Rails
Building Web Interface On Rails
Rails 3 And The Real Secret To High Productivity Presentation
Rails 3 And The Real Secret To High Productivity Presentation
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Building Complex GUI Apps The Right Way. With Ample SDK - SWDC2010
Gae
Gae
JavaScript on Rails 튜토리얼
JavaScript on Rails 튜토리얼
Nodejs.meetup
Nodejs.meetup
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
Merb Router
Merb Router
WordPress and Ajax
WordPress and Ajax
Mojolicious on Steroids
Mojolicious on Steroids
Intro Open Social and Dashboards
Intro Open Social and Dashboards
WordPress as a Content Management System
WordPress as a Content Management System
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013
Zero to Sixty: AWS Elastic Beanstalk (DMG204) | AWS re:Invent 2013
State Machines to State of the Art
State Machines to State of the Art
Struts,Jsp,Servlet
Struts,Jsp,Servlet
Último
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
Bernd Ruecker
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
Pixlogix Infotech
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
Manik S Magar
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
LoriGlavin3
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
Knoldus Inc.
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
itnewsafrica
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
LoriGlavin3
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
ThousandEyes
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
LoriGlavin3
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
Farhan Tariq
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
Mydbops
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Kari Kakkonen
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
itnewsafrica
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Pixlogix Infotech
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
fnnc6jmgwh
A Framework for Development in the AI Age
A Framework for Development in the AI Age
Cprime
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
LoriGlavin3
Último
(20)
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
A Framework for Development in the AI Age
A Framework for Development in the AI Age
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Backbone js
1.
backbone.js + rails
getting started guide by Yury Omelchuk (c) 2012
2.
____ _
_ _ | _ | | | | (_) | |_) | __ _ ___| | __| |__ ___ _ __ ___ _ ___ | _ < / _` |/ __| |/ /| '_ / _ '_ / _ | / __| | |_) | (_| | (__| < | |_) | (_) | | | | __/_| _ |____/ _,_|__|_|_.__/ __/|_| |_|__(_) |___/ _/ | |__/ (_'___________________________________________________'_) (_.———————————————————————————————————————————————————._)
3.
Jeremy Ashkenas, DocumentCloud
Inc. http://documentcloud.github.com/backbone 41kb 13.8kb, packed 4.6kb gzipped
4.
5.
Knockout.js
6.
Batman.js
7.
Spine.js
8.
9.
Model
10.
Collection
11.
View
12.
History
13.
Events
14.
Sync
15.
Utility
16.
17.
assets/
18.
javascripts/
19.
collections/
20.
movies.js
21.
models/
22.
movie.js
23.
routers/
24.
movies_router.js
25.
views/
26.
todos/
27.
todos_index.js
28.
templates/
29.
movies/
30.
index.jst.ejs
31.
show.jst.ejs
32.
movie.jst,ejs
33.
34.
//= require jquery_ujs
35.
//= require twitter/bootstrap
36.
//= require underscore
37.
//= require backbone
38.
//= require app
39.
//= require_tree ./models
40.
//= require_tree ./collections
41.
//= require_tree ./views
42.
//= require_tree ./routers
43.
//= require_tree ../templates
44.
//= require_tree .
45.
46.
<%= yield :javascript
%>
47.
<div id=”app”></div>
48.
49.
<%= javascript_tag do
%>
50.
App.init();
51.
<% end %>
52.
<% end -%>
53.
54.
Models: {},
55.
Collections: {},
56.
Views: {},
57.
Routers: {},
58.
init: function() {
59.
new App.Routers.Movies();
60.
Backbone.history.start();
61.
}
62.
};
63.
64.
routes: {
65.
"": "index",
66.
},
67.
index: function() {
68.
var movies =
new Movies;
69.
movies.fetch({
70.
success: function() {
71.
new App.Views.Index( {collection:
movies} )
72.
}
73.
})
74.
}
75.
}
76.
77.
model: Movie,
78.
url: '/movies'
79.
});
80.
81.
_.bindAll(this, 'render');
82.
this.collection.bind('change', this.render);
83.
this.render();
84.
},
85.
render: function() {
86.
$(this.el).html(JST['movies/index']( {collection: this.collection
}));
87.
$('#app').html(this.el);
88.
}
89.
});
90.
91.
<% collection.each(function(item, key,
list) { %>
92.
<div class="row">
93.
<div class="span16 movie">
94.
<h3>
95.
<a href="#movie/<%= item.id
%>"><%= item.escape('title') %></a>
96.
</h3>
97.
<%= item.get('description') %>
98.
</div>
99.
</div>
100.
<% }); %>
101.
<% } else
{ %>
102.
<p>no movies</p>
103.
<% } %>
104.
105.
context "no data"
do
106.
specify "homepage" do
107.
visit '/'
108.
page.should have_content 'no
movies'
109.
end
110.
end
111.
context "with existing
data" do
112.
before { @movie
= Factory :movie, title: 'Pulpfiction' }
113.
specify "homepage with
data" do
114.
visit '/'
115.
page.should have_content 'Pulpfiction'
116.
end
117.
end
118.
end
119.
Descargar ahora