tag : how to

Synchronizing Asynchronous JavaScript With ES7

ECMAScript version 5 is the latest complete version of JavaScript available and is implemented in every major browser, but ES6 is in the works and promises a much better world for JavaScript developers with features such as a simple class syntax, arrow functions, built-in promises and the like. It doesn’t stop there, though; we’re already looking ahead to ES7 while ES6 is still cooking in the oven. In particular, I’m extremely excited about asynchronous functions.

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).

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.

Tips for Front End Unit Testing

Building complex programs is just a matter of breaking it down into smaller units, and then putting them together. Unit testing is the testing of those smaller units. If you haven’t written unit tests for your code yet, you should. It’s worth the effort. It helps you think through the expectations of your code in an organized way, minimizes risk and effort when changing that code, and encourages modular design — which has its own benefits.

JavaScript Auto-Completion for Notepad++

Good code editors generally all share some common features such as syntax highlighting, tabs for editing multiple files, automatic tabbing to keep the same indentation level, and of course auto-completion. Notepad++ is a well known code editor that’s lightweight and extendable. Many people don’t realize, though, how to turn on auto-completion for this editor and ask me how I do it.