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

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
Love at first Vue
Love at first VueLove at first Vue
Love at first Vue

Vue.js is an open-source progressive framework for building user interfaces that focuses on the view layer. It has a virtual DOM and reactive components. Its core is small and works well with companion libraries. Single file components allow importing of templates, logic, and styles. Popular companion libraries include Vuex for state management and Vue Router for routing. The Vue CLI makes it easy to scaffold Vue projects with features like routing, lazy loading, and preloading for improved performance.

vuevuejs
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3

Vue.js is a progressive JavaScript framework that focuses on building user interfaces and is used for single-page applications. It was created by Evan You and released in 2014. Vue.js uses declarative templates and reactive data binding to render the view layer for an application. Templates in Vue use HTML-based syntax with directives prefixed with v- to dynamically bind expression results. Common directives include v-bind, v-if, and v-for. Vue.js applications can be built with its core library or integrated with other libraries and frameworks.

vuevue.jsvuejs
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

Vue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thingVue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thing

Vue.js is described as a "boring" framework that helps developers get work done without unnecessary complexity. It borrows best practices from other frameworks like React but aims to have simpler dependencies and templates. Vue.js uses reactive templates that can be written with plain JavaScript or JSX, and allows separating component logic from presentation with single file components. It also avoids unnecessary re-renders through its reactive system. The document demonstrates how Vue.js can be preferable for teams with mix of experience levels due to its flexibility and lack of complexity compared to other frameworks like React.

vue.jsjavascriptvue
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js

An introduction to Vue.js. Why would you need something like Vue.js? What is Vue.js? How do you develop with Vue.js?

vue.jsfront-endvuex
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

The presentation slide for Vue.js meetup http://abeja-innovation-meetup.connpass.com/event/38214/ That contains mainly about SSR (Server side rendering) + SPA with isomorphic fetch and client hydration

vue.js
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
Refactor Large applications with Backbone
Refactor Large applications with Backbone

Recommended for you

JavaScript Patterns and Principles
JavaScript Patterns and PrinciplesJavaScript Patterns and Principles
JavaScript Patterns and Principles

This document discusses JavaScript patterns and principles for building modular applications. It covers topics like modularity, communication patterns using callbacks, promises, event emitters and publish/subscribe. It also discusses patterns within MV* architectures like MVC, MVP and MVVM. The document emphasizes breaking applications into small independent and reusable modules that are loosely coupled through communication patterns.

javascript
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
Vuex
VuexVuex
Vuex

Vuex is a state management pattern for Vue.js applications that serves as a centralized store for component data. It consists of state, getters, mutations, and actions. State contains app data, getters help access state, mutations are the only way to modify state and must be synchronous, and actions allow asynchronous operations and commit mutations.

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
Refactor Large applications with Backbone

Recommended for you

Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.js

- Vue.js Tokyo v-meetup="#1" http://vuejs-meetup.connpass.com/event/31139/ - JS Night at Bizreach http://connpass.com/event/34014/

vue.js
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...

This document outlines a presentation about building universal JavaScript web applications with React. It discusses: 1. The term "universal" in relation to JavaScript and some advantages it provides like maintainability and faster load times. 2. Building a frontend single page application with React and then making it universal by rendering on the server as well with React and Express. 3. Key aspects of universal apps like module sharing, routing, data retrieval and state management that work across client and server. 4. An example of building a universal JavaScript app with React called "Judo Heroes" that shows athlete data and profiles, using components, routing, data and building tools like Babel and Webpack.

romeuniversalconference
Create Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express FrameworkCreate Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express Framework

Node.js uses JavaScript - a language known to millions of developers worldwide - thus giving it a much lower learning curve even for complete beginners. Using Node.js you can build simple Command Line programs or complex enterprise level web applications with equal ease. Node.js is an event-driven, server-side, asynchronous development platform with lightning speed execution. Node.js helps you to code the most complex functionalities in just a few lines of code.

node js
Refactor Large applications with Backbone
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

125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용

The document discusses ways to improve the performance of hybrid mobile applications that use WebView. It describes how WebView has less powerful capabilities and worse web standard compatibility compared to mobile browsers. This can cause issues like fragmentation across device versions. The document proposes techniques for creating a high-performance WebView, including adding new capabilities like WebSockets, and replacing slower native elements like Canvas 2D with optimized custom implementations. It provides code examples for calling JavaScript from native and vice versa on Android and iOS. Lessons learned emphasize minimizing native/JavaScript communication and dealing with threading issues.

The Art of AngularJS in 2015
The Art of AngularJS in 2015The Art of AngularJS in 2015
The Art of AngularJS in 2015

Presentation from Denver Open Source Users Group in February 2015. http://www.meetup.com/DOSUG1/events/219099019/ AngularJS is one of today's hottest JavaScript MVC Frameworks. In this session, we'll explore many concepts it brings to the world of client-side development: dependency injection, directives, filters, routing and two-way data binding. We'll also look at its recommended testing tools and build systems. Finally, you'll learn about my experience developing several real-world applications using AngularJS, HTML5 and Bootstrap.

coffeescriptgrunthttp2
Workshop 15: Ionic framework
Workshop 15: Ionic frameworkWorkshop 15: Ionic framework
Workshop 15: Ionic framework

This document provides an overview of the Ionic Framework, including: - Ionic is an open source SDK for building hybrid mobile apps using web technologies like HTML, CSS, and JavaScript. - It uses Cordova to access native device capabilities and wrap the app in a native shell. - The document covers installing Ionic, using the Ionic CLI, CSS components, AngularJS directives, and integrating Sass for styling.

codeprogrammingdevelopers
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

Thinking in Components
Thinking in ComponentsThinking in Components
Thinking in Components

Presented at Web Unleashed 2017. More info at www.fitc.ca/webu Presented by Ksenija Gogic, TWG Overview What are components? How can designers apply a component-minded approach to their workflow? How can we leverage components to improve the design handoff? Ultimately – how can designers and developers work together even better? Using React as a framework, Ksenija will discuss how to design for a component-based web application to make for a more efficient workflow, an easier design handoff, and a better understanding between roles. Objective To create a common language and understanding when working with component-based web frameworks between designers and developers. Target Audience Designers and developers looking to make their collaborative workflow even better. Five Things Audience Members Will Learn How to take a component-minded approach to building a design system How to design and create components using Sketch symbols How to assemble (compose) collections of components using Sketch symbols How to work with modifiers (props) to customize components How to ensure everyone is speaking the same language

 
by FITC
web designweb developmentweb unleashed 2017
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial

Tutorial to create a blog using AngularJS. The slides were originally used for a study meetup at our office.

programmingjavascriptangularjs
Java scriptconfusingbits
Java scriptconfusingbitsJava scriptconfusingbits
Java scriptconfusingbits

The document discusses JavaScript scoping and variable hoisting. It explains that JavaScript has function scoping rather than block scoping. Variables are scoped to the function they are declared in, rather than any surrounding blocks. It also discusses variable hoisting, where variable declarations are hoisted to the top of the function. This can cause confusion when a variable is declared within a block but then used outside that block. The key points are that variables live in the context of the function they are declared in, and variable declarations are effectively moved to the top of functions during hoisting.

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/
Refactor Large applications with Backbone
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

Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion

The document discusses load balancing, failover, and scalability with ColdFusion. It covers modeling applications for scalability, ColdFusion and web server configurations, ColdFusion clustering, load balancing with the Tomcat connector, session management strategies, and provides an agenda for a demo on load balancing and failover. The presentation will look at building environments to support business critical applications with high availability and uninterrupted service.

coldfusionfailoverload balancing
API Management from the Trenches
API Management from the TrenchesAPI Management from the Trenches
API Management from the Trenches

This document provides tips and tools for debugging APIs from both the consumer and author perspectives. It discusses techniques for consumer debugging like discovery, testing in isolation, and using tools like cURL, HTTPie, and mock APIs. For author debugging, it recommends approaches like logging, error reporting, monitoring, and load testing. It also stresses the importance of documentation and API design.

