2009年9月21日星期一

[fw-mvc] a project with multimodules

I want to bulid a project with more than one module, I have found some way to do it, but still can not make it!

I can't find a good tutorial to address how to make it, and I have finished reading the reference guide, I still can not make a module work!


One tutorial tells to add 
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.modules[]
 
to application's configuration file, another tutorial tells to use
$front->addModuleDirectory();
method to do this, I tried both, but neither worked!

I know these two ways both should work, so did I miss something?

And if you use modules, what is the preferred directory structure? 

application:
     controllers
     views
     modules
           user
                controllers
                views
           admin
                controllers
                views

OR

application:
     default
          controllers
          views
     user
          controllers
          views 
     admin
          controllers
          views   

And how to setup according to different directory structure?


         










--
Location:

没有评论: