Per Djurner

Overriding a Wheels View Helper

  • Edit
  • Delete
  • Tags
  • Autopost

Overriding a built-in ColdFusion on Wheels function is something I often see done by Wheels developers. It's a very useful technique for customizing a Wheels function while still keeping your code base clean. Since there are some gotchas with the approach though, I'll...

read more →
  • 0 responses
  • Like
  • Comment
Tweet

Caching the Result of a Function Based on its Arguments

  • Edit
  • Delete
  • Tags
  • Autopost

I may be overthinking this, you be the judge... Let's say that you have created a nice function that does its job well but takes a little more time to process than you'd like. The solution is to cache the function result. That sort of caching code is normally pretty...

read more →
  • 10 responses
  • Like
  • Comment
Tweet

Three Reasons to Scope Function Calls to the Same Component

  • Edit
  • Delete
  • Tags
  • Autopost

A long time ago when I was a beginner ColdFusion programmer I didn't use scopes unless I really needed to. I think my reasoning was that "If it works, why add the extra code just to specify the scope?" or something like that. Nowadays I scope pretty much everything but...

read more →
  • 7 responses
  • Like
  • Comment
Tweet

Wheels Model Sugar Plugin

  • Edit
  • Delete
  • Tags
  • Autopost

I threw out a question on Twitter yesterday asking if it made sense to add a model method named findAllKeys() to Wheels which would basically just be a shortcut for doing a findAll(select="id") and then performing a ValueList() on it. Raul Riera, among others, responded...

read more →
  • 9 responses
  • Like
  • Comment
Tweet

Creating Oracle triggers from ColdFusion

  • Edit
  • Delete
  • Tags
  • Autopost

Here's some sample code you can use if you want to create a table with a corresponding sequence and trigger in Oracle using cfquery tags. Note that there are no line breaks at all in the SQL that creates the trigger. This is a very important point. If you follow the...

read more →
  • 2 responses
  • Like
  • Comment
Tweet

Single Table Inheritance in Wheels

  • Edit
  • Delete
  • Tags
  • Autopost

I ran into a situation recently where I had to make it possible to comment on various things on a site. My first instinct was to create model files named "AlbumComment.cfc", "SongComment.cfc" etc and link them to tables named "albumcomments", "songcomments" etc. The more...

read more →
  • 10 responses
  • Like
  • Comment
Tweet

How Wheels increases the request timeout on errors

  • Edit
  • Delete
  • Tags
  • Autopost

Here's a little improvement that will make it into the ColdFusion on Wheels 1.1 release. To explain this feature I first need to tell you what happens when errors occur in your Wheels application. How Wheels handles an error Assuming you're running in production mode...

read more →
  • 4 responses
  • Like
  • Comment
Tweet

Buggy curly braces

  • Edit
  • Delete
  • Tags
  • Autopost

Due to my habit of leaving out curly braces on simple if/else statements a ColdFusion 9 bug hit me today. Have a look at the following code: if (0==1)   tmp; else   aStruct = {}; There's no reason that code should fail, right? But it does. When you run it you...

read more →
  • 0 responses
  • Like
  • Comment
Tweet

Interesting Railo mapping bug

  • Edit
  • Delete
  • Tags
  • Autopost

During a Wheels debug session with Tony we discovered a bug in Railo 3.1.1 related to mappings.  Normally when you create an object in Railo it is slow the first time but then lightning fast on subsequent creations of the same object. This applies both to the page request...

read more →
  • 5 responses
  • Like
  • Comment
Tweet
Posterous theme by Cory Watilo

Per Djurner

Per Djurner

Working with ColdFusion, JavaScript, ActionScript, SQL, CSS, HTML and more at SingSnap.

Twitter

Subscribe...

Subscribe to this Posterous
Unsubscribe
Subscribe via RSS
You're a contributor here (Edit)
This is your Space (Edit)
Follow by email »
Get the latest updates in your email box automatically.

Archive

2012 (1)
January (1)
2011 (1)
February (1)
2010 (6)
November (1)
October (3)
August (1)
February (1)
2009 (1)
September (1)