api management
Java scriptconfusingbits
Java scriptconfusingbitsJava scriptconfusingbits
Java scriptconfusingbits

The document discusses JavaScript scoping and variable hoisting. It explains that JavaScript has function scoping, not block scoping like other languages. Variables are scoped to the function they are declared in. It also discusses variable hoisting, where variable declarations are hoisted to the top of the function. This can cause confusion, as demonstrated in an example where a variable takes on the value of a later declaration instead of an earlier one, due to hoisting and function scoping rules.

javascript
Refactor Large applications with Backbone
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

Setting up your multiengine environment Apache Railo ColdFusion
Setting up your multiengine environment Apache Railo ColdFusionSetting up your multiengine environment Apache Railo ColdFusion
Setting up your multiengine environment Apache Railo ColdFusion

This document provides instructions for setting up a multi-engine environment with Apache, ColdFusion, and Railo. It explains how to install and configure Apache as the web server controller to pass requests to the appropriate engine. Key steps include extracting the connection configuration from ColdFusion installers, changing ports to avoid clashes, including modules and virtual hosts, and saving configuration snippets to external include files for reuse across websites.

apachecoldfusionrailo
Emberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applicationsEmberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applications

This document provides an overview of building web applications with Ember.js. It discusses Ember's core concepts like templates, routes, controllers and components. It also covers using Ember Data to manage models and the store. Examples are given of setting up an application structure with routes and resources, passing data between routes, controllers and templates, and building reusable components. Support resources like the Ember Inspector and discussion forums are also mentioned. Finally, upcoming features like Ember CLI, HTMLBars and Ember Data 1.0 are highlighted.

Test box bdd
Test box bddTest box bdd
Test box bdd

This document provides an overview of Behavior Driven Development (BDD). It begins by introducing the speaker, Luis Majano, and his background. It then discusses the testing landscape, including the costs of fixing bugs at different stages of development. It provides an introduction to test-driven development (TDD) and how it differs from BDD. BDD combines TDD with domain-driven design and object-oriented principles to promote collaboration between developers, business analysts, and stakeholders. It focuses on user stories and scenarios rather than just functions. The remainder of the document discusses how to implement BDD using TestBox, a BDD testing framework for ColdFusion, including writing tests using describe(), it(), expectations, matchers, and

coldunit testingbdd
Refactor Large applications with Backbone
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
Refactor Large applications with Backbone
Refactor Large applications with Backbone

Recommended for you

Workflows and Digital Signatures
Workflows and Digital SignaturesWorkflows and Digital Signatures
Workflows and Digital Signatures

Shirak Avakian presented at the Adobe ColdFusion Summit 2015 on workflow in ColdFusion, PDF digital signatures, and the directory watcher. The presentation introduced the speaker and covered topics including how to create workflows in ColdFusion using the CFWorkflow component from GitHub, how digital signatures and public key infrastructure work with encrypting and validating PDFs in ColdFusion, and how to set up a directory watcher gateway to monitor a folder for changes. Demo code was provided to illustrate these ColdFusion features.

coldfusionsignaturesworkflows
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data

A few months after I started working with Ember.js & Ember Data at my new job we began a project to upgrade both. There were parts that were a breeze and others that were quite tricky. I'll walk you through some of the challenges we faced and how we solved them as well as how we began to prepare for the Ember 2.x architectural shift. Hopefully this talk will help save you some time when you decide to upgrade your Ember web application.

devobjective2016
Cold fusion is racecar fast
Cold fusion is racecar fastCold fusion is racecar fast
Cold fusion is racecar fast

ColdFusion is racecar fast according to the document. It discusses ColdFusion performance best practices and tuning based on the experience of Webapper, a company that co-founded in 2001 by former Allaire consultants. They share settings for optimizing ColdFusion performance including memory, thread settings, JVM configuration, and monitoring tools to identify bottlenecks. Live load testing is demonstrated on AWS to show how tuning ColdFusion can achieve high request per second throughput without slowdowns.

