September 2005

You are browsing the archive for September 2005.

The Encapsulated Hack

As is pretty obvious, I'm a big fan of good OO design.  But I'm
a bigger fan of maintainable apps, and one of my favorite tricks when
evolving apps is what I call the "encapsulated hack."
Take, for
example, a CFC that needs access to an
application-scope variable.  What's the right solution? 
Package the variable up in such a way that [...]

Designing an OO Backend

As follow-up for my 'Impetus for an OO Backend' post from a couple
weeks ago, I wanted to talk about some approach designing an OO
backend. Again, I'm going to attempt brevity and undoubtedly end up
being long winded, and I'm going to again intentionally skip
implementation details. Finally, there will be almost no mention of UIs
at all; I'm [...]

CF7, Web Services, and null

I discovered today (after many hours of debugging), that if you have
web service method declared to return 'any' on CF6.1, you can return
null without incident.  However, if you're on CF7, it causes an
NPE to be thrown.  To illustrate what I mean, take this
[abbreviated] code:
<cffunction name="test" returntype="any">
<cfreturn functionThatHasReturnTypeVoid() />
</cffunction>

That function will work happily if [...]

Remote Diff

Ever wanted to do a diff between a local file and a remote one?  I have, so I wrote a simple shell script that'll do it for you.  It requires scp, diff, and rm to be available on your system, which should be the case on any modern *nix.  The -b option to diff tells [...]

Good UI Design

I'm a stickler for good UI design.  I don't claim to be a wiz
at it myself, though I'd like to think I'm better than many.  I
love coming across web sites that are a breeze to use.  Hell, I
love coming across web sites that aren't painful to use.  In a fit
of spastic home-all-alone Googling, I hit [...]

Eclipse's Incremental Find

Little Eclipse gem I just found.  On the in-file Find dialog,
there's an "incremental" checkbox.  If you check it, Eclipse will
find the first match as you type, updating for every keystroke,
just like FireFox's in-page text searching.  I've longed for that
feature for months, and never noticed that it was sitting there right
under my nose.

Ant For Server Configuration

I use Apache ant for a lot of things, almost none of which have anything
to do with building software. Simeon knows
much of what I do with it from the course of various discussions, and while
he was using it for something a week or two ago, he suggested that I blog
about some of my experience. [...]

Impetus for an OO Backend

After a long, multi-faceted discussions on CFCDev a few weeks ago,
one of the participants contact me off-list wondering about a sample
app that illustrated some of the concepts I'd mentioned in the
discussion. I don't have one, and while I could make one up, the
implementation is the easy part. It's the reasoning behind doing
things a certain way [...]

cvs2svn Rules!

I've been moving all my stuff from CVS to Subversion over the past
few months.  Some of the stuff (like server config files) I've
just been moving the top revision across since the history is of little
concern.  The larger projects, however, I've migrated the whole
history with the fantastic cvs2svn
tool.  It somehow reads your CVS directory, figures out [...]

How Nested Sets Work

I got an email question today about how nested sets work, after the
developer started using my TreeManager component.  I figured that
was a good topic for a blog post, so here it is.

Nested sets operate based on two fields, rpos and lpos (right
position and left position).  They're calculated by doing a depth
first traversal of the tree; [...]