SlideShare a Scribd company logo
Submit Search
Upload
Structuring web applications with Backbone.js
Report
Share
Diego Cardozo
Principal Performance Engineer at Oracle
Follow
•
1 like
•
1,186 views
1
of
21
Structuring web applications with Backbone.js
•
1 like
•
1,186 views
Report
Share
Download Now
Download to read offline
Software
Technology
Business
Talk on how to structure web applications with Backbonejs, presented at a local JavaScript meetup.
Read more
Diego Cardozo
Principal Performance Engineer at Oracle
Follow
Recommended
Writing HTML5 Web Apps using Backbone.js and GAE by
Writing HTML5 Web Apps using Backbone.js and GAE
Ron Reiter
12.2K views
•
32 slides
Introduction to Backbone.js by
Introduction to Backbone.js
Pragnesh Vaghela
5.2K views
•
14 slides
Introduction to backbone js by
Introduction to backbone js
Mindfire Solutions
1.1K views
•
18 slides
Introduction to backbone_js by
Introduction to backbone_js
Mohammed Saqib
870 views
•
24 slides
Creating MVC Application with backbone js by
Creating MVC Application with backbone js
Mindfire Solutions
1.6K views
•
17 slides
Александр Белецкий "Архитектура Javascript приложений" by
Александр Белецкий "Архитектура Javascript приложений"
Agile Base Camp
2K views
•
44 slides
More Related Content
What's hot
Beginning In J2EE by
Beginning In J2EE
Suthat Rongraung
493 views
•
14 slides
Give your web apps some backbone by
Give your web apps some backbone
RTigger
760 views
•
11 slides
iOS Architectures by
iOS Architectures
Hung Hoang
1.1K views
•
27 slides
Introduction to react js and reasons to go with react js in 2020 by
Introduction to react js and reasons to go with react js in 2020
Concetto Labs
106 views
•
15 slides
Lesson 09 by
Lesson 09
Gene Babon
492 views
•
12 slides
Dog food conference creating modular webparts with require js in sharepoint by
Dog food conference creating modular webparts with require js in sharepoint
fahey252
564 views
•
31 slides
What's hot
(20)
Beginning In J2EE by Suthat Rongraung
Beginning In J2EE
Suthat Rongraung
•
493 views
Give your web apps some backbone by RTigger
Give your web apps some backbone
RTigger
•
760 views
iOS Architectures by Hung Hoang
iOS Architectures
Hung Hoang
•
1.1K views
Introduction to react js and reasons to go with react js in 2020 by Concetto Labs
Introduction to react js and reasons to go with react js in 2020
Concetto Labs
•
106 views
Lesson 09 by Gene Babon
Lesson 09
Gene Babon
•
492 views
Dog food conference creating modular webparts with require js in sharepoint by fahey252
Dog food conference creating modular webparts with require js in sharepoint
fahey252
•
564 views
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic... by DicodingEvent
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
DicodingEvent
•
183 views
Google Developer Group(GDG) DevFest Event 2012 Android talk by Imam Raza
Google Developer Group(GDG) DevFest Event 2012 Android talk
Imam Raza
•
1.4K views
Vue.js by Jadson Santos
Vue.js
Jadson Santos
•
10.7K views
Lesson 09 by Gene Babon
Lesson 09
Gene Babon
•
396 views
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece by Dan Gribbin
Transforming Front-End Disaster Code™ Into A Maintainable Masterpiece
Dan Gribbin
•
11K views
Love at first Vue by Dalibor Gogic
Love at first Vue
Dalibor Gogic
•
660 views
An introduction to knockout.js by Emanuele DelBono
An introduction to knockout.js
Emanuele DelBono
•
5.2K views
React js, node js & angular js which one is the best for web development by Concetto Labs
React js, node js & angular js which one is the best for web development
Concetto Labs
•
46 views
Php and-mvc by Manoj Sahoo
Php and-mvc
Manoj Sahoo
•
1K views
Domain Driven Design for Angular by Jennifer Estrada
Domain Driven Design for Angular
Jennifer Estrada
•
1.5K views
Code Resume by Vincent Santamauro
Code Resume
Vincent Santamauro
•
180 views
AngularJS : Superheroic JavaScript MVW Framework by Edureka!
AngularJS : Superheroic JavaScript MVW Framework
Edureka!
•
3.6K views
Fundaments of Knockout js by Flavius-Radu Demian
Fundaments of Knockout js
Flavius-Radu Demian
•
2.4K views
Search Engine Optimization by Mindfire Solutions
Search Engine Optimization
Mindfire Solutions
•
798 views
Viewers also liked
Introduction To Backbone JS by
Introduction To Backbone JS
paramisoft
955 views
•
18 slides
Introduction to Backbone - Workshop by
Introduction to Backbone - Workshop
Oren Farhi
1.3K views
•
26 slides
Backbone.js by
Backbone.js
tonyskn
3.6K views
•
6 slides
Backbone.js by
Backbone.js
Chris Neale
2.7K views
•
32 slides
Backbone Basics with Examples by
Backbone Basics with Examples
Sergey Bolshchikov
4.3K views
•
27 slides
Sockets and rails by
Sockets and rails
Shrikanth Rajarajan
2.3K views
•
28 slides
Viewers also liked
(20)
Introduction To Backbone JS by paramisoft
Introduction To Backbone JS
paramisoft
•
955 views
Introduction to Backbone - Workshop by Oren Farhi
Introduction to Backbone - Workshop
Oren Farhi
•
1.3K views
Backbone.js by tonyskn
Backbone.js
tonyskn
•
3.6K views
Backbone.js by Chris Neale
Backbone.js
Chris Neale
•
2.7K views
Backbone Basics with Examples by Sergey Bolshchikov
Backbone Basics with Examples
Sergey Bolshchikov
•
4.3K views
Sockets and rails by Shrikanth Rajarajan
Sockets and rails
Shrikanth Rajarajan
•
2.3K views
Top 10 HTML5 frameworks for effective development in 2016 by iMOBDEV Technologies Pvt. Ltd.
Top 10 HTML5 frameworks for effective development in 2016
iMOBDEV Technologies Pvt. Ltd.
•
404 views
Delivering HTML5 and Modern Apps by Joshua Drew
Delivering HTML5 and Modern Apps
Joshua Drew
•
850 views
Building modern web apps with html5, javascript, and java by Alexander Gyoshev
Building modern web apps with html5, javascript, and java
Alexander Gyoshev
•
10.3K views
Modern Web App Architectures by Raphael Stary
Modern Web App Architectures
Raphael Stary
•
1.8K views
Web app architecture by Jordan Open Source Association
Web app architecture
Jordan Open Source Association
•
744 views
Web Development Technologies by Vignesh Prajapati
Web Development Technologies
Vignesh Prajapati
•
1.3K views
How to-choose-the-right-technology-architecture-for-your-mobile-application by lverb
How to-choose-the-right-technology-architecture-for-your-mobile-application
lverb
•
839 views
Introduction To Building Enterprise Web Application With Spring Mvc by Abdelmonaim Remani
Introduction To Building Enterprise Web Application With Spring Mvc
Abdelmonaim Remani
•
4.5K views
Quick Application Development with Web Frameworks by Stratepedia Presentations
Quick Application Development with Web Frameworks
Stratepedia Presentations
•
757 views
Ning presentation by Stratepedia Presentations
Ning presentation
Stratepedia Presentations
•
318 views
Top 10 web application development frameworks 2016 by iMOBDEV Technologies Pvt. Ltd.
Top 10 web application development frameworks 2016
iMOBDEV Technologies Pvt. Ltd.
•
1.2K views
A Simpler Web App Architecture (jDays 2016) by Gustaf Nilsson Kotte
A Simpler Web App Architecture (jDays 2016)
Gustaf Nilsson Kotte
•
2.2K views
Web Application Frameworks - Web Technologies (1019888BNR) by Beat Signer
Web Application Frameworks - Web Technologies (1019888BNR)
Beat Signer
•
2.4K views
Building a Single-Page App: Backbone, Node.js, and Beyond by Spike Brehm
Building a Single-Page App: Backbone, Node.js, and Beyond
Spike Brehm
•
29.5K views
Similar to Structuring web applications with Backbone.js
Introduction to MVC Web Framework with CodeIgniter by
Introduction to MVC Web Framework with CodeIgniter
Pongsakorn U-chupala
8.8K views
•
27 slides
Lotus Framework by
Lotus Framework
Todi Adiyatmo
1.4K views
•
30 slides
Single page applications by
Single page applications
Diego Cardozo
2.4K views
•
21 slides
JavaScript - Kristiansand PHP by
JavaScript - Kristiansand PHP
holeedave
325 views
•
18 slides
AngularJS - A Powerful Framework For Web Applications by
AngularJS - A Powerful Framework For Web Applications
Idexcel Technologies
1.4K views
•
12 slides
Noman Khan Internship Report 2.pptx by
Noman Khan Internship Report 2.pptx
NomanKhan869872
6 views
•
43 slides
Similar to Structuring web applications with Backbone.js
(20)
Introduction to MVC Web Framework with CodeIgniter by Pongsakorn U-chupala
Introduction to MVC Web Framework with CodeIgniter
Pongsakorn U-chupala
•
8.8K views
Lotus Framework by Todi Adiyatmo
Lotus Framework
Todi Adiyatmo
•
1.4K views
Single page applications by Diego Cardozo
Single page applications
Diego Cardozo
•
2.4K views
JavaScript - Kristiansand PHP by holeedave
JavaScript - Kristiansand PHP
holeedave
•
325 views
AngularJS - A Powerful Framework For Web Applications by Idexcel Technologies
AngularJS - A Powerful Framework For Web Applications
Idexcel Technologies
•
1.4K views
Noman Khan Internship Report 2.pptx by NomanKhan869872
Noman Khan Internship Report 2.pptx
NomanKhan869872
•
6 views
Angular js workshop by Rolands Krumbergs
Angular js workshop
Rolands Krumbergs
•
276 views
Clean architecture with asp.net core by Sam Nasr, MCSA, MVP
Clean architecture with asp.net core
Sam Nasr, MCSA, MVP
•
2.2K views
Web summit.pptx by 171SagnikRoy
Web summit.pptx
171SagnikRoy
•
355 views
Why do JavaScript enthusiast think of Vue.js for building real-time web appli... by Katy Slemon
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
Katy Slemon
•
43 views
Top java script frameworks ppt by Omkarsoft Bangalore
Top java script frameworks ppt
Omkarsoft Bangalore
•
2.3K views
9 Best JavaScript Frameworks To Choose by Albiorix Technology
9 Best JavaScript Frameworks To Choose
Albiorix Technology
•
20 views
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf by VitulChauhan
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
VitulChauhan
•
53 views
AngularJS in Production (CTO Forum) by Alex Ross
AngularJS in Production (CTO Forum)
Alex Ross
•
849 views
Vuejs and Web components - current state by Mikhail Kuznetcov
Vuejs and Web components - current state
Mikhail Kuznetcov
•
667 views
codeigniter by Utkarsh Chaturvedi
codeigniter
Utkarsh Chaturvedi
•
39 views
Building reusable components as micro frontends with glimmer js and webcompo... by Andrei Sebastian Cîmpean
Building reusable components as micro frontends with glimmer js and webcompo...
Andrei Sebastian Cîmpean
•
728 views
Javascript frameworks by RajkumarJangid7
Javascript frameworks
RajkumarJangid7
•
114 views
Selecting the Best Javascript Web Framework by Rajitha Pathiraja
Selecting the Best Javascript Web Framework
Rajitha Pathiraja
•
168 views
Design pattern by Shreyance Jain
Design pattern
Shreyance Jain
•
469 views
More from Diego Cardozo
El proximo billon de usuarios by
El proximo billon de usuarios
Diego Cardozo
143 views
•
19 slides
The next billion users by
The next billion users
Diego Cardozo
237 views
•
19 slides
Troubleshooting Ecommerce Performance by
Troubleshooting Ecommerce Performance
Diego Cardozo
174 views
•
72 slides
Cranking It Up - SuiteWorld 2017 by
Cranking It Up - SuiteWorld 2017
Diego Cardozo
149 views
•
72 slides
Speed Thrills - Suiteworld 2016 by
Speed Thrills - Suiteworld 2016
Diego Cardozo
117 views
•
43 slides
Performance in the cloud by
Performance in the cloud
Diego Cardozo
302 views
•
12 slides
More from Diego Cardozo
(15)
El proximo billon de usuarios by Diego Cardozo
El proximo billon de usuarios
Diego Cardozo
•
143 views
The next billion users by Diego Cardozo
The next billion users
Diego Cardozo
•
237 views
Troubleshooting Ecommerce Performance by Diego Cardozo
Troubleshooting Ecommerce Performance
Diego Cardozo
•
174 views
Cranking It Up - SuiteWorld 2017 by Diego Cardozo
Cranking It Up - SuiteWorld 2017
Diego Cardozo
•
149 views
Speed Thrills - Suiteworld 2016 by Diego Cardozo
Speed Thrills - Suiteworld 2016
Diego Cardozo
•
117 views
Performance in the cloud by Diego Cardozo
Performance in the cloud
Diego Cardozo
•
302 views
Cómo testear performance sin morir en el intento by Diego Cardozo
Cómo testear performance sin morir en el intento
Diego Cardozo
•
409 views
Optimize performance and not die trying by Diego Cardozo
Optimize performance and not die trying
Diego Cardozo
•
1.2K views
Optimizar performance sin morir en el intento by Diego Cardozo
Optimizar performance sin morir en el intento
Diego Cardozo
•
386 views
How to test performance and not die trying by Diego Cardozo
How to test performance and not die trying
Diego Cardozo
•
721 views
Testeando performance sin morir en el intento by Diego Cardozo
Testeando performance sin morir en el intento
Diego Cardozo
•
458 views
Organización de aplicaciones web con Backbone.js by Diego Cardozo
Organización de aplicaciones web con Backbone.js
Diego Cardozo
•
1.5K views
Component Based Software Development by Diego Cardozo
Component Based Software Development
Diego Cardozo
•
2.9K views
Desarrollo de Software Basado en Componentes by Diego Cardozo
Desarrollo de Software Basado en Componentes
Diego Cardozo
•
1.9K views
Single Page Applications by Diego Cardozo
Single Page Applications
Diego Cardozo
•
2.4K views
Recently uploaded
Mobile App Development Company by
Mobile App Development Company
Richestsoft
5 views
•
6 slides
Supercharging your Python Development Environment with VS Code and Dev Contai... by
Supercharging your Python Development Environment with VS Code and Dev Contai...
Dawn Wages
5 views
•
51 slides
Ports-and-Adapters Architecture for Embedded HMI by
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert
35 views
•
19 slides
Using Qt under LGPL-3.0 by
Using Qt under LGPL-3.0
Burkhard Stubert
14 views
•
11 slides
Advanced API Mocking Techniques Using Wiremock by
Advanced API Mocking Techniques Using Wiremock
Dimpy Adhikary
5 views
•
11 slides
Flask-Python by
Flask-Python
Triloki Gupta
10 views
•
12 slides
Recently uploaded
(20)
Mobile App Development Company by Richestsoft
Mobile App Development Company
Richestsoft
•
5 views
Supercharging your Python Development Environment with VS Code and Dev Contai... by Dawn Wages
Supercharging your Python Development Environment with VS Code and Dev Contai...
Dawn Wages
•
5 views
Ports-and-Adapters Architecture for Embedded HMI by Burkhard Stubert
Ports-and-Adapters Architecture for Embedded HMI
Burkhard Stubert
•
35 views
Using Qt under LGPL-3.0 by Burkhard Stubert
Using Qt under LGPL-3.0
Burkhard Stubert
•
14 views
Advanced API Mocking Techniques Using Wiremock by Dimpy Adhikary
Advanced API Mocking Techniques Using Wiremock
Dimpy Adhikary
•
5 views
Flask-Python by Triloki Gupta
Flask-Python
Triloki Gupta
•
10 views
What is API by artembondar5
What is API
artembondar5
•
15 views
FOSSLight Community Day 2023-11-30 by Shane Coughlan
FOSSLight Community Day 2023-11-30
Shane Coughlan
•
8 views
Transport Management System - Shipment & Container Tracking by Freightoscope
Transport Management System - Shipment & Container Tracking
Freightoscope
•
6 views
predicting-m3-devopsconMunich-2023.pptx by Tier1 app
predicting-m3-devopsconMunich-2023.pptx
Tier1 app
•
10 views
Chat GPTs by Gene Leybzon
Chat GPTs
Gene Leybzon
•
13 views
The Path to DevOps by John Valentino
The Path to DevOps
John Valentino
•
6 views
Agile 101 by John Valentino
Agile 101
John Valentino
•
13 views
How Workforce Management Software Empowers SMEs | TraQSuite by TraQSuite
How Workforce Management Software Empowers SMEs | TraQSuite
TraQSuite
•
7 views
Quality Assurance by interworksoftware2
Quality Assurance
interworksoftware2
•
8 views
Playwright Retries by artembondar5
Playwright Retries
artembondar5
•
7 views
Benefits in Software Development by John Valentino
Benefits in Software Development
John Valentino
•
6 views
Top-5-production-devconMunich-2023-v2.pptx by Tier1 app
Top-5-production-devconMunich-2023-v2.pptx
Tier1 app
•
9 views
Bootstrapping vs Venture Capital.pptx by Zeljko Svedic
Bootstrapping vs Venture Capital.pptx
Zeljko Svedic
•
16 views
tecnologia18.docx by nosi6702
tecnologia18.docx
nosi6702
•
6 views
Structuring web applications with Backbone.js
1.
Structuring web applications with Backbone.js Diego Cardozo github.com/diegocard/backbone-presentation
2.
Goals This presentation isn't only a Backbone tutorial We'll focus on complex client design Using Backbone as the main tool Most concepts won't be tool-specific Can be applied to other tools like Angular or Knockout We'll learn Backbone through examples
3.
What do I want you to learn? Useful concepts for complex web client design Basic Backbone knowledge Motivation to keep learning For those who already know Backbone Good practices Combination with other tools
4.
Agenda 1. Introduction 2. Architecture 3.
Example 4. Backbone components 5. Structuring a web application
5.
Introduction (1) Web clients have better resources every day We can now build smart clients But complex applications with jQuery... Are hard to build Lack structure Do not favor reutilization Creating your own structure is reinventing the wheel
6.
Introduction (2)
7.
Introduction (3) Backbone gives us Structure for our client-side JavaScript code Several utilities Basically, it is a MV* framework We organize code in different components Models Collections Views Templates Routers
8.
Architecture (1)
9.
Architecture (2) Advantages Maintainability Load distribution Quicker start to the development process UI is only another client Great for testing Perfect for combining with mobile apps
10.
Examplegithub.com/diegocard/backbone-presentation/demo
11.
Components (1) Model var User = Backbone.Model.extend({ urlRoot: '/users' });
12.
Components (2) Collection var Users = Backbone.Collection.extend({ url: '/users' });
13.
Components (3) View var UserListView = Backbone.View.extend({ el: '.page', render: function () { var that = this; var users = new Users(); users.fetch({ success: function (users) { var template = _.template( $('#user-list-template').html(), {users: users.models} ); that.$el.html(template); } }) } });
14.
Components (4) Event handling var UserEditView = Backbone.View.extend({ el: '.page', events: { 'submit .edit-user-form': 'saveUser', 'click .delete': 'deleteUser' }, saveUser: function (ev) { var userDetails = $(ev.currentTarget).serializeObject(); var user = new User(); user.save(userDetails, { success: function (user) { router.navigate('', {trigger:true}); } }); } });
15.
Components (5) Template <script type="text/template" id="user-list-template"> <a href="#/new" class="btn btn-primary">New</a> <hr /> <table class="table striped"> <thead> <tr> <th>First Name</th><th>Last Name</th><th>Age</th><th></th> </tr> </thead> <tbody> <% _.each(users, function(user) { %> <tr> <td><%= htmlEncode(user.get('firstname')) %></td> <td><%= htmlEncode(user.get('lastname')) %></td> <td><%= htmlEncode(user.get('age')) %></td> <td><a class="btn" href="#/edit/<%= user.id %>">Edit</a></td> </tr> <% }); %> </tbody> </table> </script>
16.
Components (6) Router var Router = Backbone.Router.extend({ routes: { "": "home", "edit/:id": "edit", "new": "edit", } });
17.
Structure (1) Using backbone doesn't guarantee good practices We need to organize and modularize our application We can use Require.js to achieve this I found a great example at: backbonetutorials.com/organizing-backbone-using-modules
18.
Structure (2) Suggested structure Root ├── imgs ├── css │ └── style.css ├── templates │ ├── projects │ │ ├── list.html │ │ └── edit.html │ └── users │ ├── list.html │ └── edit.html ├── js │ ├── libs │ │ ├── jquery │ │ │ ├── jquery.min.js │ │ ├── backbone │ │ │ ├── backbone.min.js │ │ └── underscore │ │ │ ├── underscore.min.js │ ├── models │ │ ├── users.js
19.
Structure (3) Example: Proyect list define([ 'jquery', 'underscore', 'backbone', // Using the text! plugin for Require.js, // we can load templates as plain text 'text!templates/project/list.html' ], function($, _, Backbone, projectListTemplate){ var ProjectListView = Backbone.View.extend({ el: $('#container'), render: function(){ // Compile the template with underscore // and add the template to the view element var data = {}; var compiledTemplate = _.template(projectListTemplate, data); this.$el.append(compiledTemplate); } }); return ProjectListView; // Return the view });
20.
Resources backbonejs.org backbonetutorials.com addyosmani.github.io/backbone-fundamentals github.com/diegocard/backbone-presentation
21.
¿Questions?