performancebest practicescoldfusion
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
Refactor Large applications with Backbone
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

2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd

This document discusses test-driven development (TDD) and behavior-driven development (BDD). It defines TDD as a process of writing automated tests before code to define desired functionality, then writing minimum code to pass tests and refactoring. BDD combines TDD techniques with domain-driven design and focuses on user stories over functions to promote communication. The document provides an example of using BDD to generate scenarios for a life insurance risk example, and shows how TestBox can be used to write automated tests based on those scenarios.

bddbdd tdd unit testing lego coldfusiontdd
Solving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better WaysSolving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better Ways

Charlie Arehart gave a presentation on solving frequent ColdFusion server problems in new and better ways. He discussed using server logs more effectively to diagnose issues, various tools for monitoring CF servers beyond just watching monitors, and specific things to watch like memory, requests, queries and sessions. He provided examples of common challenges encountered and resources for further troubleshooting assistance.

coldfusion
2014 cf summit_clustering
2014 cf summit_clustering2014 cf summit_clustering
2014 cf summit_clustering

This document discusses different ways of clustering ColdFusion applications for scalability, high availability, and failover. It covers vertical clustering by running multiple instances on the same server, horizontal clustering across multiple servers, and distributed architectures with the web and application servers on separate machines. It also discusses load balancing, session management, and demo's setting up different cluster configurations.

coldfusionclustering
Refactor Large applications with Backbone
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)
Refactor Large applications with Backbone
Refactor Large applications with Backbone

Recommended for you

Realtime with-websockets-2015
Realtime with-websockets-2015Realtime with-websockets-2015
Realtime with-websockets-2015

Giancarlo Gomez presented on using websockets for realtime applications with ColdFusion. He began by explaining what websockets are and how they allow for bidirectional messaging with low latency compared to HTTP polling techniques. He then demonstrated how to enable and use websockets in ColdFusion, including securing connections and using websockets in a clustered environment. Finally, he discussed real world uses of websockets and issues to consider like network connections and application reloads.

coldfusioncfsummit2015websockets
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq

This document discusses using RabbitMQ for messaging between applications. It begins with an introduction to the presenter and agenda. It then contrasts traditional RPC-style calls with messaging and covers some benefits of messaging like decoupling and flexibility. Common messaging patterns like publish/subscribe, topics, and work queues are introduced. The AMQP protocol and RabbitMQ implementation are explained. Finally, a demo of RabbitMQ is promised and questions are solicited.

rabbit mq
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code

Microsoft has traditionally been a laggard in the JavaScript space, making such developers question whether their war cries were being heard aloud. Fortunately, the situation is rapidly improving since the release of Visual Studio Code. Code is a free, lightweight, cross-platform code editor which is sure to change your perception of Microsoft. This presentation will demonstrate how to utilize popular JavaScript tooling within the editor. The focus will be placed on the first-class support for debuggers, linters, transpilers, and task runners.

devobjective
Refactor Large applications with Backbone
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
Refactor Large applications with Backbone
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

I am-designer
I am-designerI am-designer
I am-designer

This document is a presentation about design fundamentals given by Justine Arreche. It covers grids and content structure, color theory, and typography. For grids, it emphasizes laying out a grid first to keep content organized. For color theory, it discusses using relevant colors based on message, contrasting colors, and color schemes. For typography, it outlines basic differences between serif and sans-serif fonts and keeping fonts within the same family or with similar traits while allowing some daring choices.

web design
Preso slidedeck
Preso slidedeckPreso slidedeck
Preso slidedeck

This document contains notes from a presentation on software architecture. It discusses key principles like examining requirements to understand user needs, designing for foreseeable changes, and clear communication between architects and developers. Case studies are used to illustrate how understanding the problem domain leads to more elegant solutions. Overall it emphasizes that architecture is about managing risks to the application and examining all factors, known and unknown.

Command box
Command boxCommand box
Command box

