SlideShare a Scribd company logo
Backbone.js
Introduction / Oren Farhi
Oren Farhi
Front End Architect, JS Engineer @Tikal
JS Group Leader - Meet, Share, Contribute & Coding
Speaker (Israel & World Wide)
Developing with:
Pure Javascript, Backbone.js, Underscore.js, jQuery,
Common Sense, CSS3


github.com/tikalk
@tikalk
We help companies build, deliver,
         deploy, manage and optimize their products.




ALM      JAVA              JS            .NET          RoR

“Today we are SURE that we made the right
        decision, choosing Tikal”
    Guy Ben-Porat - Development Manager “ExLibris”
Tikal by Numbers
  1600+         150+         460+
Community    Blog Posts     Meetup
 Members     Last Year     Members

                90+          100+
  12+
               Tikal’s      Projects
Years old
            Experts Team   Last Year

 “Actions speak louder than words”
            Tikal's motto
The Past:
JS is the wild west
No code conventions
jQuery bloated code
Data & DOM mixed
jQuery ajax & callbacks are a
bit messy
No Reuse



Most End Result:
words and sentences with
long selectors and "hanged"
functions everywhere
The Present: All we have is now
JS is the wild west
No code conventions
jQuery bloated code
Data & DOM mixed                 Simplicity
jQuery ajax & callbacks are a
bit messy
No Reuse
                                Organization
                                   Focus
Most End Result:
words and sentences with
long selectors and "hanged"
functions everywhere
Backbone Background
Jeremy Ashkenas -
Underscore, Coffeescript
DocumentCloud




Dependencies:
jquery / zepto
underscore.js
json2.js ( IE, other without JSON )
Backbone is:
MVC library (MIT)         Model
Project "DocumentCloud"   Events
Structure                 View
RESTful JSON connector    Collection
Hash Routing Engine       Router
Event Driven              Utilities - based underscore.js
Extended                  Templating Engine - based underscore.js
What is it good for?
Web Applications             Modular, Extensible
Structure for Code           Reusable Modules
Divide & Conquer             Loose Coupling
One Responsibility Concept
                             Model Driven
                             Unit Test Ready


                             M - Backbone.Model
                             V - _.template
                             C - Backbone.View / Router
This is a backbone.

When used properly
It keeps one's head
Out of one's butt
Rand Macivor
What we're going to do today:




  https://github.com/tikalk/backbone-workshop/downloads
Backbone.Model
Where JSON data is stored      Methods:
REST, Constructor, Manually    set - validate
Data Change Events             get
Works With: Collection, View   escape
                               clear
                               fetch
                               save (REST) - parse
                               destroy (REST)
Backbone.Model
Backbone.Model - PRACTICE
Backbone.View
A Controller for a DOM Element (wrapper)   Methods:
Renders Model/Collection to DOM (html)     render (return this)
Delegates DOM Events                       make
Works With: Model, Collection              remove
Can use Any template engine to render      un/delegateEvents
html
                                           Properties:
                                           $ = $el.find
                                           el
                                           $el
                                           options
                                           events
Backbone.View
Backbone.View - PRACTICE
_.Underscore.js
Utilities for Javascript (60)              Methods:
Collections, Arrays, Functions, Objects,   Collections - each, map, filter, pluck,
Uses Browsers Implementation if possible   groupBy
High Expressiveness                        Arrays - without, uniq
Works With: Backbone, Standalone
                                           Functions - bind, debounce,
                                           Object - keys, values, is-* (Empty, Date,
                                           String, Function etc..), has
                                           Utility - template, escape, mixin
                                           Chaining - chain, value
_.Underscore.js
Backbone.Collection
Collection of Models                        Methods:
REST, Constructor, Manually                 add
Inherits Change Events from Models          remove
Works With: Model, View                     length
Many utilities methods from underscore.js   fetch
                                            save (REST) - parse
                                            destroy (REST)
                                            + 28 Underscore methods:
                                            map, find, filter, sortBy, groupBy, pluck,
                                            invoke ...


                                            Properties:
                                            options
Backbone.Collection
Backbone.Collection - PRACTICE
Backbone.Router
Navigation Handling (bookmarks)       Methods:
Listens to url change events          custom
Natively integrated to Back/Forward   navigate
Easy routing handling                 route (create)
Works With: Backbone.History
                                      Properties:
                                      routes (key - value) - (route - handler)
Backbone.Router
Backbone.Router - PRACTICE
Questions?
Backbone - http://documentcloud.github.com/backbone/
Underscore - http://documentcloud.github.com/underscore
Tikal - http://www.tikalk.com

More Related Content

PPT
Backbone js-slides
PDF
Introduction to backbone js
PPSX
Introduction to backbone_js
PDF
Backbone js
PPTX
Planbox Backbone MVC
PPTX
Introduction to Backbone.js
PPT
The Mobile Development Landscape
PDF
Realtime web apps rails
Backbone js-slides
Introduction to backbone js
Introduction to backbone_js
Backbone js
Planbox Backbone MVC
Introduction to Backbone.js
The Mobile Development Landscape
Realtime web apps rails

