|
I was also going to highly suggest using a factory (or several) to
instantiate all your components. When object creation is encapsulated
like this, it's easier to swap out most if not all of the paths in your
CFC's. If you use Coldspring, then at least some of it will be handled
simply by swapping out the XML config file. Also, if you want to use a type or returntype that simply signifies "a component" ... i would suggest using "WEB-INF.cftags.component" instead of "string" ... as that will make more sense to anyone coming in and looking at the class down the line (including you!). Many people do this. The advantage to using "any" is that CFAS doesn't check the type each time the function is run. In that sense, type safety in CF is a little ... flaky? Forgetful? Forgetful flaky type safety ... In CF, there is no such thing as type safety in the sense that all you get is a slightly different error message. CF still allows improperly typed arguments or returntypes to run because "type" is checked at runtime. And in fact, because CF is loosely typed, the components are not really typed in the first place. CFAS simply looks up the metadata recorded in the type or returntype arguments and does a series of tests and lookups against the component's location in the file system, taking into account if it extends another component or not, and either throws an error or not. So if your primary motivation for typing is type safety ... you might want to re-examine that and see which side of the line you come out on. If your primary motivation is to document your classes ... well, when i understood what was really going on under the hood, it made more sense to me to put that in the hint tag ... but that's me. As i understand it, the type issue shifts again in favor if you're using Flex ... but i haven't gotten there yet. ciao, Nando J MacKay wrote: > Aaron Roberson You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/[email protected] |
- Re: [CFCDEV] Help with Component Path/Package Aaron Roberson
- RE: [CFCDEV] Help with Component Path/Package Josen Ruiseco
- Re: [CFCDEV] Help with Component Path/Package Aaron Lynch
- RE: [CFCDEV] Help with Component Path/Package Dave Watts
- Re: [CFCDEV] Help with Component Path/Package Jean Moniatte
- RE: [CFCDEV] Help with Component Path/Package Paul Marcotte
- Re: [CFCDEV] Help with Component Path/Package Jim Cassata
- RE: [CFCDEV] Help with Component Path/Package Paul Marcotte
- Re: [CFCDEV] Help with Component Path/Package J MacKay
- RE: [CFCDEV] Help with Component Path/Package Jim Cassata
- Re: [CFCDEV] Help with Component Path/Package Nando
- Re: [CFCDEV] Help with Component Path/Package Sammy Larbi
- Re: [CFCDEV] Help with Component Path/Package Sammy Larbi
- Re: [CFCDEV] Help with Component Path/Package J MacKay
- Re: [CFCDEV] Help with Component Path/Package Aaron Roberson
- Re: [CFCDEV] Help with Component Path/Package Tom Chiverton
- Re: [CFCDEV] Help with Component Path/Package Sammy Larbi
- Re: [CFCDEV] Help with Component Path/Package Tom Chiverton

