SlideShare uma empresa Scribd logo
1 de 46
Backbone.js Architecture
showcasing Echoes Media Player
http://echotu.be
Oren Farhi
JS Engineer, Front End Architect, Consultant @Tikal
JS Group Tech Leader - Meet, Share, Contribute & Coding
Speaker (Israel & World Wide)
Developing with:
Pure Javascript, Backbone.js, Underscore.js, jQuery, CSS3
http://orizens.com
github.com/tikalk
@tikalk
Echoes Media Center http://echotu.be
This is a backbone.
When used properly
It keeps one's head
Out of one's butt
Rand Macivor
Structure
Bootstrap
jquery
require.js
Where Do I Start?
Where Do I Start?
Require.js
How Do i connect them all?
What is the secret?
“The secret to building large apps is never build large
apps. Break your applications into small pieces. Then,
assemble those testable, bite-sized pieces into your
big application”
Jastin Meyer (JavascriptMVC)
Youtube Item
View
Youtube API - JSON RESPONSE
Model
Youtube Item
View
HTML & CSS
View
Youtube Item
View Model
Results Navigation
View
Model
Model
View
Echoes Player: What does that do?
Echoes Model
(js memory)
Echoes View
(html, js)
Echoes Router
(url: #search/videos)
reference to Model
reference to Model
Sidebar Search Results Player Bar
player search results
media info
provider
app settings
search
features
current played
video info
Echoes Player JS Architecture
http://echotu.be
Echoes Model
(js memory)
Echoes View
(html, js)
Echoes Router
(url: #search/videos)
reference to Model
reference to Model
Sidebar Search Results Player Bar
player search results
media info
provider
app settings
search
features
current played
video info
Echoes Player JS Architecture
http://echotu.be
Echoes Model
Echoes Model
user
current
resource
youtube
provider
app
settings
filter
video player
current played
video
query
options
playlistsdetails
search
results
playlist info
provider
Echoes Model - REST
Echoes Model
user
youtube
provider
gData My
Youtube
Playlists API
gData
(youtube)
gData
Users API
(youtube)
Echoes Model
Echoes Model Challenges
local storage & communication
Backbone.Safe
Communication
Echoes Model
Listener (View)
Listener (model)
Listener (View 2)
model
change
Echoes Model
(js memory)
Echoes View
(html, js)
Echoes Router
(url: #search/videos)
reference to Model
reference to Model
Sidebar Search Results Player Bar
player search results
media info
provider
app settings
search
features
current played
video info
Echoes Player JS Architecture
http://echotu.be
Echoes View
Echoes View
(html, js)
Search
jQuery
autocomplete
search
results
Search
Results
Some View
View Item
Results Nav Player Bar
Playlist InfoTrack Info yt (Youtube)
Facebook
Like
FB service
Echoes Model
(js memory)
index.html
Echoes View
Echoes View Echoes View (html, js)
Player Bar
Search
Search Results
Results Nav
yt Player (Youtube)
Playlist Info
jQuery autocomplete
Facebook Like
Feed User
Youtube User Playlist
Provider
Current
Track Info
Echoes View
Echoes View
(html, js)
Search
Search
Results
Results
Nav
Player Bar
Faceboo
k Like
Echoes Model
(js memory)
User profile
User
Playlists
Youtube
Model
Echoes ModelPlayer Model
Youtube
Model
User Model
Youtube
Model
Youtube
Model
User Model
Playlists
Provider
Echoes View Challenges
switcher, collections & transitions
Echoes View: Switch Echoes View (html, js)
Search ResultsSwitchable View
Item View Item View Item View Item View
Item View Item View Item View Item View
Backbone Switcher
Solves:
1. switching sub views with ease
2. no memory leaks (zombie views)
3. easy configuration
4. integrate with "this.model" - Model Driven Views
Echoes - Rendering Collections
Search Results Collection
Youtube Item Model
Youtube Item Model
Youtube Item Model
Youtube View Item
Youtube View Item
Youtube View Item
Search Results View
Backbone Collection View
Solves:
1. no need to write another render method
2. Handles Memory Leaks issues (clean)
3. supports custom view events handling
Backbone Transition
Solves:
1. built to integrate with css transitions (animate.css)
2. no need to handle timeouts - show, hide
3. work with others extensions
Backbone Collection & Transition
Backbone.Beamer
1. collection-view
2. transition
3. switcher
One Register
Point
Clean Prototype
Chain
Extend, don't
break
https://github.com/orizens/Backbone.Beamer
Backbone.Beamer
1. collection-view
2. transition
3. switcher
Backbone.View.render Transition Extension Backbone.View.render
Backbone.View.initialize
Collection View
Extension
backbone.transition
backbone.CollectionView
listen, define collection Backbone.View.initialize
render
Echoes Router
the controller
Echoes Model
(js memory)
Echoes View
(html, js)
Echoes Router
(url: #search/videos)
reference to Model
reference to Model
Sidebar Search Results Player Bar
player search results
media info
provider
app settings
search
features
current played
video info
Echoes Player JS Architecture
http://echotu.be
Echoes Router
favoritesplay media
switch
route
filter type history
Echoes Model
(js memory)
Echoes Router
(url: #search/videos)
Youtube User API
(token)
Echoes Router
Echoes Router
Videos Results View
action: Video is Playing
Youtube User Connection:
parsing User details
Echoes Router
(url: #search/videos)
Echoes Model
(js memory)
Echoes View
(html, js)
Sidebar Search Results Player Bar
Echoes Player JS Architecture
http://echotu.be
player
search
results
media info
provider
app
settings
search
features
current
played video
info
Echoes & TImber
https://github.com/orizens/Timber
Timber implements Echoes Architecture
Questions?
Tikal - http://www.tikalk.com
Echoes (Github) - https://github.com/orizens/echoes
Backbone.Beamer - https://github.com/orizens/Backbone.Beamer
Echoes Media Center (Player in production)- http://echotu.be

Mais conteúdo relacionado

Mais procurados

Readme
ReadmeReadme
Readme
ARoyle
 

Mais procurados (9)

PrairieDevCon 2014 - Web Doesn't Mean Slow
PrairieDevCon 2014 -  Web Doesn't Mean SlowPrairieDevCon 2014 -  Web Doesn't Mean Slow
PrairieDevCon 2014 - Web Doesn't Mean Slow
 
Slideflickr
SlideflickrSlideflickr
Slideflickr
 
Slideflickr Presentation
Slideflickr PresentationSlideflickr Presentation
Slideflickr Presentation
 
Mozilla Labs Meeti
Mozilla Labs MeetiMozilla Labs Meeti
Mozilla Labs Meeti
 
Learning from the Best jQuery Plugins
Learning from the Best jQuery PluginsLearning from the Best jQuery Plugins
Learning from the Best jQuery Plugins
 
Readme
ReadmeReadme
Readme
 
jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009
 
WORKSHOP: Object Oriented UX for Responsive Design
WORKSHOP: Object Oriented UX for Responsive DesignWORKSHOP: Object Oriented UX for Responsive Design
WORKSHOP: Object Oriented UX for Responsive Design
 
Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web Components
 

Destaque (6)

Backbone js
Backbone jsBackbone js
Backbone js
 
Introduction to backbone js
Introduction to backbone jsIntroduction to backbone js
Introduction to backbone js
 
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and BackboneJavascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
Javascript Frameworks Comparison - Angular, Knockout, Ember and Backbone
 
Dust.js
Dust.jsDust.js
Dust.js
 
Rapid prototyping
Rapid prototypingRapid prototyping
Rapid prototyping
 
An intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECSAn intro to Docker, Terraform, and Amazon ECS
An intro to Docker, Terraform, and Amazon ECS
 

Semelhante a Backbone web apps - design & architecture

jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
Mark Roden
 
Backbone.js introduction workshop
Backbone.js introduction workshopBackbone.js introduction workshop
Backbone.js introduction workshop
Yifat Kanfi
 
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Thinkful
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwist
Mark Fayngersh
 
Building Forio Web Simulations - Introduction to Interface Design
Building Forio Web Simulations - Introduction to Interface DesignBuilding Forio Web Simulations - Introduction to Interface Design
Building Forio Web Simulations - Introduction to Interface Design
foriocorp
 

Semelhante a Backbone web apps - design & architecture (20)

Organized web app development using backbone.js
Organized web app development using backbone.jsOrganized web app development using backbone.js
Organized web app development using backbone.js
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
 
Yeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web appsYeoman AngularJS and D3 - A solid stack for web apps
Yeoman AngularJS and D3 - A solid stack for web apps
 
Joomla Day Austin Part 4
Joomla Day Austin Part 4Joomla Day Austin Part 4
Joomla Day Austin Part 4
 
Introduction to Backbone - Workshop
Introduction to Backbone - WorkshopIntroduction to Backbone - Workshop
Introduction to Backbone - Workshop
 
Backbone.js introduction workshop
Backbone.js introduction workshopBackbone.js introduction workshop
Backbone.js introduction workshop
 
Jsf 2.0 Overview
Jsf 2.0 OverviewJsf 2.0 Overview
Jsf 2.0 Overview
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx UK 2016
 
Fewd week4 slides
Fewd week4 slidesFewd week4 slides
Fewd week4 slides
 
Starting with jQuery
Starting with jQueryStarting with jQuery
Starting with jQuery
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - GeekOut 2016
 
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
 
JavaScript for ASP.NET programmers (webcast) upload
JavaScript for ASP.NET programmers (webcast) uploadJavaScript for ASP.NET programmers (webcast) upload
JavaScript for ASP.NET programmers (webcast) upload
 
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
Get Hip with JHipster: Spring Boot + AngularJS + Bootstrap - Devoxx France 2016
 
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine DevelopmentEECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
EECI2009 - From Design to Dynamic - Rapid ExpressionEngine Development
 
Technical Introduction to YDN
Technical Introduction to YDNTechnical Introduction to YDN
Technical Introduction to YDN
 
Facets of applied smw
Facets of applied smwFacets of applied smw
Facets of applied smw
 
The State of Front-end At CrowdTwist
The State of Front-end At CrowdTwistThe State of Front-end At CrowdTwist
The State of Front-end At CrowdTwist
 
Beyond the Basics, Debugging with Firebug and Web Inspector
Beyond the Basics, Debugging with Firebug and Web InspectorBeyond the Basics, Debugging with Firebug and Web Inspector
Beyond the Basics, Debugging with Firebug and Web Inspector
 
Building Forio Web Simulations - Introduction to Interface Design
Building Forio Web Simulations - Introduction to Interface DesignBuilding Forio Web Simulations - Introduction to Interface Design
Building Forio Web Simulations - Introduction to Interface Design
 

Último

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
fonyou31
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 

Backbone web apps - design & architecture