Goin' Full Require: Turtles All The Way Down

2012 Nov14

ow that we are comfortable the syntax for creating and loading modules we need to set up configure **RequireJS** to load anything and everything we want for our applications. Luckily the configuration API for RequireJS is rather straight forward and allows for a lot of flexibility. Configuring RequireJS is a simple as passing it an Object literal.

var SiteName = require({ });

Pretty simple! The require function returns a configured instance of RequireJS so you can stash it in a variable and use it as the loader for a specific set of modules, or as it if were your applications primary name space. Now, there are 3 options in particular we are going to want to pay special attention to -

Read More
filed under:  javascript amd requirejs

Goin' Full Require: Moving To AMD

2012 Nov02

MD ( [Asyncronous Module Definition](http://wiki.commonjs.org/wiki/CommonJS) ) is a apart of the [CommonJS](http://www.commonjs.org/) movement. It aims to bring something to javasscript is very much needed in todays world of browser based applications. And that is the idea of modules. A logical way of breaking your apps into smaller, more logical peices and import dependencies only in the situations that you actually need them. [RequireJS](http://www.requirejs.org) is at the fore front of JavaScript Module loaders, and for good reason. When you start to dig into RequireJS, you'll find that it isn't just a fancy script loader, but more of a micro-framework for managing large JavaSscript Apps.

Make The Move


Read More
filed under:  javascript amd requirejs modules

Case Study: Cross Browser Logging AMD Module

2012 Apr24

he console object, which allows developers to echo arbitrary pieces of data out to a console in the browser, is becoming a standard piece of equipment in most browsers. However, there are some browsers that do not have a console implemented, and leaving code that references the console object in browsers that do not have one will cause your javascript programs to die.

To normalize and remedy this pain point in development We will define a Log module to encapsulate the desired functionality. Or example will aim to mimic the api of the popular firebug development tool as well as provide a fallback for browsers that do not implement a logging console as well as for browsers that do

Read More
filed under:  log amd commonjs console requirejs