CommandBox is a ColdFusion command line interface (CLI) and package manager that allows developers to work more efficiently. It features a package manager for installing dependencies, a read-eval-print loop (REPL) for executing code, an integrated server for running apps, and automation capabilities through commands and recipes. CommandBox aims to improve how ColdFusion developers work by bringing the power of the command line and modern tooling to CFML.

clicfmlcoldfusion
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

Accessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWSAccessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWS

This document discusses building an accessible video platform using ColdFusion and AWS services. It begins with an overview of relevant laws and forces around accessibility. It then covers various AWS services that could be used like S3, CloudFront, Elastic Transcoder, Lambda, DynamoDB, SNS, and SES. Version 2 of the architecture is described using these services. Version 3 improvements around file naming, error handling, and utilities are discussed. Challenges around security, timeouts, retries, and debugging are covered. Benefits of using AWS include no servers to maintain, fast performance, low cost, and ability to learn new technologies. The presentation concludes by encouraging questions.

coldfusionvideo
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

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
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
'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

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
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
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

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

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]

React FUNdamentals Jarrod Servilla, Daniel Laufer, and Milind Vishnoi on October 27, 2021 Learn the fundamentals of React!

More Related Content

What's hot

The Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.jsThe Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.js
Holly Schinsky
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
Gunnar Hillert
 
Angular js
Angular jsAngular js
Angular js
Knoldus Inc.
 
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
 
Love at first Vue
Love at first VueLove at first Vue
Love at first Vue
Dalibor Gogic
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
ArezooKmn
 
Vue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thingVue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thing
Joonas Lehtonen
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
Javier Lafora Rey
 
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
 
JavaScript Patterns and Principles
JavaScript Patterns and PrinciplesJavaScript Patterns and Principles
JavaScript Patterns and Principles
Aaronius
 
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
 
Vuex
VuexVuex
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.js
Takuya Tejima
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Luciano Mammino
 
Create Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express FrameworkCreate Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express Framework
Edureka!
 
125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용
NAVER D2
 
The Art of AngularJS in 2015
The Art of AngularJS in 2015The Art of AngularJS in 2015
The Art of AngularJS in 2015
Matt Raible
 
Workshop 15: Ionic framework
Workshop 15: Ionic frameworkWorkshop 15: Ionic framework
Workshop 15: Ionic framework
Visual Engineering
 
Thinking in Components
Thinking in ComponentsThinking in Components
Thinking in Components
FITC
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial
Claude Tech
 

What's hot (20)

The Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.jsThe Point of Vue - Intro to Vue.js
The Point of Vue - Intro to Vue.js
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
Angular js
Angular jsAngular js
Angular js
 
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
 
Love at first Vue
Love at first VueLove at first Vue
Love at first Vue
 
introduction to Vue.js 3
introduction to Vue.js 3 introduction to Vue.js 3
introduction to Vue.js 3
 
Vue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thingVue.js is boring - and that's a good thing
Vue.js is boring - and that's a good thing
 
An introduction to Vue.js
An introduction to Vue.jsAn introduction to Vue.js
An introduction to Vue.js
 
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
 
JavaScript Patterns and Principles
JavaScript Patterns and PrinciplesJavaScript Patterns and Principles
JavaScript Patterns and Principles
 
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
 
Vuex
VuexVuex
Vuex
 
Vue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.jsVue 2.0 + Vuex Router & Vuex at Vue.js
Vue 2.0 + Vuex Router & Vuex at Vue.js
 
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
Universal JS Web Applications with React - Luciano Mammino - Codemotion Rome ...
 
Create Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express FrameworkCreate Restful Web Application With Node.js Express Framework
Create Restful Web Application With Node.js Express Framework
 
125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용
 
The Art of AngularJS in 2015
The Art of AngularJS in 2015The Art of AngularJS in 2015
The Art of AngularJS in 2015
 
Workshop 15: Ionic framework
Workshop 15: Ionic frameworkWorkshop 15: Ionic framework
Workshop 15: Ionic framework
 
Thinking in Components
Thinking in ComponentsThinking in Components
Thinking in Components
 
