By barneyb on September 27, 2005
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 [...]
Posted in development
By barneyb on September 25, 2005
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 [...]
Posted in cfml
By barneyb on September 21, 2005
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:
That function will work happily if served by CF6.1 and [...]
Posted in coldfusion
By barneyb on September 20, 2005
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 [...]
Posted in development
By barneyb on September 14, 2005
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 [...]
Posted in development
By barneyb on September 14, 2005
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.
Posted in development
By barneyb on September 11, 2005
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. [...]
Posted in development
By barneyb on September 11, 2005
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 [...]
Posted in cfml
By barneyb on September 9, 2005
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 [...]
Posted in development
By barneyb on September 9, 2005
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; [...]
Posted in development