Question
OO-design
I am developing with an OO-design in mind and I have most of
my code written. I have a directory in the webroot
called 'com'.
I want to use/create an object/component in another manager-like object in the same directory. So I have a product component (com/product.cfc) which is just a Bean-like component. I also have a productmanager component (com/productmanager.cfc) which has methods manage products and specifically one to return a product object. What should that method's returntype be? And when i create an instance of a product inside some productmanager method do i call createobject with "com.product" or just "product"?
<cffunction name="getProduct" returntype="com.product" ... >
OR
<cffunction name="getProduct" returntype="product" ... >
I'm guess I'm just missing the basics about when to specify the path and when not to. 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?
called 'com'.
I want to use/create an object/component in another manager-like object in the same directory. So I have a product component (com/product.cfc) which is just a Bean-like component. I also have a productmanager component (com/productmanager.cfc) which has methods manage products and specifically one to return a product object. What should that method's returntype be? And when i create an instance of a product inside some productmanager method do i call createobject with "com.product" or just "product"?
<cffunction name="getProduct" returntype="com.product" ... >
OR
<cffunction name="getProduct" returntype="product" ... >
I'm guess I'm just missing the basics about when to specify the path and when not to. 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?
