SlideShare a Scribd company logo
From Mess to Success,
Refactoring Large Applications with Backbone
dev.Objective()
May 14, 2015
Stacy London
@stacylondoner
McWay Falls, Julia Pfeiffer Burns State Park - Big Sur, CA - 2015 by Stacy London
About Me
I’ve been making things for the web since 1998.
Currently I’m a Senior Application Architect focused on
Front-End Engineering at Northwestern Mutual.
@stacylondoner
Northwestern Mutual
Northwestern Mutual has been helping families and businesses achieve
financial security for nearly 160 years. Our financial representatives build
relationships with clients through a distinctive planning approach that integrates
risk management with wealth accumulation, preservation and distribution. With
more than $230 billion in assets, $27 billion in revenues, nearly $90 billion in
assets under management and more than $1.5 trillion worth of life insurance
protection in force, Northwestern Mutual delivers financial security to more than
4.3 million people who rely on us for insurance and investment
solutions, including life, disability and long-term care insurance; annuities; trust
services; mutual funds; and investment advisory products and services.
Northwestern Mutual is the marketing name for The Northwestern Mutual Life Insurance Company, Milwaukee, WI, and its
subsidiaries. Northwestern Mutual and its subsidiaries offer a comprehensive approach to financial security solutions including: life
insurance, long-term care insurance, disability income insurance, annuities, investment products, and advisory products and
services. Subsidiaries include Northwestern Mutual Investment Services, LLC, broker-dealer, registered investment adviser,
member FINRA and SIPC; the Northwestern Mutual Wealth Management Company, limited purpose federal savings bank; and
Northwestern Long Term Care Insurance Company.
What do I mean by large application?
• a multi-page web application (MPA) built with ASP.NET
MVC
• 1500+ files | 343,000+ lines of code
• UI (CSS / JS)
• 230+ files | 42,000+ lines of code

Recommended for you

Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks

A quick overview of tips, tricks and code snippets for developers using Symfony and all its ecosystem, from Monolog to Doctrine. Learn how to become more productive and discover some rarely used options and features.

doctrinemonologphp
Creating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of todayCreating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of today

The document discusses creating futuristic interfaces using web technologies like WebSockets, WebGL, and device APIs. It provides examples of syncing device orientation over WebSockets between clients, accessing the device camera with getUserMedia, and using head tracking with headtrackr.js to control the camera in a 3D scene rendered with three.js. Links are included for related projects on Wiimote control, head tracking examples, and touch tracking demos.

web socketsuser experiencewebgl
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave TaylorAtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor

This document discusses how to add metadata to Confluence macros to improve the user experience. It covers adding basic metadata like the macro name, description and icon to make it visible in the macro browser. It also covers adding parameter metadata to generate a user-friendly macro form. JavaScript hooks can be used to further customize the form. The presentation demonstrates these techniques through an example macro and encourages attendees to apply them to their own macros to integrate with the macro browser and improve discoverability.

Development Culture
• JEE/Java shop turned .NET/C#
• view JS as a bit of a “toy” language
• as JS was being added it was just being added without much
thought to maintainability, extensibility, testability, patterns,
etc.
• app was going to be heavy with JS yet initially on a platform
that wasn’t optimized for this kind of app dev.
• path of least resistance was to just put everything in 

$(document).ready()
https://www.youtube.com/watch?v=J---aiyznGQ
http://starecat.com/kermit-typing-on-a-typewriter-like-crazy-animation/
$(document).ready(function() {
});
http://www.wikihow.com/Make-a-Quick-Italian-Spaghetti

Recommended for you

Building Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJSBuilding Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJS

Forget about classic website where UX is not so important. We are living in time where usability is one of the important thing if you are building some business client oriented web service. How to connect Symfony2 as backend and AngularJS as frontend solution? What are best practices? What are disadvantageous? How to take best from both worlds? These are topics I will cover in my talk with real examples.

symfony2single page interfaceangularjs
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...

This document provides summaries of 4 macros: 1. The "response-time" macro displays response time data from a specified page. 2. The "color-table" macro applies alternating row coloring to tables with the "confluenceTable" class. 3. The "watermark" macro adds a watermark image to the page with options to specify the image, repetition, and minimum height. 4. The "draft-watermark" macro inserts a "Draft" watermark image on the page by calling the "watermark" macro.

summitconfluenceatlassian
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...

No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluence Charles Hall, Astrium & Jim Severino, Atlassian

atlassiansummit 2010
Problems
• one large JavaScript file in the <head> (all code included
on every page regardless if it needed it)
• all JavaScript global and in $(document).ready()
• some pages had inline JavaScript
• not commented
• no unit tests
• unclear if a function / event was used on multiple pages
Iterative Refactoring
• big codebase
• large team working on 2 week sprints that couldn’t be
slowed down
• refactors had to fit into a sprint
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.js

Recommended for you

Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack

Webpack tutorial with tips for Symfony users. Topics covered include: current frontend trends, setup, loaders, dev tools, optimization in production, bundle splitting and tips and tricks for using webpack with existing projects. Symfony Munich Meetup 2016.

webpackfrontendsymfony
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns

The document discusses different patterns for handling asynchronous code in JavaScript: callbacks, promises, and AMD (Asynchronous Module Definition). It outlines issues with nested callbacks and inflexible APIs. Promises and AMD aim to address these by allowing composition of asynchronous operations and defining module dependencies. The document provides examples of implementing PubSub with events, making and piping promises, and using AMD to load dependencies asynchronously. It concludes that callbacks should generally be avoided in favor of promises or AMD for asynchronous code.

javascript
WebcampZG - Rails 4
WebcampZG - Rails 4WebcampZG - Rails 4
WebcampZG - Rails 4

The document discusses the key changes in Rails 4.0. Some of the major new features include strong parameters for mass assignment protection, streaming responses using ActionController::Live, background job handling via ActiveSupport::Queue, and routing concerns to DRY up routes. Some existing features that have been improved include ActiveRecord::Relation to allow chaining of queries, caching with cache digests to automatically invalidate caches, and various performance improvements. A number of older and deprecated features have also been removed.

web devel
Refactor, Iteration 1: Break Apart JS
• figure out what JS belongs with each page and move
that JS into a separate file for that page
• include that JS with the partial HTML
Refactor, Iteration 1: Start Adding Unit Tests
• start adding unit tests for original code then make sure it
passed after refactoring as a safety/confidence
mechanism
• to prepare for this journey of breaking code into smaller,
more testable chunks it was good to start early with
creating a test bed
• help make subsequent refactors less stressful
Refactor, Iteration 1: Start Adding Unit Tests
• picked Jasmine (BDD style) - http://
jasmine.github.io/
• a lot of the JS tied to DOM manipulation so not in
an ideal state for unit testing with Jasmine out of
the box
• needed DOM testing helper so added jquery-
jasmine library to add fixtures (HTML snippets
to run tests against)
• no external UI Regression tools (e.g. Selenium) in a
state to do this validation throughout the refactor
Refactoring Large Web Applications with Backbone.js

Recommended for you

Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...

This document discusses using AngularJS to build single page applications for WordPress admin interfaces that use the WordPress REST API. It covers why this approach is beneficial, how to set it up using Angular routing, controllers, factories and HTTP requests to interact with the REST API. Benefits mentioned include making WordPress interfaces more modern and dynamic, empowering others to build plugins in a decentralized way, and the ease of transitioning to software as a service models. The document encourages readers to learn Angular and check out additional resources on the topic.

wordpressangularjavascript
Angular js
Angular jsAngular js
Angular js

The document provides an overview of AngularJS, including its core concepts and how it can be used with Java frameworks like Spring, Struts, and Hibernate. AngularJS is an open-source JavaScript framework that assists with building single-page applications using MVC architecture. It allows developers to specify custom HTML tags and directives to control element behavior. The document then discusses key AngularJS concepts like data binding, directives, expressions, filters, controllers, dependency injection, views/routing, and services. It provides examples of how these concepts work and how AngularJS can integrate with Java frameworks in a sample reader application divided into multiple sub-projects.

JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"

28.03.15. Одесса. Impact Hub Odessa. Конференция JSLab. Алексей Волков. "React на практике" Доклад освещает практические аспекты использования React.js в различном окружении. React и модели Backbone. React и таблицы стилей, а также React в мобильном вебе. Будет полезно как и тем, кто только интересуется этой библиотекой, а также опытным разработчикам. Подробнее: http://geekslab.co/ https://www.facebook.com/GeeksLab.co https://www.youtube.com/user/GeeksLabVideo

javascriptodessa
Refactoring Large Web Applications with Backbone.js
Refactor, Iteration 2: Namespacing & Object Literal
• create an app namespace to get custom code out of the global
namespace (window) to avoid collisions with external libs/
frameworks
• introduce an Object Literal notation style in preparation for
Backbone (which uses this pattern)
• helps to organize the code and parameters logically

“an object containing a collection of key:value pairs with a colon
separating each pair of keys and values where keys can also
represent new namespaces”
• add closures with Instantly Invoked Function Expressions
(IIFEs)
https://gist.github.com/stacylondon
;
var myApp = myApp || {};
(function($, myApp) {
'use strict';
$.extend(myApp, {
init: function() {
this.commonStuff();
},
commonStuff: function() {
// common code across many or all pages
}
});
})(window.jQuery, window.myApp);
$(document).ready(function() {
myApp.init();
});
my-app.js

Recommended for you

Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016

The document discusses asynchronous programming in JavaScript and how it has evolved over time. It covers callbacks, promises, generators, and the new async/await syntax. Callbacks were difficult to read and handle errors across steps. Promises provided a better model but still had ceremony and didn't play nicely with other constructs. Generators allowed writing async code that looked synchronous but required wrapping in a promise. Async/await builds on promises and generators by providing syntax that looks like synchronous code while still being asynchronous under the hood. It addresses issues with previous approaches but developers still need to handle errors and can overuse await. Async/await is available in modern browsers and makes asynchronous JavaScript much cleaner.

codemotion milan 2016
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance

Talk at HTMl5DevConf on April 1, 2013 about IndexedDB, Plugins for IndexedDB and performance analysis of IndexedDB.

html5dev confindexeddb
How to React Native
How to React NativeHow to React Native
How to React Native

This document provides an overview of how to build applications with React Native. It discusses React Native's core components like React, ReactDOM and React Native. It also covers topics like JavaScript implementation, building components, styles, platform specific code, animations, navigation libraries and working with data using Redux.

