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

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
 

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
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!
 
PPTX
Give your web apps some backbone
RTigger
 
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
 
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!
 
Give your web apps some backbone
RTigger
 
Ad

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)

PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
NEW-Viral>Wondershare Filmora 14.5.18.12900 Crack Free
sherryg1122g
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 

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