I have it pretty much as you do but usually have one service cfc for several 
Gateways and business objects.

ie I may have a ProductService.cfc with Product.cfc, ProductGateway.cfc, 
Category.cfc, CategoryGateway.cfc (and probably others) and the ProductService 
would have methods that use all the objects. It just seems a bit silly to have 
a CategoryService with just a few methods in it.

This way you could have the service and business object methods public and the 
gateway methods package, sending a signal to other developers to use the 
service rather than directly accessing the Gateways. Method access is a hot 
potato though in CF and many think we don't need it and shouldn't use it in 
most situations but I like showing the intent behind what's happening, ie 
remote, public, package or private.

Also, I have a UnitTests dir and the subdirectories match the structure of the 
cfc model directory. Unit testing private and package methods also easy as 
mxunit has a nice makePublic() method so I show intent and can still easily 
test things.

Alan






________________________________
From: aliaspooryorik <[EMAIL PROTECTED]>
To: CFCDev <[email protected]>
Sent: Wednesday, December 3, 2008 11:44:33 AM
Subject: [CFCDEV] CFC Directory structure


Hi,

Just curious what directory structure people use to organise their
CFCs. It makes sense to me to organise classes into packages. For
instance business object, service method and DAO for each domain
object into their own directory (product, order), and all Utils in
another folder.

This approach works but I just wanted to know if there is a better way
- to which the answer is probably "it depends" :)




      
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to