SlideShare a Scribd company logo
Create MVC application
using Backbone js
Presenter: Padmalochan, Mindfire Solutions
Date: 14/04/2014
Presenter: Padmalochan, Mindfire Solutions
Agenda

Why should we use backbone.

Quick review about basics of Backbone.

Preparing server side code.

Getting data efficiently.

Foundation and adding a view.

Client-Side Templating.

Creating app from Scratch.
Presenter: Padmalochan, Mindfire Solutions
SPA

Single Page Applications.

No round tripping

Loads all of resources at one go.

Its a concept not proper defination.

Rich user experience.

Net latency is reduced.

Performance is increased.
Presenter: Padmalochan, Mindfire Solutions
SPA Challenges

Search Engine Optimization.

Lack of tooling and experience.

Working with different browser
Presenter: Padmalochan, Mindfire Solutions
Prerequisites

Basics of Javascript.

HTML,CSS,Web programming knowledge.

JQuery.

FireBug,WebKit.
Required Dependencies

Underscore.

Jquery/Zepto.
Presenter: Padmalochan, Mindfire Solutions
What is Backbone js?
Backbone.js gives structure to web applications
by providing Models with key-value binding and
custom events,Collections with a rich API of
enumerable functions,Views with declarative
event handling, and connects it all to your
existing API over a RESTful JSON interface.
http://backbonejs.org/
Presenter: Padmalochan, Mindfire Solutions
Why to use Backbone

It encourages you to abstract your data into models and
your DOM manipulation into views and bind the two
together using events.

Need to Build complex UI in Browser.

No More jQuery,no need to store data in DOM, store
data in models instead event binding just works.

If what you plan to build is something where the UI
regularly changes how it displays but does not go to the
server to get entire new pages then you probably need
something like Backbone.js.

Provides a structure into client side application
Before and After effects of Backbone
Presenter: Padmalochan, Mindfire Solutions
Presenter: Padmalochan, Mindfire Solutions
Architecture
Pros :
1. Fast
2. Highly Interactive.
3. Scalable
Cons:
1. SEO problem (can't
index)
2. Difficult to test
3. Security issues.
1. Routers
2. Models
3. Collection
4. Views
Presenter: Padmalochan, Mindfire Solutions
Models

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.

Communicate to View through events.

Provide LifeCycle.

Read attribute with get method and write with set method.

Validation – Validate & isValid

Model Identity

Defaults,initialize.

Backbone.Model vs Backbone.Model.extend

Model have save,fetch and destroy methods for synchronizing with the
server
Presenter: Padmalochan, Mindfire Solutions
Collection

Collections group of related model.

Fetch model from server.

Create them and save them back.

Array like object.
Presenter: Padmalochan, Mindfire Solutions
Views

The general idea is to organize your interface into logical views,
backed by models, each of which can be updated independently when
the model changes, without having to redraw the page

Handles Model events as well as DOM events.

All views have associated el property.

$el is a Jquery wrapper.

Every view maps to exact one DOM element

Render the UI as you see fit.

Declarative syntax to register handlers for DOM elements.
Presenter: Padmalochan, Mindfire Solutions
Templating

Underscore.js Template.

Client-side templatating.Templating happens in views render method.

Dynamically build markup from template and some data.

Backbone doesn't have its own templating engine.
Underscore Templates

<%.... %> - execute arbitary code.

<% ...%> - evaluate an expression and render in result inline.

<% ...%> - evaluate an expression and render html escaped in result inline.
Presenter: Padmalochan, Mindfire Solutions
Demo
Presenter: Padmalochan, Mindfire Solutions
Question and
Answer
Presenter: Padmalochan, Mindfire Solutions
Thank you
www.mindfiresolutions.com
https://www.facebook.com/MindfireSolutions
http://www.linkedin.com/company/mindfire-solutions
http://twitter.com/mindfires

More Related Content

PDF
ColdFusion 11 New Features
Mindfire Solutions
 
PPT
Search Engine Optimization
Mindfire Solutions
 
PPTX
Writing HTML5 Web Apps using Backbone.js and GAE
Ron Reiter
 
PDF
Structuring web applications with Backbone.js
Diego Cardozo
 
