0

Rant about making your CF code easy to follow

ColdFusion

I was about to add a comment to Ray's blog entry Can I do it in a CFC?, but it got so long, I thought I'd put it here instead:

[begin rant in response to some comments on Can I do it in a CFC?]
to each his/her own... whatever works for you and/or the team you're in... If I'm in a team with 4 other developers who have a great and consistent (and well-documented) way they organize all their code into pseudo-OO CFCs only, then great: I'll learn how they do it and follow the team's standards. However, if I'm in a team where most folks like their code to read simply (and commonly-used "best practices" - such as in http://livedocs.adobe.com/wtg/public/coding_standards/contents.html), then since team members usually change more often than best practices, it's usually more pragmatic to not get too "creative" with your coding standards. 

I've worked places where the original code was developed by a brilliant home-taught programmer, but since the code was so non-standard and overly-complicated to read and understand, the codebase itself didn't scale (scale in the sense that as we went from 2 to 5 to 15 programmers working with the code, the brilliance of the original code quickly lost it's luster because all the new programmers always asked in frustration, "what the heck is this? I've been coding advanced CF for 5 years, and have never seen 90% of the type of code used here!!! argh!").

In short, do whatever is right for you and your team, but remember that other developers may need be able to grasp your code without asking you.  Will they like what they see, and will they be able to efficiently code in your style? 

cheers

tags:
ColdFusion
Michael Long said:
 
"I've been coding advanced CF for 5 years..."

If someone has been coding for five years and has never run across components, factories, ORMs, code/form generators, and so on, I'd have to question the "advanced" part. (grin)
 
posted 938 days ago
Add Comment Reply to: this comment OR this thread
 
 
 
posted 938 days ago
Add Comment Reply to: this comment OR this thread
 

Search

Aaron  Longnion

The Hague, NL