react nativereactredux-saga
my-app.js
with comments
// prefix with semi-colon as safety net against concatenated
// scripts and/or other plugins that are not closed properly
;
// check for existence of myApp in the global namespace
var myApp = myApp || {};
// Use IIFE to:
// * encapsulate app logic to protect it from global namespace
// * pass in namespace so can be modified locally and isn't
// overwritten outside of our function context
// * ensure $ only refers to window.jQuery (defensive programming)
// * $ passed through as local var rather than as globals and this
// (slightly) quickens the resolution process and can be more
// efficiently minified (especially if regularly referenced)
(function($, myApp) {
my-app.js
with comments
(function($, myApp) {
// Strict mode makes several changes to normal JavaScript semantics:
// * eliminates some JS silent errors by changing them to throw errors.
// * fixes mistakes that make it difficult for JavaScript engines to
// perform optimizations: strict mode code can sometimes be made to
// run faster than identical code that's not strict mode. Add inside
// the IIFE so it's defined for just the functions defined within and
// doesn't flip concatenating/minified code to strict inadvertently
'use strict';
// extend the namespace with more functionality
$.extend(myApp, {
;
var myApp = myApp || {};
myApp.pageOne = myApp.pageOne || {};
(function($, myApp) {
'use strict';
$.extend(myApp.pageOne, {
init: function() {
this.pageSpecificStuff();
},
pageSpecificStuff: function() {
// code specific to this page
}
});
})(window.jQuery, window.myApp);
$(document).ready(function() {
myApp.pageOne.init();
});
page-one.js
Better but not great
• code is aligned with the screen to which is pertains
• pages now have mid-page script includes which isn’t
good for performance / rendering
• still hand-wiring Ajax calls
• entire-page-JS is not very modular
• want to break screens down into smaller features and
keep events neatly associated

Recommended for you

Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applications

It’s trivial today to start writing and debugging some React code, but it’s not 100% clear how to properly deploy the application, manage versions and what implications that has on the build configurations. Especially if you want to allow different versions for different users in order to perform some A/B testing, testing new features in production environment, come up with some UI experiments, or gradually roll out new features for a subset of users. In this presentation I hopefully covered all that.

Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - Appengine

Google App Engine provides a platform for building and hosting scalable web applications. It allows developers to write applications in Python, Java, Go or PHP and handle all the complexities of scaling an application. The document demonstrates building a simple Stack Overflow clone called App Overflow on App Engine, including adding user authentication, storing and querying data, and using services like Memcache, Images and Task Queue. It also discusses how App Engine handles scalability automatically through its distributed architecture and services.

python irelandpythonappengine
170209 apm shipley capability briefing-esp v073-cliente
170209 apm shipley capability briefing-esp v073-cliente170209 apm shipley capability briefing-esp v073-cliente
170209 apm shipley capability briefing-esp v073-cliente

Este documento presenta las capacidades combinadas de APM y Shipley para ayudar a las organizaciones a ganar más propuestas y desarrollar negocios de manera más efectiva. Resume las visiones y propuestas de valor de ambas compañías, así como sus credenciales trabajando con grandes clientes. Propone una colaboración entre APM y Shipley para ofrecer servicios integrales de desarrollo de negocios, ventas y captura de oportunidades.

propuestaswinganar
Backbone to the rescue
• wanted something that provided/enforced structure but in a
lightweight way
• it’s a MPA not a SPA so full-featured SPA frameworks didn’t make
sense (e.g. Angular, Ember)
• wanted to be able to use just a small feature of the library/
framework and add more full integration over time (refactor in
multiple iterations)
• for these reasons Backbone.js made sense - http://backbonejs.org/
Refactoring Large Web Applications with Backbone.js
Refactor, Iteration 3: Page Level Backbone Views
• reducing boilerplate code
• views enforce organization of events
• views enforce an Object Literal notation pattern
• views helped developers think about encapsulating pieces of the
screen
• starting with just Views gave the team time to start planning for
refactoring back-end data provided by ASP.NET MVC Controllers
into more RESTful web services (Web API) which is necessary to
take full advantage of Backbone.js Models/Collections
Refactor, Iteration 3: Page Level Backbone Views
• my-app.js - is now responsible for instantiating the app
namespace and setting up a super light-weight view
manager for Backbone.js
• instantiate all available views on the page upon DOM
ready.
• page-one-view.js - no longer namespaced individually
since being added to the views object of the app
namespace

Recommended for you

Interesting Concept Yachts
Interesting Concept YachtsInteresting Concept Yachts
Interesting Concept Yachts

This short document promotes creating presentations using Haiku Deck, a tool for making slideshows. It encourages the reader to get started making their own Haiku Deck presentation and sharing it on SlideShare. In just one sentence, it pitches the idea of using Haiku Deck to easily design slideshows.

haikudeck
sadia'CV
sadia'CVsadia'CV
sadia'CV

Sadia Manzoor has over 10 years of experience in marketing, merchandising, and human resources for textile companies. She held positions at ASCO International, Shama Export, and Unicore International where her responsibilities included market research, sales planning, customer communication, cost analysis, and training HR staff. Sadia has a Master's degree in Political Science and Bachelor's degrees in Psychology, Islamic Studies, and Education. She is proficient in English communication and Microsoft Office.

chuyên làm clip quảng cáo tốt giá rẻ
chuyên làm clip quảng cáo tốt giá rẻchuyên làm clip quảng cáo tốt giá rẻ
chuyên làm clip quảng cáo tốt giá rẻ
Refactoring Large Web Applications with Backbone.js
my-app.js
var myApp = myApp || {};
(function($, myApp) {
'use strict';
$.extend(myApp, {
init: function() {
this.initializeViews();
},
// view manager code
});
})(window.jQuery, window.myApp);
$(document).ready(function() {
myApp.init();
});
my-app.js
view manager
views: {},
initializeViews: function() {
for (var view in this.views) {
if (typeof this.views[view] === 'function') {
this.views[view.substring(0, 1).toLowerCase() +
view.substring(1, view.length)] = new this.views[view]();
}
}
},
addView: function(key, view) {
if (this.views.hasOwnProperty(key)) {
throw (new Error('A view with that key already exists.'));
}
this.views[key] = view;
},
getView: function(key) {
if (!this.views.hasOwnProperty(key)) {
throw new Error('View does not exist in views collection.');
}
return this.views[key];
}
page-one-view.js;
(function($, _, Backbone, myApp) {
'use strict';
var PageOneView = Backbone.View.extend({
el: '#pageOneMainContainer',
events: {
'click .something': 'doSomething'
},
initialize: function() {
this.setupValidation();
},
setupValidation: function() {
},
doSomething: function() {
}
});
myApp.addView('PageOneView', PageOneView);
}(window.jQuery, window._, window.Backbone, window.myApp));

Recommended for you

Sụn khớp hư tổn làm khớp mau thoái hóa
Sụn khớp hư tổn làm khớp mau thoái hóaSụn khớp hư tổn làm khớp mau thoái hóa
Sụn khớp hư tổn làm khớp mau thoái hóa
Storie comuni
Storie comuniStorie comuni
Storie comuni

Storie Comuni - ForumPa

Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAh
Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAhEr Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAh
Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAh

Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAhhby: Allen Weber&#13;&...

Refactoring Large Web Applications with Backbone.js
Refactor, Iteration 4: Sub-Page Backbone Views
• start breaking the large page views into sub-page views
so that you can get truly modular
• share modules/code if a module exists on more than
one page
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.js

Recommended for you

Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation

This short document promotes the creation of Haiku Deck presentations on SlideShare by stating it provides inspiration and allows users to get started making their own Haiku Deck presentations.

haikudeck
Portfolio
PortfolioPortfolio
Portfolio

The document provides details about Hope Crosson's internship at the Matthews House, where she gained experience in various social work roles like advocating, counseling, and researching. Hope reflects on learning the importance of supervision, developing self-care strategies, and continuing her education to advance her social work career. The internship prepared Hope for independent social work practice while seeking ongoing advice and guidance.

Refactor, Iteration 5: Backbone Models, Collections
• move code that is getting data and doing any business
logic out of the Views and into Models and Collections
• e.g. move phone number formatting out of View and
into the Model
• remove hand written Ajax, use BB API (e.g. fetch)
• make sure server side controllers were written in a
RESTful way
• still not complete across the application
Refactoring Large Web Applications with Backbone.js
var PageOneView = Backbone.View.extend({
el: '#pageOneMainContainer',
initialize: function() {
this.getSomeData();
},
getSomeData: function() {
var self = this;
$.ajax({
type: 'GET',
url: 'SomeEndpoint',
data: formData,
dataType: 'json',
success: function(data, textStatus, jqXHR) {
self.displayResults(data);
},
error: function(jqXHR, textStatus, errorThrown) {
self.displayError();
}
});
},
displayResults: function(data) {
},
displayError: function() {
}
});
Hand-wiring Ajax
Use Backbone.js API
to get data
// initialize view
var pageOneView = new PageOneView({
collection: new PageOneCollection([]),
});
var PageOneView = Backbone.View.extend({
el: '#pageOneMainContainer',
template: _.template($('#page-one-template').html()),
initialize: function() {},
render: function() {
this.$el.html(this.template({'collection': this.collection}));
// maintain chainability
return this;
}
});
var PageOneCollection = Backbone.Collection.extend({
initialize: function(models, options) {},
model: PageOneModel,
// RESTful web service URL
url: '/SomeEndpoint'
});

Recommended for you

7 Managed services
7 Managed services7 Managed services
7 Managed services

The document discusses various recruitment outsourcing solutions offered by NES Global Talent, including: 1) Managed services that allow clients to outsource all or part of their recruitment processes to improve performance and quality. 2) Contingent workforce solutions that manage a client's entire contract staffing activity under a single operation. 3) Permanent recruitment process outsourcing (RPO) that allows clients to outsource direct hiring to access a global talent pool. 4) Fully integrated RPO that incorporates a client's contract, permanent, graduate, and executive hiring into a single outsourced solution.

Referral specialist performance appraisal
Referral specialist performance appraisalReferral specialist performance appraisal
Referral specialist performance appraisal

Referral specialist job description,Referral specialist goals & objectives,Referral specialist KPIs & KRAs,Referral specialist self appraisal

Feedback
FeedbackFeedback
Feedback

This document summarizes feedback from a survey on a title card for a film trailer. 65% of respondents did not like the title card because it was too busy and messy. Suggestions for improving the title card included having the text pop onto the screen unexpectedly, flash in and out while moving from place to place, or fade onto the screen with shadows. Respondents also thought adding special effects like fog or smoke would make the title card more interesting. Based on this feedback, the creator plans to simplify the background but add movement like shadows, fog or smoke and make the text appear and disappear on the screen.

Refactoring Large Web Applications with Backbone.js
Refactor, Iteration 6: Mini-SPA
• treat each page of the multi-page app (MPA) like it’s a
miniature single page app (SPA)
• each page has a single entry point (main.js)
• this will setup the code for a module loader / build system
so that we can finally move the JS to the bottom of the
page and remove mid-page scripts
• improve performance (time to first paint - how long it
takes between a user entering a URL into the browser
and when he/she sees visual activity on screen)
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.js

Recommended for you

Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015
Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015
Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015

This thesis explores factors related to meaningful use of electronic medical records (EMRs) in family practice clinics in Alberta, Canada. A survey was conducted using the Innovation Implementation scale and a Meaningful EMR Use scale to measure EMR use and implementation factors. Implementation climate, which refers to the perception that EMR use is expected and rewarded, was found to be the most important predictor of high EMR use. Barriers to EMR implementation cited in previous research, such as financial concerns and lack of technical support, were not as significant as expected. The results provide insight into optimizing EMR adoption through supportive implementation climates.

الموازنة العامة
الموازنة العامةالموازنة العامة
الموازنة العامة
ARTE UNICO LOOKBOOK
ARTE UNICO LOOKBOOKARTE UNICO LOOKBOOK
ARTE UNICO LOOKBOOK

Arte Unico is a jewelry project that aims to gather unique creations by talented designers to create masterpieces that can compete with fine arts. The jewelry reflects women and expresses their mood. The creators imbue their own stories, thoughts, and ideas into the pieces. Arte Unico has created a new vision and philosophy in jewelry that views pieces not just as objects but as parts of the soul.

arte unico lookbook
Refactoring Large Web Applications with Backbone.js
Refactor, Iteration 7: Modules
• current version of JavaScript (ECMA-262) doesn’t provide a
way to import modules of code like more traditional
programming languages do
• modules are proposed for the next version of JS (ES6/
ES2015/Harmony)
• to use modules and manage dependencies with the current
version of JS you can use community driven methodologies
• there are two popular styles with associated script
loaders / build systems
Refactoring Large Web Applications with Backbone.js
Refactor, Iteration 7: Modules - AMD
• AMD - Asynchronous Module Definition



“The Asynchronous Module Definition (AMD) API
specifies a mechanism for defining modules such that the
module and its dependencies can be asynchronously
loaded. This is particularly well suited for the browser
environment where synchronous loading of modules
incurs performance, usability, debugging, and cross-
domain access problems.”

https://github.com/amdjs/amdjs-api/wiki/AMD

Recommended for you

Thai Hoa Dot Song Co
Thai Hoa Dot Song CoThai Hoa Dot Song Co
Thai Hoa Dot Song Co
Future comms - the last will and testament of #ukhousing
Future comms - the last will and testament of #ukhousingFuture comms - the last will and testament of #ukhousing
Future comms - the last will and testament of #ukhousing

This is the fifth and last of the main sessions we hosted at House Party 15. We are publishing a slideshare for each of the main sessions. Once completed we'll be asking for participants to explore or test the models. This session focused on: If we started communicating again - what would be the new rules?

house partyaffordable housingcommunication
Sivakumar Resume
Sivakumar ResumeSivakumar Resume
Sivakumar Resume

The document provides a resume for G.Sivakumar, an experienced product support and customer relations professional with over 16 years of experience working with analytical instruments such as DSC, TGA, and rheometers. It details his educational background and qualifications, skills, professional experience in roles such as area sales manager, business manager, product manager, and technical services engineer supporting various analytical instrumentation companies. It also lists his achievements, instruments experience, training attended, and contact information.

Refactor, Iteration 7: Modules - CommonJS
• CommonJS’s module format was made popular for
server-side JavaScript development (namely for Node.js/
NPM)
• it’s synchronous
• syntax is a bit easier as it frees you from the define()
wrapper that AMD enforces
• requires a build in a JS runtime
Refactor, Iteration 7: Modules - RequireJS
• popular script loader written by James Burke that helps you load
multiple script files and define modules with or without
dependencies
• use RequireJS as first pass at module loading since async nature
means no build step during dev time (least disruption to the dev
team which is important because there is a learning curve)
• use almond (AMD API shim) so don’t have to add a special script
tag to load RequireJS and change any HTML
• this will move the code away from IIFEs to modules with
dependency management
my-app.js
// requireJS simplified commonJS wrapper
// do this so can use the commonJS style &
// make switch to browserify easier
define('app', function(require, exports, module) {
'use strict';
var $ = require('jquery');
var _ = require('underscore');
var Backbone = require('backbone');
var Modernizr = require('modernizr');
var HeaderController = require('./header-controller');
var FooterController = require('./footer-controller');
var app = new Backbone.Application();
module.exports = app;
});
(function() {
var $ = require('jquery');
var app = require('app');
// dom ready
$(function() {
app.start();
});
}());
;
(function() {
'use strict';
var $ = require('jquery');
var PageOneController = require('./page-one-controller');
var app = require('app');
// dom ready
$(function() {
app.start({
ScreenController: PageOneController
});
});
}());
page-one-main.js

Recommended for you

My five minutes bell
My five minutes bellMy five minutes bell
My five minutes bell

This short document promotes creating presentations using Haiku Deck, a tool for making slideshows. It encourages the reader to get started making their own Haiku Deck presentation and sharing it on SlideShare. In just one sentence, it pitches the idea of using Haiku Deck to easily create engaging slideshows.

haikudeck
Rp 6 session 2 naresh bhatia
Rp 6  session 2 naresh bhatiaRp 6  session 2 naresh bhatia
Rp 6 session 2 naresh bhatia

1) The document discusses how to build modular web applications using the JavaScript frameworks Backbone.js and RequireJS. It advocates separating an application into reusable components using the Model-View-Controller (MVC) pattern and composing the interface from independent views. 2) RequireJS allows code to be split into bite-sized modules and defines dependencies between modules. This supports large-scale application development and avoids dependency issues. 3) The document provides an example of a fictitious stock trading application called Bullsfirst that demonstrates these techniques and emphasizes the importance of architecture for engaging web applications.

WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...

This document provides an overview of designing complex applications using HTML5 and KnockoutJS. It discusses HTML5 and why it is useful, introduces JavaScript and frameworks like KnockoutJS and SammyJS that help manage complexity. It also summarizes several JavaScript libraries and patterns including the module pattern, revealing module pattern, and MV* patterns. Specific libraries and frameworks discussed include RequireJS, AmplifyJS, UnderscoreJS, and LINQ.js. The document concludes with a brief mention of server-side tools like ScriptSharp.

sammyjshtml5javascript
define('page-one-controller', function(require, exports, module) {
'use strict';
var Backbone = require('backbone');
var PageOneView = require('PageOneView');
var PageOneController = Backbone.Controller.extend({
initialize: function(options) {
var pageOneView = new PageOneView();
}
});
module.exports = PageOneController;
});
page-one-controller.js
define('page-one-view', function(require, exports, module) {
'use strict';
var Backbone = require('backbone');
var PageOneView = Backbone.View.extend({
});
module.exports = PageOneView;
});
page-one-view.js
Refactor, Iteration 7: Modules - Browserify
• Browserify lets you require('modules') in the browser by
bundling up all of your dependencies during a build step
• it’s the end-state module loader because it allows for easy
bundle splitting
• figure out common/shared JS and create a common
bundle then a bundle for the unique code on each page
• by having a main.js for each screen this will act as an
entry point so Browserify can find all the modules
required and create a screen-specific bundle
Refactor, Iteration 7: Modules - Browserify
• means build during dev but we were already doing that
for our CSS with LESS
• “It’s great the dev community has
embraced compilation because it’s
inevitable.” - Brendan Eich at Fluent 2015
• the code will become very clean

Recommended for you

From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again

As a software consultant, I get to see a lot of interesting code. In this particular instance a client was in the process of transforming their web application to a rich, interactive interface with the help of another company. The project kicked off using Backbone and things were great. Until they were not great. Pages starting getting more and more involved and blame started being thrown at the technology choice. A move to Ember.js ensued and the app was rewritten. But architecturally bad decisions don't hide long, and soon the rewrite was preforming even worse. That's when I stepped in, with the help of another consultant, to solve the performance issues once and for all. Our solution used Backbone.js and it was fast. This is that journey.

backboneember.jsconsulting
Os Haase
Os HaaseOs Haase
Os Haase

This document provides an overview of the Swing Application Framework and Beans Binding frameworks being developed as part of JSR 296 and JSR 295. It discusses the motivations for creating standard frameworks to simplify Swing development, outlines the key goals and components of the Swing Application Framework, and briefly introduces Beans Binding for keeping object properties in sync. The frameworks are aimed at addressing common issues for typical Swing applications and are intended for the Java SE 7 platform.

React Basic and Advance || React Basic
React Basic and Advance   || React BasicReact Basic and Advance   || React Basic
React Basic and Advance || React Basic

The document provides information about React, including: - React is a JavaScript library for building user interfaces and single-page applications using reusable UI components. - Additional benefits of React include improved speed, use of a virtual DOM for better performance, readability through components, and support from a large community. - The history and current versions of React and related tools like Create React App are provided. - Getting started with React requires Node.js and NPM, and an example React code snippet is given. - Key concepts in React like components, importing/exporting files, and using JSX syntax are summarized.

@students
'use strict';
var Backbone = require('backbone');
var PageOneView = Backbone.View.extend({
el: '#pageOneMainContainer',
initialize: function() {}
});
module.exports = PageOneView;
page-one-view.js
Summary
• the JavaScript is now modular and easier to maintain
• Backbone.js helps devs keep consistent with coding patterns and
organization (Object Literal notation, events)
• events are scoped to the smallest part of the page to which they matter
(Backbone.js)
• namespacing/IIFEs and then later module loader/build removes the
possibility of collisions with other frameworks/libs
• unit tests mean you can feel more confident to change things
• only sending JS to the browser that is necessary is good for
performance (think mobile)
http://ak-static.scoopon.com.au/scpn/deals/main/50000/50693_2.jpg
"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"
- Justin Meyer, author JavaScriptMVC

Recommended for you

Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry

- Play 2.0 is a web framework for Java and Scala that simplifies development by embracing HTTP rather than fighting it - It takes a new approach to building web apps in Java by not being built on top of servlet APIs and using an asynchronous programming model - Developing, testing, and deploying a Play app locally and to CloudFoundry involves creating a project, running it locally, and pushing the compiled code to CloudFoundry which automatically detects and supports Play apps

play cloud foundry
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)

