27. Juli 2010

Update 1 (July 29th 2010): Adobe has officially accepted this as a bug and targets a fix for 9.0.1 (Hotfix). 

ColdFusion 9.0.1 is essentially disqualified to be used with NoSQL datastores where JSON is involved.

We have used ColdFusion since 3.0 in 1998 upgrading to 4.0, 5.0, 6.1, 7.0, 8.0 and 9.0.
We did this upgrade for our servers and for even more of our customers servers that use our software.

So i am kind of an ColdFusion evangelist with one difference being that i don’t get paid by Adobe but i pay them, even though i sell their products to our customers.
Another difference is that i don’t greet every change or feature a new version brings with cheer no matter how badly implemented it is. And i don’t try to sell bugs as features. Because in the end bugs cost our customers more money because we have to waste time to work around them. Or in the worst case use other technology to get around those bugs.

I hope fellow ColdFusion developers agree with me on this. We like to use ColdFusion. We get work done with it. We get it done fast on a reliable platform. After all, if i would not like ColdFusion i would not write the following.

The SerializeJSON() function was flawed in 8.0 and 9.0 and is now broken in 9.0.1.
And Adobe needs to fix it asap before more people upgrade to 9.0.1

15. Juli 2010

The standard history.back() does not work in Chrome and probably Safari and other Webkit browsers.

It took me a while to figure this out.

So this is how you make it work across all browsers:

08. Juli 2010

We are using CSS files with embedded images on some sites. Have a look at Nicholas C. Zakas excellent cssembed utility.

The good thing: Just after loading the CSS most of the images needed to display the site are at the client. No longer does a new visitor request dozens of small 1KB PNG files for backgrounds, bullets and tiny icons. It's all right there in the CSS. This really pays of when you target mobile users where latency and slow connections let page rendering times go thru the roof with lots of small requests.

The bad thing: This only works in new browsers, not in IE6 and IE7. So we needed an effective way to load a different CSS depending on the users browser.

30. Mai 2010

Based on this post and that post i created a simple string prototype to evaluate emails via one Javascript RegEx in Javascript.

In the past i used a complex check that also had a list of all valid TLDs integrated. Now every time a new TLD (like .biz or .mobi) was introduced i had to update the email check routine. Too much work imho.

Based on that and the limitations of the JS RegEx engine this will result in only three issues i can perfectly live with:

25. Mai 2010

If you use Coldfusion to create Javascript endpoints - e.g. for Ajax Requests, then everything might work just fine at first sight.

Later some users might report that in Internet Explorer (6.0, 7.0 and 8.0) content that you refresh via Ajax requests might not get updated.

Here's why:

04. Mai 2010

Amazon S3 is awesome for scalable hosting especially for images, videos and other assets.

If you still want to show your visitors your own domain instead of the s3.amazonaws.com domain for your assets then you can setup a CNAME record for your domain pointing to the S3 bucket.

04. Mai 2010

So we used Google Analytics on many of our projects - but no longer do.

Still most of our visitors have those lifetime cookies __utma and __utmz set and send those to our servers with every request.

A small script - a generic script that clears cookies via javascript - that we leave in place for a few weeks should clear these cookies for 90%+ of our users and leaves them and us with less persistent cookies.

Here's the small javascript that we use to delete those pesky cookies:

14. April 2010

Just a quick note - as i keep forgeting this.

With its standard setting Internet Explorer will fetch the same URL from its cache if called a second time within the same browser session. That is if the URL had no special Headers set.

To prevent IE and other browsers from caching a URL simply add this to your ColdFusion pages:

 

26. Februar 2010

After installing a brand new Ubuntu 9.10 64bit on VMWare i got the message:

ACPI: I/O resource piix4_smbus [0x1040-0x1047] conflicts with ACPI region SMB_ [0x1040-0x104b]

Resolved this by adding

blacklist i2c_piix4

at the end of /etc/modprobe.d/blacklist.conf

 

23. Februar 2010

Amazon S3 is a great way to store files that need to be exposed on the web. Every uploaded file can be accessible to the public or accessible to authorized users only via a clever system of expiring signatures.

Joe Danziger wrote an excellent CFC to do all kinds of operations via the S3 REST interface.

The only missing part is the new way Amazon is offering to upload files without the need to first buffer them on your own server.

The old way:

  • You send a user (let's say a user of your CMS) to a page where he can upload a file
  • The user clicks on 'Browse' to find the file on his harddisk and submits the form.
  • The file is sent to your server.
  • You send the file to S3 via a REST put.
  • On success: you save a record in your database so you can remember what you sent to S3

The better way:

  • You send a user to a page where he can upload a file
  • The user clicks on 'Browse' to find the file on his harddisk and submits the form.
  • The file is sent directly to a certain bucket of your Amazon S3 storage
  • Amazon tells you about a successful upload and you update your database.