SlideShare a Scribd company logo
Front End Workshops
IX. MVC & Backbone.js
Andrés Lamilla
alamilla@visual-engin.com
Overview
● MVC
● BackboneJS
● MarionetteJS
● Marionette Inspector
● Examples
MVC
● Architectural design pattern
● Encourages improved application organization
through a separation of concerns
● Isolation of business data (models) from user
interfaces (views) and logic (controllers)
MVC
MVC separates the concerns in an application into
three parts:
● Models represent the domain-specific knowledge
and data in an application. Models can notify
observers when their state changes.
● Views typically constitute the user interface in an
application (templates). They observe models, but
don’t directly communicate with them.
● Controllers handle input (clicks or user actions) and
update models.
Smalltalk-80 MVC
Trygve Reenskaug designed this pattern while he
was working on Smalltalk-80 (1979).
His idea was to separate the application logic from
the user interface.
Smalltalk-80 MVC
● model ignorant of the user interface (views and
controllers)
● Presentation was taken care of by the view and
the controller
● The controller’s role in this pair was handling
user input
● The Observer pattern was used to update the
view whenever the model changed
MVC-like in Ruby on Rails (RoR)
Although there’s a clear separation of concerns that is
MVC-like in Rails, it is actually using a different pattern
called Model2.
Server-side MVC
Client-Side MVC
BackboneJS
BackboneJS
● It is a lightweight library designed for
developing single-page web applications.
● Was created by Jeremy Ashkenas, who is also
known for CoffeeScript and Underscore.js
Used by
Used by
Used by
Models
Models (initialize)
Models (Default values)
Models (Get)
Models (Set)
Models (Listening for Changes)
Views
Collections
Models (RESTful)
Routers
BackboneJS
BackboneJS
● Backbone is not a complete framework. It gives
us the core constructs that we need to build
small to midsize apps.
● There are several frameworks build on top of
Backbone that are suitable for large applications.
Chaplin, Marionette and Thorax are the most
used.
MarionetteJS
● It is a composite application library that aims to simplify
the construction of large-scale applications
● Allows you to scale applications out with modular,
event-driven architecture
● Reduces boilerplate for views, with specialized view
types
● Allows you to compose your application’s visuals at
runtime, with region and layout ...
● Includes built-in memory management and zombie
killing in views, regions, and layouts
● Provides built-in event cleanup with the EventBinder
Reducing Boilerplate with Marionette
Memory Management with Marionette
Memory Management with Marionette
Memory Management with Marionette
Marionette’s views provide a
close event, in which the
event bindings that are set
up with the listenTo are
automatically removed
Memory Management with Marionette
Marionette Inspector
Debug Marionette Apps:
http://marionettejs.com/inspector/
Test app:
http://www.marionettewires.com/#colors
Examples
http://develop.mostsearchedcelebrity.com
user: test@test.com
pass: 123
Code: https://github.com/alamillac/mostWanted
Workshop 9: BackboneJS y patrones MVC

More Related Content

PDF
Workshop 16: EmberJS Parte I
PDF
Workshop 22: React-Redux Middleware
PDF
Workshop 13: AngularJS Parte II
PDF
Angularjs architecture
PDF
AngularJS with RequireJS
PDF
AngularJS application architecture
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
PPTX
The AngularJS way
Workshop 16: EmberJS Parte I
Workshop 22: React-Redux Middleware
Workshop 13: AngularJS Parte II
Angularjs architecture
AngularJS with RequireJS
AngularJS application architecture
AngularJS - What is it & Why is it awesome ? (with demos)
The AngularJS way

What's hot (20)

PDF
Introduction to AngularJS
PDF
AngularJS introduction
PDF
Advanced Tips & Tricks for using Angular JS
PPTX
Angular JS - Introduction
PPTX
Introduction to Angularjs
PPTX
AngularJS Beginners Workshop
ODP
Angularjs
PDF
Angularjs - lazy loading techniques
PDF
Introduction of angular js
PPTX
Single Page Applications with AngularJS 2.0
PPTX
Why angular js Framework
PPTX
AngularJS Best Practices
PPTX
Angularjs Basics
PPTX
Practical AngularJS
PPTX
AngularJS intro
PPTX
Angular Lazy Loading and Resolve (Route Resolver)
PPTX
AngularJS - Architecture decisions in a large project 
PDF
An Introduction To Testing In AngularJS Applications
PPTX
5 angularjs features
PDF
AngularJS 101 - Everything you need to know to get started
Introduction to AngularJS
AngularJS introduction
Advanced Tips & Tricks for using Angular JS
Angular JS - Introduction
Introduction to Angularjs
AngularJS Beginners Workshop
Angularjs
Angularjs - lazy loading techniques
Introduction of angular js
Single Page Applications with AngularJS 2.0
Why angular js Framework
AngularJS Best Practices
Angularjs Basics
Practical AngularJS
AngularJS intro
Angular Lazy Loading and Resolve (Route Resolver)
AngularJS - Architecture decisions in a large project 
An Introduction To Testing In AngularJS Applications
5 angularjs features
AngularJS 101 - Everything you need to know to get started
Ad

Viewers also liked (13)