PPTX
Introduction to MVC Web Framework with CodeIgniter
Pongsakorn U-chupala
 
PPTX
List of 7 popular java frameworks for 2019
kritikumar16
 
PDF
Web Development Presentation
TurnToTech
 
PPT
PHP Frameworks and CodeIgniter
KHALID C
 
ColdFusion 11 New Features
Mindfire Solutions
 
Search Engine Optimization
Mindfire Solutions
 
Writing HTML5 Web Apps using Backbone.js and GAE
Ron Reiter
 
Structuring web applications with Backbone.js
Diego Cardozo
 
Introduction to MVC Web Framework with CodeIgniter
Pongsakorn U-chupala
 
List of 7 popular java frameworks for 2019
kritikumar16
 
Web Development Presentation
TurnToTech
 
PHP Frameworks and CodeIgniter
KHALID C
 

What's hot (20)

PDF
Component based architecture
Zaiyang Li
 
PPS
Codeigniter, a MVC framework for beginner
aminbd
 
PDF
5 best Java Frameworks
Aegis Softtech
 
PDF
Building Web Application Using Spring Framework
Edureka!
 
ODP
JMP103 : Extending Your App Arsenal With OpenSocial
Ryan Baxter
 
PPT
Single Page Application presentation
John Staveley
 
PDF
CodeIgniter - PHP MVC Framework by silicongulf.com
Christopher Cubos
 
PPTX
Lightning web components
Amit Chaudhary
 
PPTX
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
Harbinger Systems - HRTech Builder of Choice
 
PDF
Micro frontend: The microservices puzzle extended to frontend
Audrey Neveu
 
PPTX
MVC & CodeIgniter
Harshit Gupta
 
PDF
JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
PDF
Developing WordPress Plugins : For Begineers
M A Hossain Tonu
 
PDF
5 Evoq Features You Didn't Know Existed
DNN
 
ODP
JMP102 Extending Your App Arsenal With OpenSocial
Ryan Baxter
 
PPTX
Getting Started with Lightning Web Components | LWC | Salesforce
Rahul Malhotra
 
PDF
The Best IBM Bluemix Training From myTectra in Bangalore
myTectra Learning Solutions Private Ltd
 
PDF
DNN Launch Webinar: DNN Platform 8.0 and Evoq 8.3
DNN
 
PPTX
PHP Frameworks & Introduction to CodeIgniter
Jamshid Hashimi
 
PPTX
Give Your Java Apps “The Boot” With Spring Boot And Cloud Foundry
Ryan Baxter
 
Component based architecture
Zaiyang Li
 
Codeigniter, a MVC framework for beginner
aminbd
 
5 best Java Frameworks
Aegis Softtech
 
Building Web Application Using Spring Framework
Edureka!
 
JMP103 : Extending Your App Arsenal With OpenSocial
Ryan Baxter
 
Single Page Application presentation
John Staveley
 
CodeIgniter - PHP MVC Framework by silicongulf.com
Christopher Cubos
 
Lightning web components
Amit Chaudhary
 
JavaScript MVC Frameworks: Backbone, Ember and Angular JS
Harbinger Systems - HRTech Builder of Choice
 
Micro frontend: The microservices puzzle extended to frontend
Audrey Neveu
 
MVC & CodeIgniter
Harshit Gupta
 
JavaCro'14 - Vaadin web application integration for Enterprise systems – Pete...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Developing WordPress Plugins : For Begineers
M A Hossain Tonu
 
5 Evoq Features You Didn't Know Existed
DNN
 
JMP102 Extending Your App Arsenal With OpenSocial
Ryan Baxter
 
Getting Started with Lightning Web Components | LWC | Salesforce
Rahul Malhotra
 
The Best IBM Bluemix Training From myTectra in Bangalore
myTectra Learning Solutions Private Ltd
 
DNN Launch Webinar: DNN Platform 8.0 and Evoq 8.3
DNN
 
PHP Frameworks & Introduction to CodeIgniter
Jamshid Hashimi
 
Give Your Java Apps “The Boot” With Spring Boot And Cloud Foundry
Ryan Baxter
 
Ad

Viewers also liked (20)

