SlideShare a Scribd company logo
JavaScript
                  framework and
                     Backbone

                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
JavaScript is Important



                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Start from jQuery



                              Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
jQuery is Great
            • It does give us easy access to DOM
                   manipulation, ajax, animation, events etc.

            • It doesnʼt provide all the tools needed to build
                   serious JavaScript web application

            • But how do we fill in the gaps for everything
                   else?



                                 Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Building a web
                         application with
                             jQuery

                              Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
JQuery can give us this:
                                   Browser

                         Dom Manipulation


                                          Ajax

                                      Server


                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
But ...what we need?
                    • Easy to modify / maintain...
                    • Separate application concerns & keep
                         the code decoupled

                    • Could be a single-page application
                         (SPA) with multiple views of the data,
                         but require no hard page refresh?

                    • Good performances / experiences
                                    Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Itʼs all easy to create
                    JavaScript applications
                     that end up as tangle
                    piles of jQuery selectors
                          and callbacks.


                            Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
And weʼre missing something
              •          Client-side Template

              •          Modular / Structure organization

              •          Browser State Management (location.hash)

              •          Manageable routing to your application

              •          Dependency management

              •          Remote / Local Persistent layer

              •          Architecture patterns (like MVC, Delegation)

              •          Support Testing
                                       Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
How to fill in the gaps?


                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Extended the
                  JavaScript language
                         itself


                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Dynamic run-time & OO
                    • Prototype
                    • Narcissus
                    • Super-Class
                    • JS2Lang
                    • CoffeeScript
                    • Hacking construct method and
                                Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Provide rich library
                    and toolkits


                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
• jQuery and jQueryUI
                    • YUI
                    • ExtJS
                    • Underscore.js
                    • MooToos
                    • Dojokits
                    • To many third part library and plugins ...

                                  Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Spend more time on
                       project, less on
                        architecture!


                           Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Application Framework



                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Think about is
                         Rails in front-end


                               Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
YES! A MVC Pattern



                          Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
The MVC Pattern


             • Separates objects into three main concerns
             • Traditionally heavily used on the server side
             • Excellent for code-organization in general
             • Implementations can vary quite significantly
                             Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Models, Views &
                              Controllers
                • Models represent status and behaviors,
                         Interact with data...

                • Views can be considered the UI. link
                         events to methods and generate dynamic
                         HTML.

                • Controller sits between Models and Views.
                                       Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
MVC Frameworks
                    • JavaScriptMVC
                    • Backbone.js & Underscore.js
                    • Spine.js
                    • SproutCore
                    • Sammy.js
                    • etc...
                                 Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Backbone.js
              • Provides the ʻbackboneʼ you need to
                     organize your code using the MVC pattern

              • Excellent for a lightweight solution where
                     you select the additional components you
                     feel work best for your project.

              • Works best for SPAs (single-page apps)

                                  Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Who use it?



                           Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Basecamp Mobile




                             Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Flow




                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
CloudApp




                          Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Jeremy Ashkenas
                          • DocumentCloud
                          • Coffee-Script
                          • Underscore
                          • Docco
                          • Github
                          • Twitter
                                 Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Spine.js
              • A lightweight MVC framework with a focus
                     on providing an inheritance model through
                     classes and extension.

              • Based on Backboneʼs API so developers
                     may find getting started a little easier than
                     expected

              • Spine doesnʼt require underscore.js
                                   Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Alex MaxCaw

              • London, United Kingdom
              • Author of <<JavaScript Web Applications>>
              • http://alexmaccaw.co.uk
              • https://github.com/maccman
              • https://twitter.com/maccman
                             Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Backbone? Spine?



                              Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Dive into Backbone
                     A demo about Backbone scaffolding application
                                 with Rails back-end




                                    Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Backboneʼs MVC
              • Models: represent data that can be created/
                         validated, destroyed & listened to for
                         changes. Collections are sets of models.

              • Views: display the modelʼs data / provide
                         the user interface layer

              • Controller: methods for routing client-side
                         URL fragments

                                       Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Backboneʼs MVC




                             Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Backboneʼs Model
                                                            Models are the heart of any
                                                            JavaScript application, containing the
                                                            interactive data as well as a large part
                                                            of the logic surrounding it:
                                                            conversions, validations, computed
                                                            properties, and access control. You
                                                            extend Backbone.Model with your
                                                            domain-specific methods, and Model
                                                            provides a basic set of functionality for
                                                            managing changes.




                              Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Backboneʼs Collection


                                            Collections are ordered sets of
                                            models.

                                            Collections may also listen for
                                            changes to specific attributes in
                                            their models




                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Backboneʼs Controller



                                                                              Controller provides
                                                                              methods for routing client-
                                                                              side URL fragments, and
                                                                              connecting them to actions
                                                                              and events.




                         Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Backboneʼs View

                                                 Backbone views are used
                                                 to reflect what your
                                                 applications’ data models
                                                 look like. They are also
                                                 used to listen to events
                                                 and react accordingly.




                             Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
