An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

Entries for month: April 2004

Jon Gay on Flash

April 30, 2004 ·

The most fascinating takeaway from Jon Gay's History Of Flash for me was that he write Intellidraw for Aldus. I loved that program - I used to use it for visual design and documentation of software before I settled on OMT (later Booch and even later UML) CASE tools for that purpose. It was an awesome program, revolutionary in its simplicity and in its smartness. It's an interesting read!

Tags: mx

MACR Q4/FY04 Result - And Looking to the Future

April 30, 2004 ·

I know that you don't expect to find quarterly results very interesting but I really do encourage you to spend a few minutes watching and listening to Rob and Betsey talk about Macromedia's finances and future plans. There's more than good numbers here, there's quite a bit about future strategy and future markets - and future opportunities for both Macromedia and its existing customer base (i.e., you).

Tags: adobe

A Guilty Secret

April 30, 2004 ·

It's really kinda trashy but I've become somewhat addicted to Hani's BileBlog. Hani rants about all sorts of subjects but only posts about once a week. However, the rants often have a wonderful grain of truth in them that is really insightful.
Some recent rants have targeted the Slashdot commentary on the Microsoft / Sun settlement, framework developers' obsession with flexibility and, most recently, framework developers' obsession with plugins for their frameworks.
Hani's outrageous sniping draws a lot of comments (not surprising) which are very varied in content (from calm justifications to babbling indignation and often the downright weird) but it's all a good read if you're not easily offended.
I just wish Hani would fix the damned RSS feed so that it worked properly!

Tags: blogging

Debugging & HTML in Variables

April 30, 2004 ·

Rob Brooks-Bilson blogged this warning about using ColdFusion's in-page debugging when you are storing HTML in variables that the debugging output attempts to display (e.g., through the use of cfsavecontent). He encountered it with Mach II but it can crop up in other situations too. Daniel Daugherty posted a useful tip as a comment that involves changing classic.cfm (remember: you have full control over CF's debug output!).

Tags: coldfusion

Scope != Struct

April 28, 2004 ·

An interesting thread on BACFUG's mailing list just highlighted an interesting difference between a scope and a struct. Now, we all know that scopes are really structs but they behave like them in so many ways, it's easy to forget. Nolan Erck was trying to pass
form
scope to a web service method that expected a struct. He got an obscure Axis error saying that the argument (
form
) could not be serialized. He found that if he duplicated
form
scope, it worked. He later found that if he tried to use
structCopy()
instead, it didn't work and he got the same serializable error.
To really see why, you need to dig into Java a little bit: for any variable (and many expressions) in ColdFusion you can find out the underlying Java type by calling
getClass().getName()
on it:
form.getClass().getName()? #form.getClass().getName()#
structNew().getClass().getName()? #structNew().getClass().getName()#
duplicate(form).getClass().getName()?
#duplicate(form).getClass().getName()#
structCopy(form).getClass().getName()?
#structCopy(form).getClass().getName()#
If you run that code, you'll get this output:
form.getClass().getName()? coldfusion.filter.FormScope
structNew().getClass().getName()? coldfusion.runtime.Struct
duplicate(form).getClass().getName()? coldfusion.runtime.Struct
structCopy(form).getClass().getName()? coldfusion.runtime.LocalScope
We can see from this that
form
is not a struct even it plays one on TV. We can also see that
duplicate(form)
does return a struct but
structCopy(form)
does not.
This subtle difference doesn't matter when you're passing
form
directly to a function that expects a struct because CFMX understands the magic behind a scope, but when you pass it to a web service, you're relying on Axis to be able to serialize the object... and Axis does not understand the magic.

Tags: coldfusion

SDCFUG - One Week & Counting...

April 27, 2004 ·

Next Tuesday (May 4th), I'll be down in San Diego for a week's vacation with my wife, timed to coincide with my speaking at the San Diego ColdFusion User Group about Mach II at Macromedia. I think there will be some folks there from Macromedia San Diego as well, talking about RoboDemo and/or RoboHelp so it'll be an information-packed evening. Hope you can make it!

Tags: coldfusion

Over-Engineering with Design Patterns

April 26, 2004 ·

As ColdFusion programmers we're constantly being told to embrace Object Oriented Programming and, especially, Object Oriented Design. It's a big shift for a lot of people and the amount of information out there can be quite overwhelming (especially since most of it is written for a non-ColdFusion audience). Along with the drive to OO comes the drive to Design Patterns as "best practice". Now, I'm a big advocate of learning about design patterns and using them where appropriate but it's easy to get distracted by the glamor of design patterns for their own sake...
Alan Richmond shared a link to this wonderfully insane article recently on the Mach II mailing list: Hello World in Patterns. The sheer ingenuity of the author has to be admired in combining so many patterns to create something so complex just to say "Hello World!". That article doesn't have a great of substance, it's true, and it is a very extreme edge case, however it links to this rather excellent discussion: Design Patterns Considered Harmful. I think the best quote from that discussion is "A master will no longer use patterns except where they would occur naturally. After all, this is really what patterns are - the natural solution to the problem that have repeatedly arisen even before they were written."

Tags: programming

An Observation on Refactoring

April 26, 2004 ·

David Goodger has posted some thoughts about refactoring that struck a chord with me. He says it's a bit like symbolic algebra (I agree that a math background certainly helps with this stuff) and also notes that as you refactor, the code will often expand first before it can be simplified back down again. That last observation is very important: don't be discouraged when your attempts at refactoring lead to an increase in code and complexity at first!

Tags: programming

Rate Yourself?

April 20, 2004 ·

Another question I was asked recently was:
How do you determine your level of understanding for a particular subject (Novice, Beginner, Intermediate, Advanced or Expert)?
I responded:
That's another good question! It's very subjective. I tend to be fairly critical of my own abilities so even after years of exposure to a particular technology, I might still only rank myself as "Intermediate". See my resume. Seven years of Java and I still wouldn't call myself "Expert"!
However, I see a lot of people claiming themselves to be "Advanced" or even "Expert" after a year or two (sometimes even less). Very few technologies are so simple you can completely master them in such a short space of time. On the other hand, even an "Expert" can't know everything so don't assume they have nothing to learn - Stroustrup said some years ago that no one person can know all of C++ and the same applies to Java, SQL, UML and any number of other languages and tools.

Tags: personal

DENG is Open Source

April 20, 2004 ·

I just received notification this morning that the DENG project has now been open sourced under the GPL. Visit the SourceForge DENG project website for more details.

Tags: mx