Category: JavaScript

JavaScript minification. It’s easy!

Minification is definitely not rocket science. You just need a few simple tools… cat or type – to concatenate files. (type for Windows users) minifier – a js minifier (there are many, if you don’t fancy minifier) Setting up the tools is easy… cat / type – Nothing to do! minifier – Simply Run:  npm install -g minifier        >>Don’t have npm!?!? It ships with Node.js. Get it here!<< And using the...

Modular AngularJS + RequireJS Seed Project

For the impatient: Skip reading this post and jump directly to the AngularJS + RequreJS seed project. To help folks get started with AngularJS, the Angular community has put together a number of nice seed projects. Some of these seed projects make use of RequireJS to manage script loading and modularization, others do not. Most however do not attempt to present a clean modular layout, instead they remain fairly monolithic and leave much...

JavaScript: Observer Pattern / Publish-Subscribe

In this post, I will describe how to create a reusable implementation of the Observer pattern (also known as Publish-Subscribe or Dependents (1)). This implementation can be applied to any JavaScript object to instantly make it observable! The implementation can also be used to create a global topic registry. First, what is the Observer Pattern? The Observer Pattern, as described by the ‘Gang of Four’, defines a one to many dependency...

Create a natural language question answering system with IBM Watson on Bluemix

See my latest blog post on developerWorks. The topic is how to ‘Create a natural language question answering system with IBM Watson on Bluemix’. I co-wrote the article with Swami Chandrasekaran. It is incredibly cool stuff. I hope you enjoy!   Here is a brief intro to wet your appetite: Cognition is in virtually everything that humans do, such as language understanding, perception, judgment, motor skills, learning, spatial processing and...

Create a REST API with Node.js, Express, and MongoDB

Creating a REST API with Node.js is simple, fast, and efficient. Node.js is lightweight, non-blocking, and perfect for data-intensive applications. Node.js, although young, has a strong community backing. The Node.js community provides a vast array of modules that can be leveraged to simplify the implementation process. Node.js also has support for many widely used offerings. In this post, we will use MongoDB with Node.js. We will also use two modules,...