--
FW/1 on RIAForge: http://fw1.riaforge.org/
FW/1 on github: http://github.com/seancorfield/fw1
FW/1 on Google Groups: http://groups.google.com/group/framework-one
Dave
I generally have everything outside my webroot that doesn't need to be
there and then I have a structure like this:
/thirdparty -- this is where all my libraries and frameworks live
/myapp -- this is where my application views, layouts, controllers,
services and model live (normally named for the application itself)
/controllers -- my FW/1 controllers
/layouts -- FW/1 layouts for the app
/model -- my application model
/beans -- transient stuff
/services -- application services
/views -- FW/1 views for each section / item
/www -- this is where web-accessible content lives:
/assets/ -- my assets:
/css - my CSS
/img -- my images
/js -- my JS code
/thirdparty -- this is where JS / CSS / image libraries live that
I didn't write
Application.cfc -- myapp's entry point
index.cfm -- empty
I create a /myapp mapping to the top-level /myapp folder and set
variables.framework.base = '/myapp' (which automatically sets cfcbase
as well). And of course appropriate mappings for all the frameworks
(the mapping for FW/1 has to be in the admin because Application.cfc
extends it but the rest could be in the Application.cfc file itself).
The reason for separating out third-party stuff so clearly is
licensing and legal audits. It's a habit I developed at Adobe. It
makes sure that *no* third-party licensed code ever ends up in the
same directories as your own (proprietary) code. It makes legal audits
of software licensing much, much, much easier!
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
1) I could just make everything return "any" and the
problem would also go away but that is not the best solution
is it?
2) I thought the ORM settings in the application.cfc
for cfclocation where supposed to handle this but i already
have it set to
cfclocation="model", should it be something else?
3) should i be rearranging the folder structure so
that the services and the ORM entities are together? i don't
think i should have to prefix my functions with pathing
details should I? also, it is my understanding the services
dir was created for when you may want to use the service()
call method and/or implict calls, so they really need to be in
this directory if i want to use them this way. correct?
doesn't seem right to have to move the user.cfc into the
services dir just so they are together...
Right, because the type is no longer just User (in the same folder) -
because you have the service and the bean in separate folders.
> 2) I thought the ORM settings in the application.cfc for cfclocation where
> supposed to handle this but i already have it set to
> cfclocation="model", should it be something else?
Don't know.
> 3) should i be rearranging the folder structure so that the services and the
> ORM entities are together?
I think best practice would be:
/model
/beans
User.cfc
/services
UserService.cfc
> i don't think i should have to prefix my
> functions with pathing details should I?
Yes, because they're not in the same package - see above.
> services dir was created for when you may want to use the service() call
Huh? The services/ folder is just a convention for FW/1 to find
service CFCs if you expect FW/1 to manage the CFCs for you.
Huh? The services/ folder is just a convention for FW/1 to find service CFCs if you expect FW/1 to manage the CFCs for you.