Over the past year or so, we’ve seen the emergence of a new way of building JavaScript web apps that share code between the web browser and the server, using Node.js — a technique that has come to be known as "isomorphic JavaScript.” There are a variety of use cases for isomorphic JavaScript; some apps render HTML on both the server and the client, some apps share just a few small bits of application logic, while others share the entire application runtime between client and server to provide advanced offline and realtime features. Why go isomorphic? The main benefits are performance, maintainability, reusability, and SEO. This talk shares examples of isomorphic JavaScript apps running in the wild, explore the exploding ecosystem of asset building tools, such as Browserify, Webpack, and Gulp, that allow developers to build their own isomorphic JavaScript apps with open-source libraries, demonstrate how to build an isomorphic JavaScript module from scratch, and explore how libraries like React and Flux can be used to build a single-page app that renders on the server.

javascriptisomorphicjsconfasia
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example

A guide to create a simple Java application and upload it to the Google Cloud Platform with Google App Engine. This presentation covers usage of persistence API with both Google Cloud SQL and Google Cloud Datastore.

jpagoogle app enginejava
Team Shout Out
• This was over the course of several years and I worked
with two other fantastic front-end engineers:
• Ryan Anklam ( @bittersweetryan )
• Zeek Chentnik ( http://ezekielchentnik.com )
JavaScript References
• “Patterns For Large-Scale JavaScript Application Architecture” by Addy
Osmani 

http://addyosmani.com/largescalejavascript/
• “Learning JavaScript Design Patterns” by Addy Osmani

http://addyosmani.com/resources/essentialjsdesignpatterns/book/
• “Using Objects to Organize Your Code” by Rebecca Murphey

http://rmurphey.com/blog/2009/10/15/using-objects-to-organize-your-code/
• “It’s time to start using JavaScript strict mode” by Nicholas Zakas

http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using-javascript-strict-
mode/
• “Writing Modular JavaScript with AMD, CommonJS & ES Harmony” by Addy
Osmani

http://addyosmani.com/writing-modular-js/
Backbone.js References
• “Developing Backbone.js Applications” by Addy
Osmani

http://addyosmani.github.io/backbone-fundamentals/
• “Communicating Between Views in Client-Side
Apps” by Rebecca Murphey

http://bocoup.com/weblog/communicating-between-
views-in-client-side-apps/
• Talks from past Backbone Conferences are free/online:
http://backboneconf.com/

http://backboneconf.com/2013/
Thank You!
@stacylondoner
Code Samples:

https://gist.github.com/stacylondon

Recommended for you

Android Workshop
Android WorkshopAndroid Workshop
Android Workshop

Android Workshop for NTU. A getting started guide to android application development. UPDATE (Oct 2013): An updated slide at http://samwize.com/2013/10/13/android-workshop-2013/

androidprogrammingmobile application development
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2

Code generation in Magento 2 automatically generates code to handle dependency injection, interception, and the service layer. Key types of generated code include factories for object instantiation, proxies for optional dependencies, interceptors for plugins, repositories for the service layer, extension attributes, and loggers. This code generation improves abstraction, avoids boilerplate code, and enables features like dependency injection, aspect-oriented programming and generic programming in Magento 2.

magento2magento
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development

Copy of the slides from the Advanced Web Development Workshop presented by Ed Bachta, Charlie Moad and Robert Stein of the Indianapolis Museum of Art during the Museums and the Web 2008 conference in Montreal

More Related Content

What's hot

Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial
Claude Tech
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
Harikrishnan C
 
How to Build SPA with Vue Router 2.0
How to Build SPA with Vue Router 2.0How to Build SPA with Vue Router 2.0
How to Build SPA with Vue Router 2.0
Takuya Tejima
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
Javier Eguiluz
 
Creating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of todayCreating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of today
gerbille
 
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave TaylorAtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
Atlassian
 
Building Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJSBuilding Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJS
Antonio Peric-Mazar
 
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
Atlassian
 
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
Atlassian
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
Ignacio Martín
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
TrevorBurnham
 
WebcampZG - Rails 4
WebcampZG - Rails 4WebcampZG - Rails 4
WebcampZG - Rails 4
shnikola
 
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Caldera Labs
 
Angular js
Angular jsAngular js
Angular js
Behind D Walls
 
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"
GeeksLab Odessa
 
Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016
Codemotion
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance
Parashuram N
 
How to React Native
How to React NativeHow to React Native
How to React Native
Dmitry Ulyanov
 
Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applications
Astrails
 
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - Appengine
Python Ireland
 

What's hot (20)

Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial
 
Ember - introduction
Ember - introductionEmber - introduction
Ember - introduction
 
How to Build SPA with Vue Router 2.0
How to Build SPA with Vue Router 2.0How to Build SPA with Vue Router 2.0
How to Build SPA with Vue Router 2.0
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
 
Creating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of todayCreating the interfaces of the future with the APIs of today
Creating the interfaces of the future with the APIs of today
 
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave TaylorAtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
AtlasCamp 2010: Making Confluence Macros Easy (for the user) - Dave Taylor
 
Building Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJSBuilding Single Page Application (SPA) with Symfony2 and AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJS
 
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
No Coding Necessary: Building Confluence User Macros Cheat Sheet - Atlassian ...
 
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
No Coding Necessary: Building User Macros and Dynamic Reports Inside Confluen...
 
Keeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and WebpackKeeping the frontend under control with Symfony and Webpack
Keeping the frontend under control with Symfony and Webpack
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
 
WebcampZG - Rails 4
WebcampZG - Rails 4WebcampZG - Rails 4
WebcampZG - Rails 4
 
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
Single Page Web Apps As WordPress Admin Interfaces Using AngularJS & The Word...
 
Angular js
Angular jsAngular js
Angular js
 
JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"JSLab. Алексей Волков. "React на практике"
JSLab. Алексей Волков. "React на практике"
 
Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016Promises are so passé - Tim Perry - Codemotion Milan 2016
Promises are so passé - Tim Perry - Codemotion Milan 2016
 
IndexedDB - Querying and Performance
IndexedDB - Querying and PerformanceIndexedDB - Querying and Performance
IndexedDB - Querying and Performance
 
How to React Native
How to React NativeHow to React Native
How to React Native
 
Building and deploying React applications
Building and deploying React applicationsBuilding and deploying React applications
Building and deploying React applications
 
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - Appengine
 

Viewers also liked

170209 apm shipley capability briefing-esp v073-cliente
170209 apm shipley capability briefing-esp v073-cliente170209 apm shipley capability briefing-esp v073-cliente
170209 apm shipley capability briefing-esp v073-cliente
APM-Shipley
 
Interesting Concept Yachts
Interesting Concept YachtsInteresting Concept Yachts
Interesting Concept Yachts
Cal Staggers
 
sadia'CV
sadia'CVsadia'CV
sadia'CV
Sadia Hussain
 
chuyên làm clip quảng cáo tốt giá rẻ
chuyên làm clip quảng cáo tốt giá rẻchuyên làm clip quảng cáo tốt giá rẻ
chuyên làm clip quảng cáo tốt giá rẻ
yon214
 
Sụn khớp hư tổn làm khớp mau thoái hóa
Sụn khớp hư tổn làm khớp mau thoái hóaSụn khớp hư tổn làm khớp mau thoái hóa
Sụn khớp hư tổn làm khớp mau thoái hóa
nona479
 
Storie comuni
Storie comuniStorie comuni
Storie comuni
framanini
 
Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAh
Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAhEr Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAh
Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAh
gruesomeocclusi00
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
Ignacio Rippa
 
Portfolio
PortfolioPortfolio
Portfolio
Hope Crosson
 
7 Managed services
7 Managed services7 Managed services
7 Managed services
Darren Moore
 
Referral specialist performance appraisal
Referral specialist performance appraisalReferral specialist performance appraisal
Referral specialist performance appraisal
codyfred747
 
Feedback
FeedbackFeedback
Feedback
DIDI1998sdf
 
Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015
Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015
Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015
Bekki Tagg
 
الموازنة العامة
الموازنة العامةالموازنة العامة
الموازنة العامة
Nour Elbader
 
ARTE UNICO LOOKBOOK
ARTE UNICO LOOKBOOKARTE UNICO LOOKBOOK
ARTE UNICO LOOKBOOK
Tatiana Mikhayletskaya
 
Thai Hoa Dot Song Co
Thai Hoa Dot Song CoThai Hoa Dot Song Co
Thai Hoa Dot Song Co
tracy414
 
Future comms - the last will and testament of #ukhousing
Future comms - the last will and testament of #ukhousingFuture comms - the last will and testament of #ukhousing
Future comms - the last will and testament of #ukhousing
Bromford Lab
 
Sivakumar Resume
Sivakumar ResumeSivakumar Resume
Sivakumar Resume
Sivakumar Ganapathy
 
My five minutes bell
My five minutes bellMy five minutes bell
My five minutes bell
Mariajose Lopez Diazinfante
 

Viewers also liked (20)

170209 apm shipley capability briefing-esp v073-cliente
170209 apm shipley capability briefing-esp v073-cliente170209 apm shipley capability briefing-esp v073-cliente
170209 apm shipley capability briefing-esp v073-cliente
 
Interesting Concept Yachts
Interesting Concept YachtsInteresting Concept Yachts
Interesting Concept Yachts
 
sadia'CV
sadia'CVsadia'CV
sadia'CV
 
chuyên làm clip quảng cáo tốt giá rẻ
chuyên làm clip quảng cáo tốt giá rẻchuyên làm clip quảng cáo tốt giá rẻ
chuyên làm clip quảng cáo tốt giá rẻ
 
Sụn khớp hư tổn làm khớp mau thoái hóa
Sụn khớp hư tổn làm khớp mau thoái hóaSụn khớp hư tổn làm khớp mau thoái hóa
Sụn khớp hư tổn làm khớp mau thoái hóa
 
Storie comuni
Storie comuniStorie comuni
Storie comuni
 
Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAh
Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAhEr Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAh
Er Din Evne til at Kobe Kosttilskud, Naturlaegemidler, og Tonics i Fare i USAh
 
IH Poster Samples
IH Poster SamplesIH Poster Samples
IH Poster Samples
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Portfolio
PortfolioPortfolio
Portfolio
 
7 Managed services
7 Managed services7 Managed services
7 Managed services
 
Referral specialist performance appraisal
Referral specialist performance appraisalReferral specialist performance appraisal
Referral specialist performance appraisal
 
Feedback
FeedbackFeedback
Feedback
 
Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015
Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015
Meaningful EMR Use - A Survey of Family Practice Clinics - TAGG_BEKKI_MSC_2015
 
الموازنة العامة
الموازنة العامةالموازنة العامة
الموازنة العامة
 
ARTE UNICO LOOKBOOK
ARTE UNICO LOOKBOOKARTE UNICO LOOKBOOK
ARTE UNICO LOOKBOOK
 
Thai Hoa Dot Song Co
Thai Hoa Dot Song CoThai Hoa Dot Song Co
Thai Hoa Dot Song Co
 
Future comms - the last will and testament of #ukhousing
Future comms - the last will and testament of #ukhousingFuture comms - the last will and testament of #ukhousing
Future comms - the last will and testament of #ukhousing
 
Sivakumar Resume
Sivakumar ResumeSivakumar Resume
Sivakumar Resume
 
My five minutes bell
My five minutes bellMy five minutes bell
My five minutes bell
 

Similar to Refactoring Large Web Applications with Backbone.js

Rp 6 session 2 naresh bhatia
Rp 6  session 2 naresh bhatiaRp 6  session 2 naresh bhatia
Rp 6 session 2 naresh bhatia
sapientindia
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
jonknapp
 
Os Haase
Os HaaseOs Haase
Os Haase
oscon2007
 
React Basic and Advance || React Basic
React Basic and Advance   || React BasicReact Basic and Advance   || React Basic
React Basic and Advance || React Basic
rafaqathussainc077
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
rajdeep
 
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)
Spike Brehm
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
Alexander Zamkovyi
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
Junda Ong
 
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2
Sergii Shymko
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
Robert J. Stein
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
GDSC UofT Mississauga
 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications
Milan Korsos
 
Mean stack Magics
Mean stack MagicsMean stack Magics
Mean stack Magics
Aishura Aishu
 
Html5 and beyond the next generation of mobile web applications - Touch Tou...
Html5 and beyond   the next generation of mobile web applications - Touch Tou...Html5 and beyond   the next generation of mobile web applications - Touch Tou...
Html5 and beyond the next generation of mobile web applications - Touch Tou...
RIA RUI Society
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
IMC Institute
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
Matt Raible
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
Software Park Thailand
 
jQuery Mobile and JavaScript
jQuery Mobile and JavaScriptjQuery Mobile and JavaScript
jQuery Mobile and JavaScript
Gary Yeh
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architecture
Vitali Pekelis
 

Similar to Refactoring Large Web Applications with Backbone.js (20)

Rp 6 session 2 naresh bhatia
Rp 6  session 2 naresh bhatiaRp 6  session 2 naresh bhatia
Rp 6 session 2 naresh bhatia
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
 
Os Haase
Os HaaseOs Haase
Os Haase
 
React Basic and Advance || React Basic
React Basic and Advance   || React BasicReact Basic and Advance   || React Basic
React Basic and Advance || React Basic
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)Building Isomorphic Apps (JSConf.Asia 2014)
Building Isomorphic Apps (JSConf.Asia 2014)
 
