All articles tagged as:

javascript

Deploying Sails.JS to Heroku

I've been interested in Node.JS for quite some time now but I haven't really realized its potential or find a use case. The extent of my experience was basically creating a quick Express.JS app and see it run in the browser. No formal development whatsoever. I have come across Sails.JS in the past but that's when Node was just in its early stages, or at least before I was interested in the platform. Sails.js coincides with or sits on top of Express.JS using the same MVC pattern as Rails. I watched the introduction video again for Sails.JS today and was amazed at how powerful it is. The ease…

Read more »

Using jQuery Deferred for long operations

The jQuery $.when() (part of the deferred object) function works great when using the AJAX function since it uses the deferred object by default. What if you want to do something similar when performing asynchronous/synchronous operations by means of regular functions such as? $.when(firstFunction(), secondFunction()).then(function() { console.log('Execute when all functions has completed'); }); Given the scenario above, what if you have a function that takes a little bit longer than the other function such as. /** Create a long operation */ var loadQueue = function() { var dfrQueue…

Read more »