What's hot (20)

PDF
Backbone beyond jQuery
PDF
An Introduction To Testing In AngularJS Applications
PPTX
Go Fullstack: JSF for Public Sites (CONFESS 2013)
PPTX
Introduction to Knockoutjs
PDF
Marionette: the Backbone framework
PDF
DrupalGap. How to create native application for mobile devices based on Drupa...
PPTX
Go Fullstack: JSF for Public Sites (CONFESS 2012)
PPTX
Harness jQuery Templates and Data Link
PDF
Introduction to Backbone.js for Rails developers
PPT
Managing JavaScript Dependencies With RequireJS
PDF
Client Side MVC & Angular
PDF
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
PDF
Intro to Vue
PPTX
JsViews - Next Generation jQuery Templates
PPTX
Soa development using javascript
PDF
The Art of AngularJS in 2015 - Angular Summit 2015
PDF
Suportando Aplicações Multi-tenancy com Java EE
PDF
AngularJS 101 - Everything you need to know to get started
ODP
Javascript frameworks: Backbone.js
PPTX
Dom selecting & jQuery
Backbone beyond jQuery
An Introduction To Testing In AngularJS Applications
Go Fullstack: JSF for Public Sites (CONFESS 2013)
Introduction to Knockoutjs
Marionette: the Backbone framework
DrupalGap. How to create native application for mobile devices based on Drupa...
Go Fullstack: JSF for Public Sites (CONFESS 2012)
Harness jQuery Templates and Data Link
Introduction to Backbone.js for Rails developers
Managing JavaScript Dependencies With RequireJS
Client Side MVC & Angular
CodeFest 2014. Пухальский И. — Отзывчивые кроссплатформенные веб-приложения
Intro to Vue
JsViews - Next Generation jQuery Templates
Soa development using javascript
The Art of AngularJS in 2015 - Angular Summit 2015
Suportando Aplicações Multi-tenancy com Java EE
AngularJS 101 - Everything you need to know to get started
Javascript frameworks: Backbone.js
Dom selecting & jQuery
Ad

Similar to Tikal's Backbone_js introduction workshop (20)

PDF
Backbone.js introduction workshop
PDF
Introduction to Backbone - Workshop
PDF
Backbone.js
PPTX
Backbonejs for beginners
PDF
Client-side MVC with Backbone.js
PDF
Client-side MVC with Backbone.js (reloaded)
PDF
Backbone.js: Run your Application Inside The Browser
PDF
[2015/2016] Backbone JS
PDF
PDF
Backbone
KEY
Give Your JavaScript Apps Some Spine
PDF
Developing maintainable Cordova applications
PDF
Understanding backbonejs
PPT
Backbone.js
PDF
Backbone JS for mobile apps
KEY
Give Your JavaScript Apps A Spine
PDF
Backbone.js
PDF
Intro to BackboneJS + Intermediate Javascript
PDF
Viking academy backbone.js
PDF
Overview of Backbone
Backbone.js introduction workshop
Introduction to Backbone - Workshop
Backbone.js
Backbonejs for beginners
Client-side MVC with Backbone.js
Client-side MVC with Backbone.js (reloaded)
Backbone.js: Run your Application Inside The Browser
[2015/2016] Backbone JS
Backbone
Give Your JavaScript Apps Some Spine
Developing maintainable Cordova applications
Understanding backbonejs
Backbone.js
Backbone JS for mobile apps
Give Your JavaScript Apps A Spine
Backbone.js
Intro to BackboneJS + Intermediate Javascript
Viking academy backbone.js
Overview of Backbone
Ad

More from Tikal Knowledge (20)