Google app engine by example
Google app engine by exampleGoogle app engine by example
Google app engine by example
 
Android Workshop
Android WorkshopAndroid Workshop
Android Workshop
 
Code Generation in Magento 2
Code Generation in Magento 2Code Generation in Magento 2
Code Generation in Magento 2
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications
 
Mean stack Magics
Mean stack MagicsMean stack Magics
Mean stack Magics
 
Html5 and beyond the next generation of mobile web applications - Touch Tou...
Html5 and beyond   the next generation of mobile web applications - Touch Tou...Html5 and beyond   the next generation of mobile web applications - Touch Tou...
Html5 and beyond the next generation of mobile web applications - Touch Tou...
 
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web ToolkitJava Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
Java Web Programming on Google Cloud Platform [3/3] : Google Web Toolkit
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Google Web Toolkit
Google Web ToolkitGoogle Web Toolkit
Google Web Toolkit
 
jQuery Mobile and JavaScript
jQuery Mobile and JavaScriptjQuery Mobile and JavaScript
jQuery Mobile and JavaScript
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architecture
 

Recently uploaded

10th International Conference on Networks, Mobile Communications and Telema...
10th International Conference on Networks, Mobile Communications and   Telema...10th International Conference on Networks, Mobile Communications and   Telema...
10th International Conference on Networks, Mobile Communications and Telema...
ijp2p
 
Future Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on WebsitesFuture Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on Websites
Serva AppLabs
 
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
taqyea
 
一比一原版(ic毕业证书)英国帝国理工学院毕业证如何办理
一比一原版(ic毕业证书)英国帝国理工学院毕业证如何办理一比一原版(ic毕业证书)英国帝国理工学院毕业证如何办理
一比一原版(ic毕业证书)英国帝国理工学院毕业证如何办理
taqyea
 
Steps involved in the implementation of EDI in a company
Steps involved in the implementation of EDI in a companySteps involved in the implementation of EDI in a company
Steps involved in the implementation of EDI in a company
sivaraman163206
 
一比一原版澳洲巴拉特大学毕业证(utas毕业证书)如何办理
一比一原版澳洲巴拉特大学毕业证(utas毕业证书)如何办理一比一原版澳洲巴拉特大学毕业证(utas毕业证书)如何办理
一比一原版澳洲巴拉特大学毕业证(utas毕业证书)如何办理
taqyea
 
Lincoln University degree offer diploma Transcript
Lincoln University degree offer diploma TranscriptLincoln University degree offer diploma Transcript
Lincoln University degree offer diploma Transcript
ubufe
 
一比一原版(lu毕业证书)英国拉夫堡大学毕业证如何办理
一比一原版(lu毕业证书)英国拉夫堡大学毕业证如何办理一比一原版(lu毕业证书)英国拉夫堡大学毕业证如何办理
一比一原版(lu毕业证书)英国拉夫堡大学毕业证如何办理
taqyea
 
Megalive99 Situs Betting Online Gacor Terpercaya
Megalive99 Situs Betting Online Gacor TerpercayaMegalive99 Situs Betting Online Gacor Terpercaya
Megalive99 Situs Betting Online Gacor Terpercaya
Megalive99
 
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
ffg01100
 
一比一原版(london毕业证书)英国伦敦大学毕业证如何办理
一比一原版(london毕业证书)英国伦敦大学毕业证如何办理一比一原版(london毕业证书)英国伦敦大学毕业证如何办理
一比一原版(london毕业证书)英国伦敦大学毕业证如何办理
taqyea
 
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
taqyea
 
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
taqyea
 
How to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer ExperienceHow to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer Experience
Serva AppLabs
 
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
taqyea
 
一比一原版美国休斯敦大学毕业证(uh毕业证书)如何办理
一比一原版美国休斯敦大学毕业证(uh毕业证书)如何办理一比一原版美国休斯敦大学毕业证(uh毕业证书)如何办理
一比一原版美国休斯敦大学毕业证(uh毕业证书)如何办理
taqyea
 
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirtsJarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
exgf28
 
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
taqyea
 
一比一原版(mqu毕业证)麦考瑞大学毕业证如何办理
一比一原版(mqu毕业证)麦考瑞大学毕业证如何办理一比一原版(mqu毕业证)麦考瑞大学毕业证如何办理
一比一原版(mqu��业证)麦考瑞大学毕业证如何办理
taqyea
 
Founders Of Digital World Social Media..
Founders Of Digital World Social Media..Founders Of Digital World Social Media..
Founders Of Digital World Social Media..
jom pom
 

Recently uploaded (20)

10th International Conference on Networks, Mobile Communications and Telema...
10th International Conference on Networks, Mobile Communications and   Telema...10th International Conference on Networks, Mobile Communications and   Telema...
10th International Conference on Networks, Mobile Communications and Telema...
 
Future Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on WebsitesFuture Trends What's Next for UI UX Design on Websites
Future Trends What's Next for UI UX Design on Websites
 
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
一比一原版(oregon毕业证书)俄勒冈大学毕业证如何办理
 
一比一原版(ic毕业证书)英国帝国理工学院毕业证如何办理
一比一原版(ic毕业证书)英国帝国理工学院毕业证如何办理一比一原版(ic毕业证书)英国帝国理工学院毕业证如何办理
一比一原版(ic毕业证书)英国帝国理工学院毕业证如何办理
��
Steps involved in the implementation of EDI in a company
Steps involved in the implementation of EDI in a companySteps involved in the implementation of EDI in a company
Steps involved in the implementation of EDI in a company
 
一比一原版澳洲巴拉特大学毕业证(utas毕业证书)如何办理
一比一原版澳洲巴拉特大学毕业证(utas毕业证书)如何办理一比一原版澳洲巴拉特大学毕业证(utas毕业证书)如何办理
一比一原版澳洲巴拉特大学毕业证(utas毕业证书)如何办理
 
Lincoln University degree offer diploma Transcript
Lincoln University degree offer diploma TranscriptLincoln University degree offer diploma Transcript
Lincoln University degree offer diploma Transcript
 
一比一原版(lu毕业证书)英国拉夫堡大学毕业证如何办理
一比一原版(lu毕业证书)英国拉夫堡大学毕业证如何办理一比一原版(lu毕业证书)英国拉夫堡大学毕业证如何办理
一比一原版(lu毕业证书)英国拉夫堡大学毕业证如何办理
 
Megalive99 Situs Betting Online Gacor Terpercaya
Megalive99 Situs Betting Online Gacor TerpercayaMegalive99 Situs Betting Online Gacor Terpercaya
Megalive99 Situs Betting Online Gacor Terpercaya
 
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
202254.com免费观看《长相思第二季》免费观看高清,长相思第二季线上看,《长相思第二季》最新电视剧在线观看,杨紫最新电视剧
 