PDF
MVC Seminar Presantation
Abhishek Yadav
 
PPTX
Integration of Backbone.js with Spring 3.1
Michał Orman
 
PDF
JAX 2012: Moderne Architektur mit Spring und JavaScript
martinlippert
 
PDF
Firebase and AngularJS
Ladislav Prskavec
 
PDF
Modern Architectures with Spring and JavaScript
martinlippert
 
PDF
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Cheng Ta Yeh
 
PDF
Intro to Front End Development with Angular + Firebase
Ben Drucker
 
PPTX
Node.js Workshop - Sela SDP 2015
Nir Noy
 
PPTX
Rest with Java EE 6 , Security , Backbone.js
Carol McDonald
 
PDF
Burgas Conf 21.06.2014 - Single page application Angularjs and Nodejs
Dimitar Danailov
 
KEY
MVC on the server and on the client
Sebastiano Armeli
 
PPTX
Node js introduction
Joseph de Castelnau
 
PPTX
Introduction to Node js
Akshay Mathur
 
PDF
Best node js course
bestonlinecoursescoupon
 
PDF
AngularJS application architecture
Gabriele Falace
 
PPTX
Introduction to Angularjs
Manish Shekhawat
 
PDF
Node.js 101
FITC
 
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
PDF
AngularJS Basics with Example
Sergey Bolshchikov
 
PPTX
AngularJS Architecture
Eyal Vardi
 
MVC Seminar Presantation
Abhishek Yadav
 
Integration of Backbone.js with Spring 3.1
Michał Orman
 
JAX 2012: Moderne Architektur mit Spring und JavaScript
martinlippert
 
Firebase and AngularJS
Ladislav Prskavec
 
Modern Architectures with Spring and JavaScript
martinlippert
 
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Cheng Ta Yeh
 
Intro to Front End Development with Angular + Firebase
Ben Drucker
 
Node.js Workshop - Sela SDP 2015
Nir Noy
 
Rest with Java EE 6 , Security , Backbone.js
Carol McDonald
 
Burgas Conf 21.06.2014 - Single page application Angularjs and Nodejs
Dimitar Danailov
 
MVC on the server and on the client
Sebastiano Armeli
 
Node js introduction
Joseph de Castelnau
 
Introduction to Node js
Akshay Mathur
 
Best node js course
bestonlinecoursescoupon
 
AngularJS application architecture
Gabriele Falace
 
Introduction to Angularjs
Manish Shekhawat
 
Node.js 101
FITC
 
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
AngularJS Basics with Example
Sergey Bolshchikov
 
AngularJS Architecture
Eyal Vardi
 
Ad

Similar to Creating MVC Application with backbone js (20)

PPSX
Introduction to backbone_js
Mohammed Saqib
 
PDF
Introduction to backbone js
Mindfire Solutions
 
PPTX
BackboneJS Training - Giving Backbone to your applications
Joseph Khan
 
PPTX
MVC & backbone.js
Mohammed Arif
 
PDF
Developing Backbonejs Applications Early Release Addy Osmani
littelenkali
 
PPT
Backbone.js
Knoldus Inc.
 
PDF
Intro to BackboneJS + Intermediate Javascript
Andrew Lovett-Barron
 
ODP
Javascript frameworks: Backbone.js
Soós Gábor
 
PDF
Developing Backbone js Applications Addy Osmani
leitaduminy
 
PPTX
Backbone.js
VO Tho
 
PDF
Instant download Developing Backbone js Applications Addy Osmani pdf all chapter
dinetvenitja
 
PDF
Developing Backbone js Applications Addy Osmani
stegzdf6784
 
PDF
Intro to Backbone.js by Azat Mardanov for General Assembly
Azat Mardanov
 
PPTX
Backbone
Sayed Ahmed
 
PPTX
BackboneJS
Artemii Kravtsov
 
PPTX
Backbone the Good Parts
Renan Carvalho
 
PDF
Developing large scale JavaScript applications
Milan Korsos
 
PDF
[2015/2016] Backbone JS
Ivano Malavolta
 
PPTX
Backbone.js
898RakeshWaghmare
 
DOCX
How backbone.js is different from ember.js?
SoftProdigy - We know software!
 
