home

You're Using jQuery.html() Wrong!

Well, you probably are doing it wrong. jQuery’s html function is a very nice way to replace the contents of an element with new contents. Its usefulness is supposedly limited, though, according to the API documentation for this method. Every day jQuery users use this powerful method in a way that it was never meant to be used, and it works, but does that mean we should still do it?

Making a Node.js Command-Line Utility

Today, we’re going to cover how to turn your Node.js script into a native command-line utility, and then how to share it with the world using NPM (Node Package Manager). In the video, I’m using the trial-and-error approach to show you everything that is required and show the errors you might encounter along the way if you forget a step. It’s actually quite simple.

Backbone.js (Sub)View Rendering Trick

In Backbone.js, rendering views is really simple, yet not so much. It’s simple because Backbone doesn’t force you into doing it any specific way, so you have freedom to just use a bit of jQuery and dump the HTML into an element. Then again, since it doesn’t implement anything on its own, we’re stuck writing our own implementations, making it more difficult than it could otherwise be. In the case of rendering subviews, things can definitely get a little more difficult.

Polyfilling HTML5 and CSS3 With Modernizr

HTML5 and CSS3 offer web developers a lot of great options for making their websites much more beautiful and with much less work than what was previously possible. There’s one looming problem though: the lack of browser support. Thankfully, though, many JavaScript developers have been hard at work creating shims and polyfills to bring these wonderful capabilities to even the most feeble browsers.

Minecraft + Node.js + Socket.io = Awesome

Have you ever found programming extremely enjoyable? I hope so, otherwise you probably shouldn’t be programming. Well, either way, I found a whole new way of making programming fun: integrating new programming technologies to make your games even easier to use! In this article in video, I show you how I gave myself and my friends the ability to completely control my Minecraft servers through a simple web application interface using Node.js and Socket.io.

August Update: Appliness and js13kGames

There are a couple of cool things going on around the internet that I felt should be shared with all of you. First of all is Appliness, a digital, monthly web development magazine that pools some of the greatest articles from around the web and compiles them into an interactive book. Second is a JavaScript and HTML5 game competition known as js13kGames. Too many lower case letters there if you ask me.

Automatic Minification With Node.js and RequireJS

Last time we talked about how to use NPM and some of the command line utilities that you can install that are built using Node.js. Today, we’re actually going to build a small command line utility ourselves that can be a bit of a time saver. We’re going to use the RequireJS optimizer to automatically concatenate and minify our CSS files the moment any of them are changed.

NPM and Using Node as a Command Line Tool

Node.js was made to bring JavaScript to the web server so that people could use the same language on their front and back end, but that’s not its only possibility. Though it might not be extremely well suited for it, Node.js can still allow you to run command line tools easily. Many of the packages on NPM are command-line tools that make your workflow much smoother. Let’s take a look at some.

JZ Publish/Subscribe Updated to 1.4

One of the projects here on Joe Zim’s JavaScript blog is a Pub/Sub jQuery plugin that allows you to do the simple and generic subscribe, unsubscribe, and publish capabilities that you already find in jQuery (through on/bind, off/unbind, and trigger) but without all the extra overhead that jQuery has. JZ Publish/Subscribe has been updated to 1.4 and features a simple bug fix. You can also read about what to expect in 2.0, but I wouldn’t hold my breath for it.

Node.js for True Beginners

I remember trying to get into starting with Node.js months ago and, to be frank, it wasn’t the simplest process. Installation was a hassle, and pretty much required the use of a Linux of Mac computer. Now, Node.js has evolved to the point where just about anyone can get started using Node.js (maybe not my grandparents, but they don’t even have a computer). Let’s get started!