The blog of Chris Peters · Web design, web development, and tech stuff · About Me

Posts About Programming

Progressively enhancing your CFWheels form with nested properties and jQuery

We all find ourselves in this situation from time to time: we want to code a form that contains a “main” record and a collection of “nested” records. We want some JavaScript-powered form controls to add to and remove from that collection of nested records. Clicking the submit button then saves the whole thing.

This post will cover a fairly standard CFWheels solution using nested properties and a sprinkling of jQuery.

Read the rest of this entry ›


Never output anything to a browser without using a formatting filter

Cross-site scripting (XSS) vulnerabilities can be quite a serious problem if you’re not careful. And if you’re using a framework like CFWheels, you need to be extra careful to protect your output from rendering malicious content.

In this post, I suggest that you must always use a formatting function like EncodeForHtml, DateFormat, or NumberFormat when outputting any dynamic value.

Read the rest of this entry ›


Clobber Windows Ruby HTTPS connectivity issues with the new Net::HTTP SSL Fix gem

I recently released a little Ruby gem with a fix for HTTP connectivity via the Net::HTTP library.

From the Net::HTTP SSL Fix Ruby gem’s README:

No more / (╯°□°)╯︵ ┻━┻!

But you probably want a more detailed description of the gem’s purpose, so here it is:

A Community-updated Net::HTTP certificate authority file hack. Very useful for authoring Ruby-based HTTP clients that must run on Windows.

Read my post Clobber Windows Ruby HTTPS connectivity issues with the new Net::HTTP SSL Fix gem for more information.

Read the rest of this entry ›




CFWheels, meet Docker

I was stoked when I saw that Adam Chapman had created a Docker setup for CFWheels and Lucee.

Docker is a fairly easy way to get a development environment setup for experimentation, which then can be shipped into production later. It’s also a great way to try out Lucee and CFWheels.

You’re probably like I was also: curious about Docker and what it could do for you. If you’re familiar with CFWheels, this is a great way to jump in and see if it’s right for you

Read the rest of this entry ›




How adding your website logo as a CSS sprite blocks SEO

CSS sprites are a great way of speeding up your website’s load time, but there is a point where you can take it too far. When you have a hammer, everything looks like a nail.

I think that the biggest way that you can abuse this technique is by applying the technique to your website’s logo in the header. Let me explain how it affects your users and your overall marketing efforts.

Read the rest of this entry ›