Introduction to backbone_js
Mohammed Saqib
 
Introduction to backbone js
Mindfire Solutions
 
BackboneJS Training - Giving Backbone to your applications
Joseph Khan
 
MVC & backbone.js
Mohammed Arif
 
Developing Backbonejs Applications Early Release Addy Osmani
littelenkali
 
Backbone.js
Knoldus Inc.
 
Intro to BackboneJS + Intermediate Javascript
Andrew Lovett-Barron
 
Javascript frameworks: Backbone.js
Soós Gábor
 
Developing Backbone js Applications Addy Osmani
leitaduminy
 
Backbone.js
VO Tho
 
Instant download Developing Backbone js Applications Addy Osmani pdf all chapter
dinetvenitja
 
Developing Backbone js Applications Addy Osmani
stegzdf6784
 
Intro to Backbone.js by Azat Mardanov for General Assembly
Azat Mardanov
 
Backbone
Sayed Ahmed
 
BackboneJS
Artemii Kravtsov
 
Backbone the Good Parts
Renan Carvalho
 
Developing large scale JavaScript applications
Milan Korsos
 
[2015/2016] Backbone JS
Ivano Malavolta
 
Backbone.js
898RakeshWaghmare
 
How backbone.js is different from ember.js?
SoftProdigy - We know software!
 

More from Mindfire Solutions (20)

PDF
Physician Search and Review
Mindfire Solutions
 
PDF
diet management app
Mindfire Solutions
 
PDF
Business Technology Solution
Mindfire Solutions
 
PDF
Remote Health Monitoring
Mindfire Solutions
 
PDF
Influencer Marketing Solution
Mindfire Solutions
 
PPT
High Availability of Azure Applications
Mindfire Solutions
 
PPTX
IOT Hands On
Mindfire Solutions
 
PPTX
Glimpse of Loops Vs Set
Mindfire Solutions
 
ODP
Oracle Sql Developer-Getting Started
Mindfire Solutions
 
PPT
Adaptive Layout In iOS 8
Mindfire Solutions
 
PPT
Introduction to Auto-layout : iOS/Mac
Mindfire Solutions
 
PPT
LINQPad - utility Tool
Mindfire Solutions
 
PPT
Get started with watch kit development
Mindfire Solutions
 
PPTX
Swift vs Objective-C
Mindfire Solutions
 
ODP
Material Design in Android
Mindfire Solutions
 
ODP
Introduction to OData
Mindfire Solutions
 
PPT
Ext js Part 2- MVC
Mindfire Solutions
 
PPT
ExtJs Basic Part-1
Mindfire Solutions
 
PPT
Spring Security Introduction
Mindfire Solutions
 
Physician Search and Review
Mindfire Solutions
 
diet management app
Mindfire Solutions
 
Business Technology Solution
Mindfire Solutions
 
Remote Health Monitoring
Mindfire Solutions
 
Influencer Marketing Solution
Mindfire Solutions
 
High Availability of Azure Applications
Mindfire Solutions
 
IOT Hands On
Mindfire Solutions
 
Glimpse of Loops Vs Set
Mindfire Solutions
 
Oracle Sql Developer-Getting Started
Mindfire Solutions
 
Adaptive Layout In iOS 8
Mindfire Solutions
 
Introduction to Auto-layout : iOS/Mac
Mindfire Solutions
 
LINQPad - utility Tool
Mindfire Solutions
 
Get started with watch kit development
Mindfire Solutions
 
Swift vs Objective-C
Mindfire Solutions
 
Material Design in Android
Mindfire Solutions
 
Introduction to OData
Mindfire Solutions
 
Ext js Part 2- MVC
Mindfire Solutions
 
ExtJs Basic Part-1
Mindfire Solutions
 
Spring Security Introduction
Mindfire Solutions
 

Recently uploaded (20)

PDF
Microsoft Teams Essentials; The pricing and the versions_PDF.pdf
Q-Advise
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PPTX
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
PDF
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PDF
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pdf
Certivo Inc
 
PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
PDF
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
PPTX
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
PDF
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
Microsoft Teams Essentials; The pricing and the versions_PDF.pdf
Q-Advise
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PFAS Reporting Requirements 2026 Are You Submission Ready Certivo.pdf
Certivo Inc
 
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
Activate_Methodology_Summary presentatio
annapureddyn
 
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
oapresentation.pptx
mehatdhavalrajubhai
 
Micromaid: A simple Mermaid-like chart generator for Pharo
ESUG
 
Maximizing Revenue with Marketo Measure: A Deep Dive into Multi-Touch Attribu...
bbedford2
 
lesson-2-rules-of-netiquette.pdf.bshhsjdj
jasmenrojas249
 
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 

Creating MVC Application with backbone js

  • 1. Create MVC application using Backbone js Presenter: Padmalochan, Mindfire Solutions Date: 14/04/2014
  • 2. Presenter: Padmalochan, Mindfire Solutions Agenda  Why should we use backbone.  Quick review about basics of Backbone.  Preparing server side code.  Getting data efficiently.  Foundation and adding a view.  Client-Side Templating.  Creating app from Scratch.
  • 3. Presenter: Padmalochan, Mindfire Solutions SPA  Single Page Applications.  No round tripping  Loads all of resources at one go.  Its a concept not proper defination.  Rich user experience.  Net latency is reduced.  Performance is increased.
  • 4. Presenter: Padmalochan, Mindfire Solutions SPA Challenges  Search Engine Optimization.  Lack of tooling and experience.  Working with different browser
  • 5. Presenter: Padmalochan, Mindfire Solutions Prerequisites  Basics of Javascript.  HTML,CSS,Web programming knowledge.  JQuery.  FireBug,WebKit. Required Dependencies  Underscore.  Jquery/Zepto.
  • 6. Presenter: Padmalochan, Mindfire Solutions What is Backbone js? Backbone.js gives structure to web applications by providing Models with key-value binding and custom events,Collections with a rich API of enumerable functions,Views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface. http://backbonejs.org/
  • 7. Presenter: Padmalochan, Mindfire Solutions Why to use Backbone  It encourages you to abstract your data into models and your DOM manipulation into views and bind the two together using events.  Need to Build complex UI in Browser.  No More jQuery,no need to store data in DOM, store data in models instead event binding just works.  If what you plan to build is something where the UI regularly changes how it displays but does not go to the server to get entire new pages then you probably need something like Backbone.js.  Provides a structure into client side application
  • 8. Before and After effects of Backbone Presenter: Padmalochan, Mindfire Solutions
  • 9. Presenter: Padmalochan, Mindfire Solutions Architecture Pros : 1. Fast 2. Highly Interactive. 3. Scalable Cons: 1. SEO problem (can't index) 2. Difficult to test 3. Security issues. 1. Routers 2. Models 3. Collection 4. Views
  • 10. Presenter: Padmalochan, Mindfire Solutions Models  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.  Communicate to View through events.  Provide LifeCycle.  Read attribute with get method and write with set method.  Validation – Validate & isValid  Model Identity  Defaults,initialize.  Backbone.Model vs Backbone.Model.extend  Model have save,fetch and destroy methods for synchronizing with the server
  • 11. Presenter: Padmalochan, Mindfire Solutions Collection  Collections group of related model.  Fetch model from server.  Create them and save them back.  Array like object.
  • 12. Presenter: Padmalochan, Mindfire Solutions Views  The general idea is to organize your interface into logical views, backed by models, each of which can be updated independently when the model changes, without having to redraw the page  Handles Model events as well as DOM events.  All views have associated el property.  $el is a Jquery wrapper.  Every view maps to exact one DOM element  Render the UI as you see fit.  Declarative syntax to register handlers for DOM elements.
  • 13. Presenter: Padmalochan, Mindfire Solutions Templating  Underscore.js Template.  Client-side templatating.Templating happens in views render method.  Dynamically build markup from template and some data.  Backbone doesn't have its own templating engine. Underscore Templates  <%.... %> - execute arbitary code.  <% ...%> - evaluate an expression and render in result inline.  <% ...%> - evaluate an expression and render html escaped in result inline.
  • 15. Presenter: Padmalochan, Mindfire Solutions Question and Answer
  • 16. Presenter: Padmalochan, Mindfire Solutions Thank you