一比一原版(london毕业证书)英国伦敦大学毕业证如何办理
一比一原版(london毕业证书)英国伦敦大学毕业证如何办理一比一原版(london毕业证书)英国伦敦大学毕业证如何办理
一比一原版(london毕业证书)英国伦敦大学毕业证如何办理
 
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
一比一原版(kcl毕业证书)英国伦敦国王学院毕业证如何办理
 
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
一比一原版(bristol毕业证书)英国布里斯托大学毕业证如何办理
 
How to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer ExperienceHow to Choose the Right UIUX Design Service for Optimal Customer Experience
How to Choose the Right UIUX Design Service for Optimal Customer Experience
 
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
一比一原版(greenwich毕业证书)英国格林威治大学毕业证如何办理
 
一比一原版美国休斯敦大学毕业证(uh毕业证书)如何办理
一比一原版美国休斯敦大学毕业证(uh毕业证书)如何办理一比一原版美国休斯敦大学毕业证(uh毕业证书)如何办理
一比一原版美国休斯敦大学毕业证(uh毕业证书)如何办理
 
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirtsJarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
Jarren Duran Fuck EM T shirts Jarren Duran Fuck EM T shirts
 
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
一比一原版(ukc毕业证书)英国肯特大学毕业证如何办理
 
一比一原版(mqu毕业证)麦考瑞大学毕业证如何办理
一比一原版(mqu毕业证)麦考瑞大学毕业证如何办理一比一原版(mqu毕业证)麦考瑞大学毕业证如何办理
一比一原版(mqu毕业证)麦考瑞大学毕业证如何办理
 
Founders Of Digital World Social Media..
Founders Of Digital World Social Media..Founders Of Digital World Social Media..
Founders Of Digital World Social Media..
 

