My Secret Life as a Spaghetti Coder
home | about | contact | privacy statement
Do you find yourself writing more classes in other languages than in Coldfusion? I do. For instance, I certainly develop more classes in Java than Coldfusion.

Is it due to the fact that I've developed bad habits in CF and haven't yet broken out of them (i.e., I'm just unable to spot needs for new classes) or is it because CF is so much more high-level than Java? A third option may be that the performance issues with instantiating CFCs contribute to me not wanting to break out?

I think part of it may be due to bad habits and not having the ability to notice a spot where I need another class. But, I have no evidence of this, since I haven't been able to notice it =). I do have evidence of the other two options however: CF being so much more high-level than Java is fairly self-evident: Where I'll often use a fa├žade to interact with a database in Java, in Coldfusion it would be pretty useless - since there is no need to instantiate a connection, prepare a statement, prepare a record set, and then close/destroy them all when you don't need them any more. The other, about the performance hits, I know sometimes stops me from creating more classes. For instance, I recently used a mixin to achieve some code reuse with a utility method that didn't belong to any of the classes that used it. Clearly it broke the "is-a" relationship rule, but I didn't want to incur the cost of instantiating an object just to use a single, simple method (the application was already seeming to perform slow).

Of course, this is not a zero-sum game. It is certainly due in part to all three. I'd like to think it is mostly due to the expressiveness of Coldfusion, but I'll always have to wonder about the bad habits.

In Ruby, I've developed a couple of "significant" applications, but those didn't approach the size of the one's I've done in Coldfusion or Java. It's hard to say for sure, but I'd guess that I'm writing much fewer classes in Ruby than I would in Java. Again, this is mostly due to Ruby's expressiveness.

In any case, have you noticed yourself writing fewer classes in CF than in other languages? Have you thought about it? Come to any conclusions?

Hey! Why don't you make your life easier and subscribe to the full post or short blurb RSS feed? I'm so confident you'll love my smelly pasta plate wisdom that I'm offering a no-strings-attached, lifetime money back guarantee!

Leave a comment

My guess would be that you write fewer classes because CF was never really designed to use them (and because you're a tool). It was designed to be a more elegant approach than the mighty Java or dastardly C#; Server-side scripting and such. Some might not see such an approach as elegant, but those people sleep with a design patterns book under their pillow and a thumb in their mouth.

Are there more powerful languages than CF? Of course. Are there lighter-weight languages that require less code? Yep. But I don't think any language has quite gotten to such a good balance of power vs. weight as CF.

Ultimately, the fact that you write less classes in CF is a testament to CF's fulfillment of its goal; giving developers power enough to write great apps, without weighing them down with unnecessary abstraction.

Posted by Wormhoudt on Jan 16, 2007 at 07:39 AM UTC - 5 hrs

I'm only going to respond to the serious part of your comment: "because you're a tool."

That's definitely it. =)

Posted by Sam on Jan 17, 2007 at 04:09 PM UTC - 5 hrs

Leave a comment

Leave this field empty
Your Name
Email (not displayed, more info?)


Subcribe to this comment thread
Remember my details

Picture of me

.NET (19)
AI/Machine Learning (14)
Answers To 100 Interview Questions (10)
Bioinformatics (2)
Business (1)
C and C++ (6)
cfrails (22)
ColdFusion (78)
Customer Relations (15)
Databases (3)
DRY (18)
DSLs (11)
Future Tech (5)
Games (5)
Groovy/Grails (8)
Hardware (1)
IDEs (9)
Java (38)
JavaScript (4)
Linux (2)
Lisp (1)
Mac OS (4)
Management (15)
MediaServerX (1)
Miscellany (76)
OOAD (37)
Productivity (11)
Programming (168)
Programming Quotables (9)
Rails (31)
Ruby (67)
Save Your Job (58)
scriptaGulous (4)
Software Development Process (23)
TDD (41)
TDDing xorblog (6)
Tools (5)
Web Development (8)
Windows (1)
With (1)
YAGNI (10)

Agile Manifesto & Principles
Principles Of OOD
Ruby on Rails

RSS 2.0: Full Post | Short Blurb
Subscribe by email:

Delivered by FeedBurner