Angular JS blog tutorial
Angular JS blog tutorialAngular JS blog tutorial
Angular JS blog tutorial
 

Viewers also liked

Java scriptconfusingbits
Java scriptconfusingbitsJava scriptconfusingbits
Java scriptconfusingbits
ColdFusionConference
 
Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion
ColdFusionConference
 
API Management from the Trenches
API Management from the TrenchesAPI Management from the Trenches
API Management from the Trenches
ColdFusionConference
 
Java scriptconfusingbits
Java scriptconfusingbitsJava scriptconfusingbits
Java scriptconfusingbits
ColdFusionConference
 
Setting up your multiengine environment Apache Railo ColdFusion
Setting up your multiengine environment Apache Railo ColdFusionSetting up your multiengine environment Apache Railo ColdFusion
Setting up your multiengine environment Apache Railo ColdFusion
ColdFusionConference
 
Emberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applicationsEmberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applications
ColdFusionConference
 
Test box bdd
Test box bddTest box bdd
Test box bdd
ColdFusionConference
 
Workflows and Digital Signatures
Workflows and Digital SignaturesWorkflows and Digital Signatures
Workflows and Digital Signatures
ColdFusionConference
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
ColdFusionConference
 
Cold fusion is racecar fast
Cold fusion is racecar fastCold fusion is racecar fast
Cold fusion is racecar fast
ColdFusionConference
 
2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd
ColdFusionConference
 
Solving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better WaysSolving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better Ways
ColdFusionConference
 
2014 cf summit_clustering
2014 cf summit_clustering2014 cf summit_clustering
2014 cf summit_clustering
ColdFusionConference
 
Realtime with-websockets-2015
Realtime with-websockets-2015Realtime with-websockets-2015
Realtime with-websockets-2015
ColdFusionConference
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
ColdFusionConference
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
ColdFusionConference
 
I am-designer
I am-designerI am-designer
I am-designer
ColdFusionConference
 
Preso slidedeck
Preso slidedeckPreso slidedeck
Preso slidedeck
ColdFusionConference
 
Command box
Command boxCommand box
Accessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWSAccessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWS
ColdFusionConference
 

Viewers also liked (20)

Java scriptconfusingbits
Java scriptconfusingbitsJava scriptconfusingbits
Java scriptconfusingbits
 
Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion
 
API Management from the Trenches
API Management from the TrenchesAPI Management from the Trenches
API Management from the Trenches
 
Java scriptconfusingbits
Java scriptconfusingbitsJava scriptconfusingbits
Java scriptconfusingbits
 
Setting up your multiengine environment Apache Railo ColdFusion
Setting up your multiengine environment Apache Railo ColdFusionSetting up your multiengine environment Apache Railo ColdFusion
Setting up your multiengine environment Apache Railo ColdFusion
 
Emberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applicationsEmberjs building-ambitious-web-applications
Emberjs building-ambitious-web-applications
 
Test box bdd
Test box bddTest box bdd
Test box bdd
 
Workflows and Digital Signatures
Workflows and Digital SignaturesWorkflows and Digital Signatures
Workflows and Digital Signatures
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
 
Cold fusion is racecar fast
Cold fusion is racecar fastCold fusion is racecar fast
Cold fusion is racecar fast
 
2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd2015 in tothebox-introtddbdd
2015 in tothebox-introtddbdd
 
Solving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better WaysSolving Frequent ColdFusion Server Problems in New and Better Ways
Solving Frequent ColdFusion Server Problems in New and Better Ways
 
2014 cf summit_clustering
2014 cf summit_clustering2014 cf summit_clustering
2014 cf summit_clustering
 
Realtime with-websockets-2015
Realtime with-websockets-2015Realtime with-websockets-2015
Realtime with-websockets-2015
 
Multiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mqMultiply like rabbits with rabbit mq
Multiply like rabbits with rabbit mq
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
I am-designer
I am-designerI am-designer
I am-designer
 
