Archives For web development

Photo Credit: Kris Krug

I have good news and bad news for you. SPDY is out (also known as HTTP/2), and it’s well supported enough that we’re seeing it in more places. SPDY, pronounced Speedy, is a new web protocol to replace HTTP and promises to make web browsing both faster, safer and more secure.

It’s quite common for web developers and server administrators to need details about what is happening when requests to the server are made. When you use plain HTTP (non SSL or TLS), it’s so easy, you can use any common telnet client. It is possible to use some helper tools to get the same effect to test SSL/TLS based websites.

Sadly, telnet won’t work for SPDY because it is no longer a text-based protocol, but there is a great command line tool that is easily installed that will help you get all the details you need about your connection. Continue Reading…


Like it or not, if you’re not writing apps with AngularJS, you’re not getting much freelance work. This is sad news for a few reasons, but maybe not the reason you’re thinking.

I like to keep my finger on the pulse of what skills are in demand. I do this because I help coordinate training events and part of that is deciding what topics we’ll present. A few good ways to do that are to keep an eye on the job boards and freelance websites. It’s no surprise that job boards are still overwhelmed with work in the typical enterprise topics. Java, C#, Ops, etc. UX is getting more prominence, which makes me feel good (that’s my main job function these days).

The freelance websites are showing a different trend. There, AngularJS is blowing up. Many of the front-end development jobs specify AngularJS as a requirement. Continue Reading…


I read an interesting article on about Why Python is perfect for startups. I’ve done the startup thing a couple times now and I’ve spent a lot of time developing with Python. I just wanted to add a little balance to that article and point out a few things to consider before investing in Python as the foundation for your new business.

Yes, I know, I’m about to unleash a holy war. Putting down someone’s favorite language, tool, whatever, is bound to frustrate people. So let me put this argument to rest before we begin. These are my opinions based on my observations. You are 100% free to have different opinions than I have. And, if you can do so politely, you are absolutely welcome to voice your opinions in the comment section below.

With that out of the way, let’s highlight four big concerns: Continue Reading…


Have you ever been doing a little web development and needed a web server for local testing? This usually happens to me when I’m doing Javascript and want to use a little Ajax. Much of what you do will work fine with the classic file:/// protocol, but sometimes that just won’t cut it.

Yeah, we can always use MAMP or XAMP or maybe you have a web server (IIS, Apache or Nginx) installed locally. Then you have to either move your files to the web root or configure it to point to your project folder, then remember how to start it (edit that config file). I just found a simpler way… Continue Reading…

Photo Credit: qnr

When you’re developing web apps they tend to start out simple and then grow more and more complicated. On your servers you have services for your dependencies, but when you’re in development mode, it can be tricky to get everything running at the right time. The tool I’ll show you here works for Node.js, PHP, Java, Ruby, Python and more.

I use a laptop as my main computer and in order to save battery life, I limit the number of services I have running. A common app may be built with Node.js and rely on MongoDB and Redis. Therefore I launch MongoDB, launch Redis, then when all are running, launch my Node app. Then when I’m done I have to remember to shut each down. It’s a chore – exactly the kind of chore computers are great at, so let’s have the computer do it for us. Continue Reading…

Photo Credit: Cayusa

It’s quite common to create an app where you want to protect numerous pages. It’s not difficult to check for req.user and force the user to a login page, but code duplication is not a good idea. Fortunately, it’s quite easy to write a middleware that will require authentication for a whole set or URLs.

First, we’ll set some assumptions: You’re using Express 4.x, you’re using router (is there any other way?) and you’re probably using Passport. I don’t think Passport is required for this solution, but it’s the only option I’ve tested with. Let’s assume that you’ve got a homepage that does not require authentication but the rest of your site, other than the login/logout/register pages, require authentication. Continue Reading…

Photo Credit: dzarro72

Recently I built a demo application using Sails 10.x (currently in beta) and needed to add authentication support to it. One of the challenges with this is that the documentation for the beta Sails is not complete yet, and much has changed. The documentation is still great, so I definitely recommend making it your first stop.

While browsing through NPM modules I found sails-generate-auth which looked like an excellent solution for authentication. Yes, it works, but unfortunately the documentation is not written very well. The Github page makes it look like all you need is a configuration file and you’re set. In reality, there is a bit more work to do. Here are the steps I took. Continue Reading…


“Handlebars” is a nickname for a fancy mustache. This pretty well embodies how Handlebars.js is a superset of the Mustache template library. Superset means that it has all the features of Mustache plus some extras. Like Mustache, Handlebars is a logicless template library. If you use a logicless template system after using tools like ASP or PHP you may feel there is a lot missing. It takes a little adjusting to, and one nice thing about Handlebars vs Mustache is that it makes the transition a little easier and more graceful.

Prior to my research for writing this series, Mustache was my favorite. I do still highly recommend it, but now I will be switching my work to using Handlebars.js. It has everything I like about Mustache, but it has a little better Javascript support, especially on the server side, and the conditional syntax is a little easier to use.

By the way, this is one part of a 5 piece series, so if you want to explore other options, don’t forget to visit the series start where I explain the biases and summary information and link to all of the tutorials.

Continue Reading…


Mustache is described, simply, as “logicless templates.” The first time I used mustache I was pretty surprised at how minimalistic it was. And by surprised, I mean frustrated. You have extremely basic conditionals, an iterator loop and the ability to display information. There is no “if” (per se), no ability to call functions, mustache is not in any way a programming language.

You may think there is a lot missing, and there is, but this is not bad. It forces you to keep your logic all in one place, in the program. This increases the manageability of your code-base. It also allows Mustache to be easily ported to many programming languages. You can use it with Javascript, via Hogan.js, the library I used in this example, or Java, PHP, Ruby and numerous other languages.

By the way, this is one part of a 5 piece series, so if you want to explore other options, don’t forget to visit the series start where I explain the biases and summary information and link to all of the tutorials. Continue Reading…


JSHTML provides an adaption of the razor view engine in Javascript. If you’ve used the Razor view engine for .Net languages then this could be the right template for you and your Node.js project. However, you’ll have to be more tenacious than I am, because the version bundled with Node.js is broken.

As a matter of fact, this will be quite a short review because I couldn’t find enough redeeming qualities to warrant the extra work to get it integrated.

By the way, this is one part of a 5 piece series, so if you want to explore other options, don’t forget to visit the series start where I explain the biases and summary information and link to all of the tutorials.

Continue Reading…