home

JavaScript Asynchronous Architectures: Events vs. Promises

I can’t go a single week without reading another article talking about promises. I’m not talking about when you promise your child that you’ll be there for his baseball game. I’m talking about a JavaScript concept that makes it simple to react to the completion of asynchronous actions without indenting ten levels when you need to perform one asynchronous action after another. While working on a Backbone application, I tried to use promises in my main asynchronous processes, and I’m not sure it measures up to my previous event hub architecture. Let’s compare!

Giveaway: JavaScript From the Ground Up

On this site, I offer tutorials and articles to the public for no charge. There are many places you can go, though, that offer in-depth and very thorough tutorials for a fee. Of course, these charges are warranted. I could never put together something so complete without charging for it and there’s no way I’d demand someone else to do it either. Well, today I’m offering coupons to receive access to the “JavaScript Training from the Ground Up“ course on udemy.com for absolutely free (normally $35).

Is Sending Messages Through WebSockets Slow on Chrome?

It wasn’t long ago that I ran into a strange issue with Chrome. My Jasmine tests were failing because the timeout on the asynchronous actions was too short for Chrome, even though they worked perfectly fine for Firefox. This led to me writing some tests to see if Chrome’s WebSocket implementation was slow which gave some pretty interesting results. I’ve also heard some interesting results from my readers, so I decided to investigate some more.

Book Review: Clean Code: A Handbook of Agile Software Development

Every once in a while, a book is published that is considered a must-read for every JavaScript developer who wants to be able to do his or her job the right way and understand JavaScript the way it should be understood. Well, Clean Code is one of those books, except it’s not just for JavaScript developers. This book will enlighten every programmer and bring them to an understanding of how great programming is achieved in practically any language.

Are WebSockets Slow on Chrome?

In my last article where I talked about unit testing Socket.IO with Jasmine, there was a point where I mentioned that I needed to use timeouts that were a second and a half when doing the asynchronous connecting and disconnecting from the Socket.IO server. It was working just fine with 750 millisecond timeouts on Firefox, but when I tested it in Chrome, timeouts were being reached and the specs were failing. Let’s see if we can get to the bottom of this and figure out why Chrome failed so hard here.

Unit Testing Socket.IO With Jasmine

Recently I finished up talking about how to use Jasmine as your JavaScript Unit Testing framework (part 1 and part 2). In there I mentioned how to test asynchronous methods, but I decided to write up a more useful example while giving you a sneak peak of the current state of a component from my Minecraft Server Manager project. Here you’ll see how I handled Socket.IO both for the application and for testing.

Using jQuery to Delay SharePoint Navigation Hover

SharePoint is a separate kind of beast. You would think you could easily go make adjustments but it’s not always the case. The problem is when you come to the point where you need to do a SharePoint migration and need to rewrite all your code. However, that is a whole other story. In this article the problem I want to solve is the annoying drop down menu in SharePoint Publishing sites that shows up way too quickly and therefore annoys our End Users who accidently hover over it.

JavaScript Unit Testing With Jasmine: Part 2

Last week, we started strolling through Jasmine and seeing what it had to offer us with regards to unit testing. Today, we’ll be finishing that up with some of the more advanced features included with Jasmine so that you can see the whole package and get started unit testing your own JavaScript. Trust me, even its advanced features are simple to use, so there shouldn’t be anything holding you back from reading this and getting started doing your own unit testing.

JavaScript Unit Testing With Jasmine: Part 1

Now that you have an awesome testing environment with Testem set up, you need to actually start writing tests. This is where people begin to feel daunted. “Oh no, I need to learn another library” comes to many people’s minds and because this library doesn’t add any cool features to your site or application, it doesn’t seem like much fun. We need to brush that aside, though, because testing libraries tend to have very, very simple APIs and can be learned within a couple hours of tinkering. Let me prove it to you.

Setting Up a Jasmine Unit Testing Environment With Testem

Everyone knows now that unit testing is good and that they should do it, but it’s not exactly simple to get started, but once you’re going, it’s pretty simple and highly valuable. But how do you get started? I’ll show you a great setup for Jasmine to get you up and running with unit testing and doing it with style with Testem. Testem and Jasmine come together to make unit testing fun and simple.