PDF
Workshop 10: ECMAScript 6
PDF
Workshop 5: JavaScript testing
PDF
Workshop 8: Templating: Handlebars, DustJS
PDF
Workshop 14: AngularJS Parte III
PPSX
03 09-2010 - pp - promoção
PDF
Workshop 15: Ionic framework
PDF
Workshop 7: Single Page Applications
PPSX
Power point perumahan
PDF
Workshop 12: AngularJS Parte I
PPTX
Persiapan proyek
PDF
MEMULAI BISNIS PROPERTI, MENJADI MINI DEVELOPER
PDF
Presentasi
PDF
Marketing Plan for Property
Workshop 10: ECMAScript 6
Workshop 5: JavaScript testing
Workshop 8: Templating: Handlebars, DustJS
Workshop 14: AngularJS Parte III
03 09-2010 - pp - promoção
Workshop 15: Ionic framework
Workshop 7: Single Page Applications
Power point perumahan
Workshop 12: AngularJS Parte I
Persiapan proyek
MEMULAI BISNIS PROPERTI, MENJADI MINI DEVELOPER
Presentasi
Marketing Plan for Property
Ad

Similar to Workshop 9: BackboneJS y patrones MVC (20)

PPTX
Single Page Application Development with backbone.js and Simple.Web
PPTX
MVC & backbone.js
PPTX
Marionette talk 2016
PPTX
Give your web apps some backbone
PPTX
Planbox Backbone MVC
PPTX
MV* presentation frameworks in Javascript: en garde, pret, allez!
PPSX
Introduction to backbone_js
PDF
Make your Backbone Application dance
PPTX
Javascript for Wep Apps
PPTX
Backbone/Marionette recap [2015]
PDF
Rp 6 session 2 naresh bhatia
PDF
Backbone.js slides
PDF
Developing Backbonejs Applications Early Release Addy Osmani
PPTX
Building SPA’s (Single Page App) with Backbone.js
PPTX
Backbone.js
PPTX
Front-end rich JavaScript application creation (Backbone.js)
PDF
Intro to BackboneJS + Intermediate Javascript
PDF
Developing Backbone js Applications Addy Osmani
PDF
Instant download Developing Backbone js Applications Addy Osmani pdf all chapter
PDF
Developing Backbone js Applications Addy Osmani
Single Page Application Development with backbone.js and Simple.Web
MVC & backbone.js
Marionette talk 2016
Give your web apps some backbone
Planbox Backbone MVC
MV* presentation frameworks in Javascript: en garde, pret, allez!
Introduction to backbone_js
Make your Backbone Application dance
Javascript for Wep Apps
Backbone/Marionette recap [2015]
Rp 6 session 2 naresh bhatia
Backbone.js slides
Developing Backbonejs Applications Early Release Addy Osmani
Building SPA’s (Single Page App) with Backbone.js
Backbone.js
Front-end rich JavaScript application creation (Backbone.js)
Intro to BackboneJS + Intermediate Javascript
Developing Backbone js Applications Addy Osmani
Instant download Developing Backbone js Applications Addy Osmani pdf all chapter
Developing Backbone js Applications Addy Osmani

More from Visual Engineering (20)

PDF
Workshop 27: Isomorphic web apps with ReactJS
PDF
Workshop iOS 4: Closures, generics & operators
PDF
Workshop iOS 3: Testing, protocolos y extensiones
PDF
Workshop iOS 2: Swift - Structures
PDF
Workhop iOS 1: Fundamentos de Swift
PDF
Workshop 26: React Native - The Native Side
PDF
Workshop 25: React Native - Components
PDF
Workshop 24: React Native Introduction
PDF
Workshop 23: ReactJS, React & Redux testing
PDF
Workshop 22: ReactJS Redux Advanced
PDF
Workshop 21: React Router
PDF
Workshop 20: ReactJS Part II Flux Pattern & Redux
PDF
Workshop 19: ReactJS Introduction
PDF
Workshop 18: CSS Animations & cool effects
PDF
Workshop 17: EmberJS parte II
PDF
Workshop 11: Trendy web designs & prototyping
PDF
Workshop 6: Designer tools
PDF
Workshop 4: NodeJS. Express Framework & MongoDB.
PDF
Workshop 3: JavaScript build tools
PDF
Workshop 2: JavaScript Design Patterns
Workshop 27: Isomorphic web apps with ReactJS
Workshop iOS 4: Closures, generics & operators
Workshop iOS 3: Testing, protocolos y extensiones
Workshop iOS 2: Swift - Structures
Workhop iOS 1: Fundamentos de Swift
Workshop 26: React Native - The Native Side
Workshop 25: React Native - Components
Workshop 24: React Native Introduction
Workshop 23: ReactJS, React & Redux testing
Workshop 22: ReactJS Redux Advanced
Workshop 21: React Router
Workshop 20: ReactJS Part II Flux Pattern & Redux
Workshop 19: ReactJS Introduction
Workshop 18: CSS Animations & cool effects
Workshop 17: EmberJS parte II
Workshop 11: Trendy web designs & prototyping
Workshop 6: Designer tools
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 3: JavaScript build tools
Workshop 2: JavaScript Design Patterns

Recently uploaded (20)

PPTX
history of c programming in notes for students .pptx
PDF
medical staffing services at VALiNTRY
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
AI in Product Development-omnex systems
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Nekopoi APK 2025 free lastest update
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Introduction to Artificial Intelligence
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
history of c programming in notes for students .pptx
medical staffing services at VALiNTRY
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Operating system designcfffgfgggggggvggggggggg
Design an Analysis of Algorithms II-SECS-1021-03
AI in Product Development-omnex systems
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
2025 Textile ERP Trends: SAP, Odoo & Oracle
Nekopoi APK 2025 free lastest update
CHAPTER 2 - PM Management and IT Context
Introduction to Artificial Intelligence
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
ISO 45001 Occupational Health and Safety Management System
How Creative Agencies Leverage Project Management Software.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Design an Analysis of Algorithms I-SECS-1021-03
Odoo POS Development Services by CandidRoot Solutions
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf

Workshop 9: BackboneJS y patrones MVC