> Adobe's own coding guidelines if I read it right says this.
> 
> <cfcomponent>
>    ... Local variables
>    ... public variables
> 
>    ... Pseudo constructor (if required)
>    ... Public methods
>    ... Package methods
>    ... Private methods
> 
> </cfcomponent>
> 
> And although it is unclear, it does clearly state that it is 
> the norm to use init as a pseudo constructor.

I don't think you're reading it right.

>From http://livedocs.adobe.com/wtg/public/coding_standards/structure.html:
"CFCs should be structured as follows:

    <!--- prolog comment --->
    <cfcomponent ...>
        ...pseudo-constructor initialization (if any)...
        ...public methods (with init() first)...
        ...package methods (if any)...
        ...private methods...
    </cfcomponent>

The use of pseudo-constructor initialization should be kept to a minimum and
instead an init() method should be used to initialize the component ..."

But in any case, it really doesn't matter what Adobe's document says, even
though it clearly agrees with my assertion. What matters is that the common
usage of the term "pseudo constructor" has a specific meaning within the CF
developer community, and this doesn't conflict with any broader use of the
term within the larger development community because there isn't any use of
the term outside of CF. That's all the validation a term of art needs;
there's no higher authority to declare it right or wrong.

> I still stand by the fact that local / public variables is 
> not defined in a pseudo-constructor, its the wrong 
> description for it. 

Your declaration that it's wrong carries as much weight as me saying you
have a bad haircut - it's a matter of subjective opinion and no more. Again,
because there is no prior definition outside the CF world for a "pseudo
constructor", there is no existing authority to say it's right or wrong to
use it to describe the initialization of variables in a component.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Training: Adobe/Google/Paperthin Certified Partners
http://training.figleaf.com/

WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers!
http://www.webmaniacsconference.com/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304450
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to