Preso slidedeck
Preso slidedeckPreso slidedeck
Preso slidedeck
 
Command box
Command boxCommand box
Command box
 
Accessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWSAccessible Video Anywhere with ColdFusion an AWS
Accessible Video Anywhere with ColdFusion an AWS
 

Similar to Refactor Large applications with Backbone

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
 
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
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
Ioan Eugen Stan
 

Similar to Refactor Large applications with Backbone (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...
 
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
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 

More from ColdFusionConference

Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
ColdFusionConference
 
Cf ppt vsr
Cf ppt vsrCf ppt vsr
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
ColdFusionConference
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
ColdFusionConference
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
ColdFusionConference
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
ColdFusionConference
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
ColdFusionConference
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
ColdFusionConference
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
ColdFusionConference
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
ColdFusionConference
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
ColdFusionConference
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
ColdFusionConference
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusionConference
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
ColdFusionConference
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
ColdFusionConference
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
ColdFusionConference
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
ColdFusionConference
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
ColdFusionConference
 
Securing applications
Securing applicationsSecuring applications
Securing applications
ColdFusionConference
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
ColdFusionConference
 

More from ColdFusionConference (20)

Api manager preconference
Api manager preconferenceApi manager preconference
Api manager preconference
 
Cf ppt vsr
Cf ppt vsrCf ppt vsr
Cf ppt vsr
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
API Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIsAPI Economy, Realizing the Business Value of APIs
API Economy, Realizing the Business Value of APIs
 
Don't just pdf, Smart PDF
Don't just pdf, Smart PDFDon't just pdf, Smart PDF
Don't just pdf, Smart PDF
 
Crafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an ArchitectCrafting ColdFusion Applications like an Architect
Crafting ColdFusion Applications like an Architect
 
Security And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API ManagerSecurity And Access Control For APIS using CF API Manager
Security And Access Control For APIS using CF API Manager
 
Monetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APISMonetizing Business Models: ColdFusion and APIS
Monetizing Business Models: ColdFusion and APIS
 
Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016Become a Security Rockstar with ColdFusion 2016
Become a Security Rockstar with ColdFusion 2016
 
ColdFusion in Transit action
ColdFusion in Transit actionColdFusion in Transit action
ColdFusion in Transit action
 
Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016Developer Insights for Application Upgrade to ColdFusion 2016
Developer Insights for Application Upgrade to ColdFusion 2016
 
Where is cold fusion headed
Where is cold fusion headedWhere is cold fusion headed
Where is cold fusion headed
 
ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995ColdFusion Keynote: Building the Agile Web Since 1995
ColdFusion Keynote: Building the Agile Web Since 1995
 
Instant ColdFusion with Vagrant
Instant ColdFusion with VagrantInstant ColdFusion with Vagrant
Instant ColdFusion with Vagrant
 
Restful services with ColdFusion
Restful services with ColdFusionRestful services with ColdFusion
Restful services with ColdFusion
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
Build your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and webBuild your own secure and real-time dashboard for mobile and web
Build your own secure and real-time dashboard for mobile and web
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
 
Securing applications
Securing applicationsSecuring applications
Securing applications
 
Testing automaton
Testing automatonTesting automaton
Testing automaton
 

Recently uploaded

BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
Liveplex
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
UiPathCommunity
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
Sally Laouacheria
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
Stephanie Beckett
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Bert Blevins
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 

Recently uploaded (20)

BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALLBLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
BLOCKCHAIN FOR DUMMIES: GUIDEBOOK FOR ALL
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
UiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs ConferenceUiPath Community Day Kraków: Devs4Devs Conference
UiPath Community Day Kraków: Devs4Devs Conference
 
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf20240702 Présentation Plateforme GenAI.pdf
20240702 Présentation Plateforme GenAI.pdf
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024What’s New in Teams Calling, Meetings and Devices May 2024
What’s New in Teams Calling, Meetings and Devices May 2024
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
Understanding Insider Security Threats: Types, Examples, Effects, and Mitigat...
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 

Refactor Large applications with Backbone

  • 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/