Yeah kinda works much in the same way you would when having import
capabilities aswell.

Ie typically if need something in AS2 atm i would do:

import com.SynergyFLEX.framework.lib.*;

class com.SynergyFLEX.framework.AppManager extends Object {

function AppManager() {
}

public function loadViewPod(event:String) {
// Need to break up an event into Zone and Context event=
admin.mail.showInbox; which sould be a struct.

var oStringUtil:StringUtil = new StringUtil();
var eventContext = oStringUtil.convertStrToStruct(event);

// do internal logic
}

}

Now if i wanted that Util class to be a singleton then so be it, i can
see the value in passing it around but it comes down to performance
gains vs passing an object around and what not. Hell i think the above
breaks encapsulation but in reality, give a toss as typically when I
work in framework-mode, i get the luxury of breaking certain rules as
the entire framework is considered one big domain model or something.

heh


On Apr 4, 2005 10:02 AM, Jim Davis <[EMAIL PROTECTED]> wrote:
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> > Of Adrocknaphobia
> > Sent: Sunday, April 03, 2005 5:30 PM
> > To: [email protected]
> > Subject: Re: [CFCDev] Where to put 'utility' functions?
> >
> > Ok, I think you guys have really missed the mark on the question. I'm
> > begining to think that any question asked on this list is a test of
> > your associative knowledge of how can you provide the same answer to
> > every question. ie OO.
> 
> For what it's worth I just create an instance of the utility CFC in the CFC
> I need it in.
> 
> I've got a "Paths" CFC with 10 functions to determine various path-related
> information.  When I instantiate my "Application" CFC (which holds
> application-level information and methods) one of it's properties is an
> instance of Paths.
> 
> No extensions or transfer of methods needed.
> 
> Jim
> 
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email to 
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the 
> email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
> (www.cfxhosting.com).
> 
> An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]
> 
> 


-- 
Regards,
Scott Barnes
http://www.mossyblog.com
http://www.flexcoder.com (Coming Soon)


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


Reply via email to