More about Backbone
                         • Backboneʼs Event
                         • Backboneʼs History
                         • Backboneʼs Sync
                         • More ...

                                  Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011
Resources
          •       Backbone.js Document - http://documentcloud.github.com/backbone/

          •       Backbone Tutorials

          •       Building a single page app with Backbone.js, underscore.js and
                  jQuery

          •       What are some good resources for Backbone.js

          •       Backbone.js with Node.js and Socket.is to build real-time apps

          •       Creating LocalTodos.com -- A Short Story.

          •       Backbone.js and Sinatra on Heroku

          •       Cinco - 37Single framework based on Backbone.js, open source
                  soon.


                                        Copyright 2010, Intridea Inc. All Rights Reserved.

Tuesday, June 28, 2011

More Related Content

What's hot (19)

PDF
The Art of AngularJS in 2015 - Angular Summit 2015
Matt Raible
 
PDF
From Hacker to Programmer (w/ Webpack, Babel and React)
Joseph Chiang
 
PDF
Why Vue.js?
Jonathan Goode
 
PPTX
Backbonejs for beginners
Divakar Gu
 
PDF
Requirejs
Jason Lotito
 
PDF
Vue.js is boring - and that's a good thing
Joonas Lehtonen
 
PDF
Angularjs architecture
Michael He
 
PPT
Getting started with angular js
Maurice De Beijer [MVP]
 
PDF
Patterns Are Good For Managers
AgileThought
 
PDF
Backbone js
Rohan Chandane
 
PDF
Developing large scale JavaScript applications
Milan Korsos
 
PDF
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
Atlassian
 
PDF
Marionette: the Backbone framework
frontendne
 
PDF
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest
 
PPT
Managing JavaScript Dependencies With RequireJS
Den Odell
 
PDF
AngularJS best-practices
Henry Tao
 
PDF
Get things done with Yii - quickly build webapplications
Giuliano Iacobelli
 
PPTX
AngularJS
Pasi Manninen
 
PDF
Vue js and Vue Material
Eueung Mulyana
 
The Art of AngularJS in 2015 - Angular Summit 2015
Matt Raible
 
From Hacker to Programmer (w/ Webpack, Babel and React)
Joseph Chiang
 
Why Vue.js?
Jonathan Goode
 
Backbonejs for beginners
Divakar Gu
 
Requirejs
Jason Lotito
 
Vue.js is boring - and that's a good thing
Joonas Lehtonen
 
Angularjs architecture
Michael He
 
Getting started with angular js
Maurice De Beijer [MVP]
 
Patterns Are Good For Managers
AgileThought
 
Backbone js
Rohan Chandane
 
Developing large scale JavaScript applications
Milan Korsos
 
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
Atlassian
 
Marionette: the Backbone framework
frontendne
 
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
CodeFest
 
Managing JavaScript Dependencies With RequireJS
Den Odell
 
AngularJS best-practices
Henry Tao
 
Get things done with Yii - quickly build webapplications
Giuliano Iacobelli
 
AngularJS
Pasi Manninen
 
Vue js and Vue Material
Eueung Mulyana
 

Similar to Javascript framework and backbone (20)

PDF
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
PDF
Flex For Java Developers - SDForum Java SIG
Chris Richardson
 
PDF
Sencha Web Applications Come of Age
bastila
 
PPT
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
PDF
Kann JavaScript elegant sein?
jbandi
 
PDF
Architecting non-trivial browser applications (Jazoon 2012)
Marc Bächinger
 
PDF
Hybridmobileapps 130130213844-phpapp02
weeyee
 
PDF
Introduction To J Boss Seam
ashishkulkarni
 
PDF
Feature Development with jQuery
Michael Edwards
 
