Javascript (19)


Signature Pad with HTML5

I was recently asked to create a signature pad for desktop and mobile browsers to save customer signatures. The solution included using the <canvas> element and adding event listeners for both mouse and touch events to draw the signature lines on the canvas. First thing is we have to create a canvas element. <canvas id=”canvas” […]




ASP.NET MVC Validation with Twitter’s Bootstrap

To all ASP.NET MVC developers who use Twitter’s bootstrap, here’s a quick script you can drop into your web apps to integrate “MVC type” validation with Bootstrap styling. Keep in mind, I didn’t write this from scratch. I found several snippets on StackOverflow and dumped them into a js file so it may need tweaking […]




NPM Cheat Sheet

Node Package Manager (NPM) is an awesome tool that installs nodeJS programs. It also makes it easier to specify and link dependencies. All nodeJS developers have used NPM one time or another. If you haven’t then you must be some sort of genius. I’ve put together my own personal cheat sheet of useful NPM commands […]




Nide – An IDE for Node.js

While scouring the internet looking for Node.js tools, I came across Nide. Nide is a web-based IDE designed specifically for Node.js. The Nide IDE is available both as a command-line tool and as a standalone Mac app. I’ve been trying out Nide for the past few days and I absolutely recommend it to anyone developing […]




Events in Node.js

Since Javascript is an event driven language, many objects in Node.js emit events. Events are the important things that make Node.js awesome. There are tons of objects that emit events in node. You can find several examples in the documentation. To access events you need to use require(“events”). I’ve written a sample application that demonstrates […]




Form Validation in Node.js with Express-Validator

I spent a good amount of time scouring the internet for a good form validation tutorial using Node.js. Since I was only able to find one decent tutorial I decide to write my own using express-validator, which is an express.js middleware for node-validator. If your using Node.js and your not using Express then you aren’t […]




A Sample App with Node.js, Express and MongoDB – Part 2

In my last post, we created a simple Employee database using Node, Express and MongoDB. In this tutorial, we’ll add the ability to edit and delete employees. Edit an Employee The first thing we need to do is add additional functions to employeeprovider.js. employeeprovider.js //find an employee by ID EmployeeProvider.prototype.findById = function(id, callback) { this.getCollection(function(error, […]