Category Archives: WinJS

JavaScript Promises: A Journey To The “Promise Land”

Promises certainly aren’t the holy grail of asynchronous flow control in JavaScript. There are no silver bullets, after all. Promises are a tremendously important concept, and one that you need to understand, though. They’ve been around for a few years, … Continue reading 

Also posted in Javascript, JQuery, NodeJS, Qjs, RSVPjs, Screencast, WatchMeCode | Leave a comment

Consistency Problems With APIs In JavaScript Promise Libraries

Promises are a powerful way to handle asynchronous code in JavaScript. They give us a lot of opportunity to clean up code, and to write code that can register work to be done when the promise is resolved, whether or … Continue reading 

Also posted in Async, Javascript, JQuery, NodeJS, Promises, Qjs, RSVPjs, User Experience | 10 Comments

A WinJS SpecRunner: Automating Script Tag Insertion For Unit Tests

Writing unit tests with Mocha or Jasmine is generally pretty easy. Once you have a test runner set up, it’s not much different than any other JavaScript environment, really. But the trick to this is getting a test runner set … Continue reading 

Also posted in Jasmine, Javascript, MochaJS, Productivity, Test Automation, Unit Testing | 3 Comments

Asynchronous Unit Tests With Mocha, Promises, And WinJS

Before I get in to the guts of this post, you need to read Christopher Bennage’s post on how we have our Mocha test suite set up for our Win8 / WinJS project. It’s not the best setup, but it … Continue reading 

Also posted in Async, ChaiJS, CommonJS, Javascript, MochaJS, Testing | 12 Comments

WinJS Event Aggregators And Observable/Evented Objects

In a previous post, I showed a very brief intro to using an application level event aggregator in WinJS. At the end of that post, I hinted at an option I was looking in to for creating localized event aggregators … Continue reading 

Also posted in Classy Inheritance, Design Patterns, Javascript | 5 Comments

A Quick Note On Pub-Sub / Event Aggregators In WinJS/WinRT

By now you know that I’m a fan of pub-sub / event aggregators, whether it’s .NET / Winforms or Backbone or whatever. For the last 3 weeks working on this WinJS / WinRT app with the Microsoft P&P group, I’ve … Continue reading 

Also posted in Design Patterns, Javascript | 4 Comments

Partially Applied Functions In JavaScript

I’m finding myself doing more and more functional programming with JavaScript lately – especially in recent days with this WinJS project I’m working on, and the heavy use of promises that it encourages. This feels a little odd to me, … Continue reading 

Also posted in Async, ECMAScript, Functional, Javascript, Underscore | 8 Comments

Want To Build Win8/WinJS Apps? You Need To Understand Promises.

If you’re not following me on Twitter, you may not know about my current project work. I’m working with Christopher Bennage and the Microsoft Patterns & Practices group to build a Windows 8, WinJS, Metro-style app with HTML, CSS and … Continue reading 

Also posted in Async, CommonJS, Javascript | 4 Comments