PPT
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Gabriel Villa
 
PDF
Ajax World West
rajivmordani
 
KEY
Single Page Applications - Desert Code Camp 2012
Adam Mokan
 
PDF
JavascriptMVC: Another choice of web framework
Alive Kuo
 
PDF
Infusion for the birds
colinbdclark
 
PDF
Angular JS Basics
Mounish Sai
 
PPT
Developing Java Web Applications
hchen1
 
PPT
Building Rich User Experiences Without JavaScript Spaghetti
Jared Faris
 
PDF
AngularJS - A Powerful Framework For Web Applications
Idexcel Technologies
 
PPTX
AngularJS UTOSC
roboncode
 
KEY
20120306 dublin js
Richard Rodger
 
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
Flex For Java Developers - SDForum Java SIG
Chris Richardson
 
Sencha Web Applications Come of Age
bastila
 
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
Kann JavaScript elegant sein?
jbandi
 
Architecting non-trivial browser applications (Jazoon 2012)
Marc Bächinger
 
Hybridmobileapps 130130213844-phpapp02
weeyee
 
Introduction To J Boss Seam
ashishkulkarni
 
Feature Development with jQuery
Michael Edwards
 
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
Gabriel Villa
 
Ajax World West
rajivmordani
 
Single Page Applications - Desert Code Camp 2012
Adam Mokan
 
JavascriptMVC: Another choice of web framework
Alive Kuo
 
Infusion for the birds
colinbdclark
 
Angular JS Basics
Mounish Sai
 
Developing Java Web Applications
hchen1
 
Building Rich User Experiences Without JavaScript Spaghetti
Jared Faris
 
AngularJS - A Powerful Framework For Web Applications
Idexcel Technologies
 
AngularJS UTOSC
roboncode
 
20120306 dublin js
Richard Rodger
 
Ad

More from Daniel Lv (11)

PDF
Intridea & open source
Daniel Lv
 
PDF
Getting start with titanium
Daniel Lv
 
KEY
Better framework, better life
Daniel Lv
 
KEY
上海的Rails社区
Daniel Lv
 
PDF
Kungfurails2009
Daniel Lv
 
PPT
Sinatra
Daniel Lv
 
PPT
Contributing To Rails By Plugin Gem
Daniel Lv
 
PDF
J Ruby Kungfu Rails
Daniel Lv
 
PDF
Active Direct
Daniel Lv
 
PPT
岛根县政府的挑战
Daniel Lv
 
PDF
Why Ruby
Daniel Lv
 
Intridea & open source
Daniel Lv
 
Getting start with titanium
Daniel Lv
 
Better framework, better life
Daniel Lv
 
上海的Rails社区
Daniel Lv
 
Kungfurails2009
Daniel Lv
 
Sinatra
Daniel Lv
 
Contributing To Rails By Plugin Gem
Daniel Lv
 
J Ruby Kungfu Rails
Daniel Lv
 
Active Direct
Daniel Lv
 
岛根县政府的挑战
Daniel Lv
 
Why Ruby
Daniel Lv
 
Ad

Recently uploaded (20)

PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
PDF
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PPTX
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
PDF
Open Source Milvus Vector Database v 2.6
Zilliz
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PDF
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
PDF
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
PDF
The Growing Value and Application of FME & GenAI
Safe Software
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PPTX
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
“Scaling i.MX Applications Processors’ Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
 
Hyderabad MuleSoft In-Person Meetup (June 21, 2025) Slides
Ravi Tamada
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
“MPU+: A Transformative Solution for Next-Gen AI at the Edge,” a Presentation...
Edge AI and Vision Alliance
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
Open Source Milvus Vector Database v 2.6
Zilliz
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
EIS-Webinar-Engineering-Retail-Infrastructure-06-16-2025.pdf
Earley Information Science
 
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Safe Software
 
UiPath Agentic AI ile Akıllı Otomasyonun Yeni Çağı
UiPathCommunity
 
The Growing Value and Application of FME & GenAI
Safe Software
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Smarter Governance with AI: What Every Board Needs to Know
OnBoard
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 