PDF
Clojure - LISP on the JVM
ODP
Clojure presentation
PDF
Tabtale story: Building a publishing and monitoring mobile games architecture...
PDF
Kafka short
PDF
PDF
Processing Big Data in Realtime
PDF
Docking your services_with_docker
PDF
Who moved my_box
PDF
Writing a Fullstack Application with Javascript - Remote media player
PDF
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
PPTX
TCE Automation
PPTX
Tce automation-d4
ODP
Cloud computing - an insight into "how does it really work ?"
PDF
Introduction to Cloud Computing
PPT
Tikal Fuse Day Access Layer Implementation (C#) Based On Mongo Db
PDF
Ship early ship often with Django
ODP
Google App Engine
PDF
AWS Case Study
PDF
Introduction To Cloud Computing
PPT
Building Components In Flex3
Clojure - LISP on the JVM
Clojure presentation
Tabtale story: Building a publishing and monitoring mobile games architecture...
Kafka short
Processing Big Data in Realtime
Docking your services_with_docker
Who moved my_box
Writing a Fullstack Application with Javascript - Remote media player
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
TCE Automation
Tce automation-d4
Cloud computing - an insight into "how does it really work ?"
Introduction to Cloud Computing
Tikal Fuse Day Access Layer Implementation (C#) Based On Mongo Db
Ship early ship often with Django
Google App Engine
AWS Case Study
Introduction To Cloud Computing
Building Components In Flex3

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Electronic commerce courselecture one. Pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Tartificialntelligence_presentation.pptx
PPTX
1. Introduction to Computer Programming.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Getting Started with Data Integration: FME Form 101
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
A Presentation on Artificial Intelligence
PPTX
Machine Learning_overview_presentation.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Encapsulation_ Review paper, used for researhc scholars
Dropbox Q2 2025 Financial Results & Investor Presentation
Group 1 Presentation -Planning and Decision Making .pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Reach Out and Touch Someone: Haptics and Empathic Computing
Electronic commerce courselecture one. Pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Tartificialntelligence_presentation.pptx
1. Introduction to Computer Programming.pptx
MYSQL Presentation for SQL database connectivity
Getting Started with Data Integration: FME Form 101
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
A Presentation on Artificial Intelligence
Machine Learning_overview_presentation.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Building Integrated photovoltaic BIPV_UPV.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Spectral efficient network and resource selection model in 5G networks

Tikal's Backbone_js introduction workshop

  • 2. Oren Farhi Front End Architect, JS Engineer @Tikal JS Group Leader - Meet, Share, Contribute & Coding Speaker (Israel & World Wide) Developing with: Pure Javascript, Backbone.js, Underscore.js, jQuery, Common Sense, CSS3 github.com/tikalk @tikalk
  • 3. We help companies build, deliver, deploy, manage and optimize their products. ALM JAVA JS .NET RoR “Today we are SURE that we made the right decision, choosing Tikal” Guy Ben-Porat - Development Manager “ExLibris”
  • 4. Tikal by Numbers 1600+ 150+ 460+ Community Blog Posts Meetup Members Last Year Members 90+ 100+ 12+ Tikal’s Projects Years old Experts Team Last Year “Actions speak louder than words” Tikal's motto
  • 5. The Past: JS is the wild west No code conventions jQuery bloated code Data & DOM mixed jQuery ajax & callbacks are a bit messy No Reuse Most End Result: words and sentences with long selectors and "hanged" functions everywhere
  • 6. The Present: All we have is now JS is the wild west No code conventions jQuery bloated code Data & DOM mixed Simplicity jQuery ajax & callbacks are a bit messy No Reuse Organization Focus Most End Result: words and sentences with long selectors and "hanged" functions everywhere
  • 7. Backbone Background Jeremy Ashkenas - Underscore, Coffeescript DocumentCloud Dependencies: jquery / zepto underscore.js json2.js ( IE, other without JSON )
  • 8. Backbone is: MVC library (MIT) Model Project "DocumentCloud" Events Structure View RESTful JSON connector Collection Hash Routing Engine Router Event Driven Utilities - based underscore.js Extended Templating Engine - based underscore.js
  • 9. What is it good for? Web Applications Modular, Extensible Structure for Code Reusable Modules Divide & Conquer Loose Coupling One Responsibility Concept Model Driven Unit Test Ready M - Backbone.Model V - _.template C - Backbone.View / Router
  • 10. This is a backbone. When used properly It keeps one's head Out of one's butt Rand Macivor
  • 11. What we're going to do today: https://github.com/tikalk/backbone-workshop/downloads
  • 12. Backbone.Model Where JSON data is stored Methods: REST, Constructor, Manually set - validate Data Change Events get Works With: Collection, View escape clear fetch save (REST) - parse destroy (REST)
  • 15. Backbone.View A Controller for a DOM Element (wrapper) Methods: Renders Model/Collection to DOM (html) render (return this) Delegates DOM Events make Works With: Model, Collection remove Can use Any template engine to render un/delegateEvents html Properties: $ = $el.find el $el options events
  • 18. _.Underscore.js Utilities for Javascript (60) Methods: Collections, Arrays, Functions, Objects, Collections - each, map, filter, pluck, Uses Browsers Implementation if possible groupBy High Expressiveness Arrays - without, uniq Works With: Backbone, Standalone Functions - bind, debounce, Object - keys, values, is-* (Empty, Date, String, Function etc..), has Utility - template, escape, mixin Chaining - chain, value
  • 20. Backbone.Collection Collection of Models Methods: REST, Constructor, Manually add Inherits Change Events from Models remove Works With: Model, View length Many utilities methods from underscore.js fetch save (REST) - parse destroy (REST) + 28 Underscore methods: map, find, filter, sortBy, groupBy, pluck, invoke ... Properties: options
  • 23. Backbone.Router Navigation Handling (bookmarks) Methods: Listens to url change events custom Natively integrated to Back/Forward navigate Easy routing handling route (create) Works With: Backbone.History Properties: routes (key - value) - (route - handler)
  • 26. Questions? Backbone - http://documentcloud.github.com/backbone/ Underscore - http://documentcloud.github.com/underscore Tikal - http://www.tikalk.com