I was thinking of something like that- using metadata that is. Like
    <cfcomponent implements='net.temm.hierarchicalDataClass'>
and using something in component.cfc to check the current class against 
net.temm.hierarchicalDataClass's method signatures.  But realising that this is a 
massive runtime hit, it could instead be used as a development tool and turned off in 
production a la BlueDragon's excellent CFAssert idea.  While developing, you could 
leave code in component.cfc to enforce implementation of the interface and when you 
deploy the app, you could comment the enforcement code- leaving the metadata in place. 
 This might also help folks running in hosted environments who don't have access to 
their own component.cfc, as it separates the enforcement from the application itself.  
 
Sound like a viable path?  Sean, do you have that BACFUG presentation lying around 
somewhere?

        -----Original Message----- 
        From: [EMAIL PROTECTED] on behalf of Nathan Dintenfass 
        Sent: Sat 31/01/2004 21:11 
        To: [EMAIL PROTECTED] 
        Cc: 
        Subject: RE: [CFCDev] Java-like Interfaces/Implements
        
        
        Amen!
         
        Sean showed an interface enforcement mechanism a while back at BACFUG using 
meta data.  But, the problem is that the overhead of the runtime checking was so high 
that it was almost never worth it.  Or, did you have something else in mind?
         
         

                -----Original Message-----
                From: John Temm [mailto:[EMAIL PROTECTED] Behalf Of John Temm
                Sent: Saturday, January 31, 2004 5:12 PM
                To: [EMAIL PROTECTED]
                Subject: Java-like Interfaces/Implements
                
                

                So, this is getting pretty old...

                Can we just say that CFInclude in CF6.1 needs better docs and move on? 
 Some of us don't think that using includes as a way of chunking code is good 
practice, others think it is essential but I think we all agree that it would be good 
if the way it was written up included both its within-CFC behaviour and an explanation 
of why it is that way (such as that provided by Sean earlier). Those that are 
motivated, write down what you want in the next rev of the docs and submit it to MM...

                Other than that, this really isn't going anywhere. Anyone wanna talk 
about building a framework so that we can enforce interfaces for components?

<<winmail.dat>>

Reply via email to