background preloader

Patterns For Large-Scale JavaScript Application Architecture

Patterns For Large-Scale JavaScript Application Architecture
Today we're going to discuss an effective set of patterns for large-scale JavaScript application architecture. The material is based on my talk of the same name, last presented at LondonJS and inspired by previous work by Nicholas Zakas. Who am I and why am I writing about this topic? I'm currently a JavaScript and UI developer at AOL helping to plan and write the front-end architecture to our next generation of client-facing applications. As these applications are both complex and often require an architecture that is scalable and highly-reusable, it's one of my responsibilities to ensure the patterns used to implement such applications are as sustainable as possible. I also consider myself something of a design pattern enthusiast (although there are far more knowledgeable experts on this topic than I). Can you summarize this article in 140 characters? In the event of you being short for time, here's the tweet-sized summary of this article: What exactly is a 'large' JavaScript application?

Initializr - Start an HTML5 Boilerplate project in 15 seconds! Former Apple HTML5 Leader Builds His Own Apps Platform His brainchild is SproutCore, a JavaScript library whose goal is to accelerate HTML5 apps on multiple platforms, including tablets, so their execution speed approaches that of native apps. Charles Jolley began work on SproutCore at Apple, and was a key architect for Apple's vision of HTML5: a standards-driven effort that could yet be maneuvered to showcase Apple's strengths. But one of that effort's first culminations was MobileMe, Apple's first attempt at a data-syncing service for Mac and iPod/iPhone customers. That effort became synonymous with "disaster," one which then-CEO Steve Jobs promised to rebuild. Not very good with failures, Apple let MobileMe languish, and its HTML5 message was dialed down. The list of people who have left Apple to do something successful is very, very short - after Steve Jobs himself, the names aren't very recognizable. The Apple platform for apps delivery is rich and compelling, Jolley points out.

The New Methodology In the past few years there's been a blossoming of a new style of software methodology - referred to as agile methods. Alternatively characterized as an antidote to bureaucracy or a license to hack they've stirred up interest all over the software landscape. In this essay I explore the reasons for agile methods, focusing not so much on their weight but on their adaptive nature and their people-first orientation. Probably the most noticeable change to software process thinking in the last few years has been the appearance of the word 'agile'. We talk of agile software methods, of how to introduce agility into a development team, or of how to resist the impending storm of agilists determined to change well-established practices. This new movement grew out of the efforts of various people who dealt with software process in the 1990s, found them wanting, and looked for a new approach to software process. This essay was originally part of this movement. From Nothing, to Monumental, to Agile .

A re-introduction to JavaScript Why a re-introduction? Because JavaScript is notorious for being the world's most misunderstood programming language. It is often derided as being a toy, but beneath its layer of deceptive simplicity, powerful language features await. It's useful to start with an overview of the language's history. Several months later, Microsoft released JScript with Internet Explorer 3. Because it is more familiar, we will refer to ECMAScript as "JavaScript" from this point on. Unlike most programming languages, the JavaScript language has no concept of input or output. Overview JavaScript is a multi-paradigm, dynamic language with types and operators, standard built-in objects, and methods. Let's start off by looking at the building blocks of any language: the types. ... oh, and undefined and null, which are ... slightly odd. And there are some built-in Error types as well. Numbers Numbers in JavaScript are "double-precision 64-bit format IEEE 754 values", according to the spec. parseInt('11', 2); And:

cryptico.js - An easy-to-use strong encryption system utilizing RSA and AES for javascript. Google C++ Style Guide Definition: Streams are a replacement for printf() and scanf(). Pros: With streams, you do not need to know the type of the object you are printing. You do not have problems with format strings not matching the argument list. (Though with gcc, you do not have that problem with printf either.) Streams have automatic constructors and destructors that open and close the relevant files. Cons: Streams make it difficult to do functionality like pread(). Decision: Do not use streams, except where required by a logging interface. There are various pros and cons to using streams, but in this case, as in many other cases, consistency trumps the debate. Extended Discussion There has been debate on this issue, so this explains the reasoning in greater depth. Proponents of streams have argued that streams are the obvious choice of the two, but the issue is not actually so clear. cout << this; // Prints the address cout << *this; // Prints the contents

Backbone patterns Building apps with Backbone.js Here, I try to document the good practices that our team has learned along the way building Backbone applications. This document assumes that you already have some knowledge of Backbone.js, jQuery, and of course, JavaScript itself. Table of contents Thanks josephg/ShareJS - GitHub

Related: