This content has been marked as final. Show 3 replies
I'm fairly confident that if you don't specify the full path, and the CF server is configured to validate component paths (this is an option in 8) an exception will be thrown.
I've made a habit of specifying full paths for these reasons, as well as to avoid duplicate named component confusion amongst the team.
To further accommodate this setup, we use a central API, which is mapped for all the applications and sites. So we instantiate things such as API.com.mydomain.service. The full path for that component is always available on all sites and environments.
> the same directory. So I have a product component (com/product.cfc) which is
You might want to extend that dir structure a bit to include your company
name and your application name:
> to return a product object. What should that method's returntype be? And
Either will work, but I think the full dotted path is less ambiguous.
> when i create an instance of a product inside some productmanager method do i
> call createobject with "com.product" or just "product"?
Again, I'd use the full path.
> I'm guess I'm just missing the basics about when to specify the path and when
> not to.
I'm not sure there's a "right" way, per se, but deciding on an approach and
sticking with it uniformly is perhaps a good way to do things.
> I create an instance of the productmanager in the application scope
> and reference that in my display pages. Any body have any advice on best
> practices here?
That's a pretty vague question...
Topic Title OO-design
Topic Summary should i specify the whole path or just the component name?
Take as much advice as you can from Vurcease and Adam, but rest assured that what you seek has little or nothing to do with objected-oriented design.