Monday, January 16, 2006
Martin Fowler has a nice article on the subject of Humane Interfaces, and I started playing with building my own. The concept is to create a set of function libraries with logically named functions that work universally and all follow a specific order. Basically, I got tired of the fact that in ColdFusion, some functions return booleans of successful operations (array and query functions do this a lot), and others return modified values of the operated value. This makes rapid development slower, and requires that a developer either remember every detail about every function, or have cfquickdocs always ready for access. Worse, the parameter arguments are different, which can get annoying too when for reFind the regex comes second and for reReplace the regex comes first (or is it the other way around)?
Now compare that to Python or Ruby, in which methods on a type always return a value, unless it is a decision function. Parameters always go in the same order. You have to remember less about the language, check references less, and the results are that you can code faster.
Sounds great! Well, maybe not...
The CHIP library I built has been fun, and it is in the beta stage. However, it is potentially a resource hog (tests are pending). Why rewrite the whole CFMX function library set adding a good thousand lines of code to just to make an arrayAppend return a value instead of a boolean? Also, I might not use cfEclipse (I do use this sometimes) or Homesite Studio or Dreamweaver, but others do and those IDEs have code complete.
Should I continue? I don't know. I think it has been an interesting proof-of-concept, and one that borders on Academia. But I am not so sure it has any real usefulness. And I wish someone could argue me one way or another.