Refactoring Large Web Applications with Backbone.js

  • 1. From Mess to Success, Refactoring Large Applications with Backbone dev.Objective() May 14, 2015 Stacy London @stacylondoner McWay Falls, Julia Pfeiffer Burns State Park - Big Sur, CA - 2015 by Stacy London
  • 2. About Me I’ve been making things for the web since 1998. Currently I’m a Senior Application Architect focused on Front-End Engineering at Northwestern Mutual. @stacylondoner
  • 3. Northwestern Mutual Northwestern Mutual has been helping families and businesses achieve financial security for nearly 160 years. Our financial representatives build relationships with clients through a distinctive planning approach that integrates risk management with wealth accumulation, preservation and distribution. With more than $230 billion in assets, $27 billion in revenues, nearly $90 billion in assets under management and more than $1.5 trillion worth of life insurance protection in force, Northwestern Mutual delivers financial security to more than 4.3 million people who rely on us for insurance and investment solutions, including life, disability and long-term care insurance; annuities; trust services; mutual funds; and investment advisory products and services. Northwestern Mutual is the marketing name for The Northwestern Mutual Life Insurance Company, Milwaukee, WI, and its subsidiaries. Northwestern Mutual and its subsidiaries offer a comprehensive approach to financial security solutions including: life insurance, long-term care insurance, disability income insurance, annuities, investment products, and advisory products and services. Subsidiaries include Northwestern Mutual Investment Services, LLC, broker-dealer, registered investment adviser, member FINRA and SIPC; the Northwestern Mutual Wealth Management Company, limited purpose federal savings bank; and Northwestern Long Term Care Insurance Company.
  • 4. What do I mean by large application? • a multi-page web application (MPA) built with ASP.NET MVC • 1500+ files | 343,000+ lines of code • UI (CSS / JS) • 230+ files | 42,000+ lines of code
  • 5. Development Culture • JEE/Java shop turned .NET/C# • view JS as a bit of a “toy” language • as JS was being added it was just being added without much thought to maintainability, extensibility, testability, patterns, etc. • app was going to be heavy with JS yet initially on a platform that wasn’t optimized for this kind of app dev. • path of least resistance was to just put everything in 
 $(document).ready()
  • 9. Problems • one large JavaScript file in the <head> (all code included on every page regardless if it needed it) • all JavaScript global and in $(document).ready() • some pages had inline JavaScript • not commented • no unit tests • unclear if a function / event was used on multiple pages
  • 10. Iterative Refactoring • big codebase • large team working on 2 week sprints that couldn’t be slowed down • refactors had to fit into a sprint
  • 13. Refactor, Iteration 1: Break Apart JS • figure out what JS belongs with each page and move that JS into a separate file for that page • include that JS with the partial HTML
  • 14. Refactor, Iteration 1: Start Adding Unit Tests • start adding unit tests for original code then make sure it passed after refactoring as a safety/confidence mechanism • to prepare for this journey of breaking code into smaller, more testable chunks it was good to start early with creating a test bed • help make subsequent refactors less stressful
  • 15. Refactor, Iteration 1: Start Adding Unit Tests • picked Jasmine (BDD style) - http:// jasmine.github.io/ • a lot of the JS tied to DOM manipulation so not in an ideal state for unit testing with Jasmine out of the box • needed DOM testing helper so added jquery- jasmine library to add fixtures (HTML snippets to run tests against) • no external UI Regression tools (e.g. Selenium) in a state to do this validation throughout the refactor
  • 18. Refactor, Iteration 2: Namespacing & Object Literal • create an app namespace to get custom code out of the global namespace (window) to avoid collisions with external libs/ frameworks • introduce an Object Literal notation style in preparation for Backbone (which uses this pattern) • helps to organize the code and parameters logically
 “an object containing a collection of key:value pairs with a colon separating each pair of keys and values where keys can also represent new namespaces” • add closures with Instantly Invoked Function Expressions (IIFEs)
  • 20. ; var myApp = myApp || {}; (function($, myApp) { 'use strict'; $.extend(myApp, { init: function() { this.commonStuff(); }, commonStuff: function() { // common code across many or all pages } }); })(window.jQuery, window.myApp); $(document).ready(function() { myApp.init(); }); my-app.js
  • 21. my-app.js with comments // prefix with semi-colon as safety net against concatenated // scripts and/or other plugins that are not closed properly ; // check for existence of myApp in the global namespace var myApp = myApp || {}; // Use IIFE to: // * encapsulate app logic to protect it from global namespace // * pass in namespace so can be modified locally and isn't // overwritten outside of our function context // * ensure $ only refers to window.jQuery (defensive programming) // * $ passed through as local var rather than as globals and this // (slightly) quickens the resolution process and can be more // efficiently minified (especially if regularly referenced) (function($, myApp) {
  • 22. my-app.js with comments (function($, myApp) { // Strict mode makes several changes to normal JavaScript semantics: // * eliminates some JS silent errors by changing them to throw errors. // * fixes mistakes that make it difficult for JavaScript engines to // perform optimizations: strict mode code can sometimes be made to // run faster than identical code that's not strict mode. Add inside // the IIFE so it's defined for just the functions defined within and // doesn't flip concatenating/minified code to strict inadvertently 'use strict'; // extend the namespace with more functionality $.extend(myApp, {
  • 23. ; var myApp = myApp || {}; myApp.pageOne = myApp.pageOne || {}; (function($, myApp) { 'use strict'; $.extend(myApp.pageOne, { init: function() { this.pageSpecificStuff(); }, pageSpecificStuff: function() { // code specific to this page } }); })(window.jQuery, window.myApp); $(document).ready(function() { myApp.pageOne.init(); }); page-one.js
  • 24. Better but not great • code is aligned with the screen to which is pertains • pages now have mid-page script includes which isn’t good for performance / rendering • still hand-wiring Ajax calls • entire-page-JS is not very modular • want to break screens down into smaller features and keep events neatly associated
  • 25. Backbone to the rescue • wanted something that provided/enforced structure but in a lightweight way • it’s a MPA not a SPA so full-featured SPA frameworks didn’t make sense (e.g. Angular, Ember) • wanted to be able to use just a small feature of the library/ framework and add more full integration over time (refactor in multiple iterations) • for these reasons Backbone.js made sense - http://backbonejs.org/
  • 27. Refactor, Iteration 3: Page Level Backbone Views • reducing boilerplate code • views enforce organization of events • views enforce an Object Literal notation pattern • views helped developers think about encapsulating pieces of the screen • starting with just Views gave the team time to start planning for refactoring back-end data provided by ASP.NET MVC Controllers into more RESTful web services (Web API) which is necessary to take full advantage of Backbone.js Models/Collections
  • 28. Refactor, Iteration 3: Page Level Backbone Views • my-app.js - is now responsible for instantiating the app namespace and setting up a super light-weight view manager for Backbone.js • instantiate all available views on the page upon DOM ready. • page-one-view.js - no longer namespaced individually since being added to the views object of the app namespace
  • 30. my-app.js var myApp = myApp || {}; (function($, myApp) { 'use strict'; $.extend(myApp, { init: function() { this.initializeViews(); }, // view manager code }); })(window.jQuery, window.myApp); $(document).ready(function() { myApp.init(); });
  • 31. my-app.js view manager views: {}, initializeViews: function() { for (var view in this.views) { if (typeof this.views[view] === 'function') { this.views[view.substring(0, 1).toLowerCase() + view.substring(1, view.length)] = new this.views[view](); } } }, addView: function(key, view) { if (this.views.hasOwnProperty(key)) { throw (new Error('A view with that key already exists.')); } this.views[key] = view; }, getView: function(key) { if (!this.views.hasOwnProperty(key)) { throw new Error('View does not exist in views collection.'); } return this.views[key]; }
  • 32. page-one-view.js; (function($, _, Backbone, myApp) { 'use strict'; var PageOneView = Backbone.View.extend({ el: '#pageOneMainContainer', events: { 'click .something': 'doSomething' }, initialize: function() { this.setupValidation(); }, setupValidation: function() { }, doSomething: function() { } }); myApp.addView('PageOneView', PageOneView); }(window.jQuery, window._, window.Backbone, window.myApp));
  • 34. Refactor, Iteration 4: Sub-Page Backbone Views • start breaking the large page views into sub-page views so that you can get truly modular • share modules/code if a module exists on more than one page
  • 37. Refactor, Iteration 5: Backbone Models, Collections • move code that is getting data and doing any business logic out of the Views and into Models and Collections • e.g. move phone number formatting out of View and into the Model • remove hand written Ajax, use BB API (e.g. fetch) • make sure server side controllers were written in a RESTful way • still not complete across the application
  • 39. var PageOneView = Backbone.View.extend({ el: '#pageOneMainContainer', initialize: function() { this.getSomeData(); }, getSomeData: function() { var self = this; $.ajax({ type: 'GET', url: 'SomeEndpoint', data: formData, dataType: 'json', success: function(data, textStatus, jqXHR) { self.displayResults(data); }, error: function(jqXHR, textStatus, errorThrown) { self.displayError(); } }); }, displayResults: function(data) { }, displayError: function() { } }); Hand-wiring Ajax
  • 40. Use Backbone.js API to get data // initialize view var pageOneView = new PageOneView({ collection: new PageOneCollection([]), }); var PageOneView = Backbone.View.extend({ el: '#pageOneMainContainer', template: _.template($('#page-one-template').html()), initialize: function() {}, render: function() { this.$el.html(this.template({'collection': this.collection})); // maintain chainability return this; } }); var PageOneCollection = Backbone.Collection.extend({ initialize: function(models, options) {}, model: PageOneModel, // RESTful web service URL url: '/SomeEndpoint' });
  • 42. Refactor, Iteration 6: Mini-SPA • treat each page of the multi-page app (MPA) like it’s a miniature single page app (SPA) • each page has a single entry point (main.js) • this will setup the code for a module loader / build system so that we can finally move the JS to the bottom of the page and remove mid-page scripts • improve performance (time to first paint - how long it takes between a user entering a URL into the browser and when he/she sees visual activity on screen)
  • 46. Refactor, Iteration 7: Modules • current version of JavaScript (ECMA-262) doesn’t provide a way to import modules of code like more traditional programming languages do • modules are proposed for the next version of JS (ES6/ ES2015/Harmony) • to use modules and manage dependencies with the current version of JS you can use community driven methodologies • there are two popular styles with associated script loaders / build systems
  • 48. Refactor, Iteration 7: Modules - AMD • AMD - Asynchronous Module Definition
 
 “The Asynchronous Module Definition (AMD) API specifies a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded. This is particularly well suited for the browser environment where synchronous loading of modules incurs performance, usability, debugging, and cross- domain access problems.”
 https://github.com/amdjs/amdjs-api/wiki/AMD
  • 49. Refactor, Iteration 7: Modules - CommonJS • CommonJS’s module format was made popular for server-side JavaScript development (namely for Node.js/ NPM) • it’s synchronous • syntax is a bit easier as it frees you from the define() wrapper that AMD enforces • requires a build in a JS runtime
  • 50. Refactor, Iteration 7: Modules - RequireJS • popular script loader written by James Burke that helps you load multiple script files and define modules with or without dependencies • use RequireJS as first pass at module loading since async nature means no build step during dev time (least disruption to the dev team which is important because there is a learning curve) • use almond (AMD API shim) so don’t have to add a special script tag to load RequireJS and change any HTML • this will move the code away from IIFEs to modules with dependency management
  • 51. my-app.js // requireJS simplified commonJS wrapper // do this so can use the commonJS style & // make switch to browserify easier define('app', function(require, exports, module) { 'use strict'; var $ = require('jquery'); var _ = require('underscore'); var Backbone = require('backbone'); var Modernizr = require('modernizr'); var HeaderController = require('./header-controller'); var FooterController = require('./footer-controller'); var app = new Backbone.Application(); module.exports = app; }); (function() { var $ = require('jquery'); var app = require('app'); // dom ready $(function() { app.start(); }); }());
  • 52. ; (function() { 'use strict'; var $ = require('jquery'); var PageOneController = require('./page-one-controller'); var app = require('app'); // dom ready $(function() { app.start({ ScreenController: PageOneController }); }); }()); page-one-main.js
  • 53. define('page-one-controller', function(require, exports, module) { 'use strict'; var Backbone = require('backbone'); var PageOneView = require('PageOneView'); var PageOneController = Backbone.Controller.extend({ initialize: function(options) { var pageOneView = new PageOneView(); } }); module.exports = PageOneController; }); page-one-controller.js
  • 54. define('page-one-view', function(require, exports, module) { 'use strict'; var Backbone = require('backbone'); var PageOneView = Backbone.View.extend({ }); module.exports = PageOneView; }); page-one-view.js
  • 55. Refactor, Iteration 7: Modules - Browserify • Browserify lets you require('modules') in the browser by bundling up all of your dependencies during a build step • it’s the end-state module loader because it allows for easy bundle splitting • figure out common/shared JS and create a common bundle then a bundle for the unique code on each page • by having a main.js for each screen this will act as an entry point so Browserify can find all the modules required and create a screen-specific bundle
  • 56. Refactor, Iteration 7: Modules - Browserify • means build during dev but we were already doing that for our CSS with LESS • “It’s great the dev community has embraced compilation because it’s inevitable.” - Brendan Eich at Fluent 2015 • the code will become very clean
  • 57. 'use strict'; var Backbone = require('backbone'); var PageOneView = Backbone.View.extend({ el: '#pageOneMainContainer', initialize: function() {} }); module.exports = PageOneView; page-one-view.js
  • 58. Summary • the JavaScript is now modular and easier to maintain • Backbone.js helps devs keep consistent with coding patterns and organization (Object Literal notation, events) • events are scoped to the smallest part of the page to which they matter (Backbone.js) • namespacing/IIFEs and then later module loader/build removes the possibility of collisions with other frameworks/libs • unit tests mean you can feel more confident to change things • only sending JS to the browser that is necessary is good for performance (think mobile)
  • 60. "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" - Justin Meyer, author JavaScriptMVC
  • 61. Team Shout Out • This was over the course of several years and I worked with two other fantastic front-end engineers: • Ryan Anklam ( @bittersweetryan ) • Zeek Chentnik ( http://ezekielchentnik.com )
  • 62. JavaScript References • “Patterns For Large-Scale JavaScript Application Architecture” by Addy Osmani 
 http://addyosmani.com/largescalejavascript/ • “Learning JavaScript Design Patterns” by Addy Osmani
 http://addyosmani.com/resources/essentialjsdesignpatterns/book/ • “Using Objects to Organize Your Code” by Rebecca Murphey
 http://rmurphey.com/blog/2009/10/15/using-objects-to-organize-your-code/ • “It’s time to start using JavaScript strict mode” by Nicholas Zakas
 http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using-javascript-strict- mode/ • “Writing Modular JavaScript with AMD, CommonJS & ES Harmony” by Addy Osmani
 http://addyosmani.com/writing-modular-js/
  • 63. Backbone.js References • “Developing Backbone.js Applications” by Addy Osmani
 http://addyosmani.github.io/backbone-fundamentals/ • “Communicating Between Views in Client-Side Apps” by Rebecca Murphey
 http://bocoup.com/weblog/communicating-between- views-in-client-side-apps/ • Talks from past Backbone Conferences are free/online: http://backboneconf.com/
 http://backboneconf.com/2013/