Javascript framework and backbone

  • 1. JavaScript framework and Backbone Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 2. JavaScript is Important Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 3. Start from jQuery Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 4. jQuery is Great • It does give us easy access to DOM manipulation, ajax, animation, events etc. • It doesnʼt provide all the tools needed to build serious JavaScript web application • But how do we fill in the gaps for everything else? Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 5. Building a web application with jQuery Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 6. JQuery can give us this: Browser Dom Manipulation Ajax Server Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 7. But ...what we need? • Easy to modify / maintain... • Separate application concerns & keep the code decoupled • Could be a single-page application (SPA) with multiple views of the data, but require no hard page refresh? • Good performances / experiences Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 8. Itʼs all easy to create JavaScript applications that end up as tangle piles of jQuery selectors and callbacks. Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 9. And weʼre missing something • Client-side Template • Modular / Structure organization • Browser State Management (location.hash) • Manageable routing to your application • Dependency management • Remote / Local Persistent layer • Architecture patterns (like MVC, Delegation) • Support Testing Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 10. How to fill in the gaps? Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 11. Extended the JavaScript language itself Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 12. Dynamic run-time & OO • Prototype • Narcissus • Super-Class • JS2Lang • CoffeeScript • Hacking construct method and Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 13. Provide rich library and toolkits Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 14. • jQuery and jQueryUI • YUI • ExtJS • Underscore.js • MooToos • Dojokits • To many third part library and plugins ... Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 15. Spend more time on project, less on architecture! Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 16. Application Framework Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 17. Think about is Rails in front-end Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 18. YES! A MVC Pattern Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 19. The MVC Pattern • Separates objects into three main concerns • Traditionally heavily used on the server side • Excellent for code-organization in general • Implementations can vary quite significantly Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 20. Models, Views & Controllers • Models represent status and behaviors, Interact with data... • Views can be considered the UI. link events to methods and generate dynamic HTML. • Controller sits between Models and Views. Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 21. MVC Frameworks • JavaScriptMVC • Backbone.js & Underscore.js • Spine.js • SproutCore • Sammy.js • etc... Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 22. Backbone.js • Provides the ʻbackboneʼ you need to organize your code using the MVC pattern • Excellent for a lightweight solution where you select the additional components you feel work best for your project. • Works best for SPAs (single-page apps) Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 23. Who use it? Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 24. Basecamp Mobile Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 25. Flow Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 26. CloudApp Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 27. Jeremy Ashkenas • DocumentCloud • Coffee-Script • Underscore • Docco • Github • Twitter Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 28. Spine.js • A lightweight MVC framework with a focus on providing an inheritance model through classes and extension. • Based on Backboneʼs API so developers may find getting started a little easier than expected • Spine doesnʼt require underscore.js Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 29. Alex MaxCaw • London, United Kingdom • Author of <<JavaScript Web Applications>> • http://alexmaccaw.co.uk • https://github.com/maccman • https://twitter.com/maccman Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 30. Backbone? Spine? Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 31. Dive into Backbone A demo about Backbone scaffolding application with Rails back-end Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 32. Backboneʼs MVC • Models: represent data that can be created/ validated, destroyed & listened to for changes. Collections are sets of models. • Views: display the modelʼs data / provide the user interface layer • Controller: methods for routing client-side URL fragments Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 33. Backboneʼs MVC Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 34. Backboneʼs Model Models are the heart of any JavaScript application, containing the interactive data as well as a large part of the logic surrounding it: conversions, validations, computed properties, and access control. You extend Backbone.Model with your domain-specific methods, and Model provides a basic set of functionality for managing changes. Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 35. Backboneʼs Collection Collections are ordered sets of models. Collections may also listen for changes to specific attributes in their models Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 36. Backboneʼs Controller Controller provides methods for routing client- side URL fragments, and connecting them to actions and events. Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 37. Backboneʼs View Backbone views are used to reflect what your applications’ data models look like. They are also used to listen to events and react accordingly. Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 38. More about Backbone • Backboneʼs Event • Backboneʼs History • Backboneʼs Sync • More ... Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011
  • 39. Resources • Backbone.js Document - http://documentcloud.github.com/backbone/ • Backbone Tutorials • Building a single page app with Backbone.js, underscore.js and jQuery • What are some good resources for Backbone.js • Backbone.js with Node.js and Socket.is to build real-time apps • Creating LocalTodos.com -- A Short Story. • Backbone.js and Sinatra on Heroku • Cinco - 37Single framework based on Backbone.js, open source soon. Copyright 2010, Intridea Inc. All Rights Reserved. Tuesday, June 28, 2011