2009年9月21日星期一

Re: [fw-mvc] a project with multimodules

After many trials and errors I've came up with this configuration
inside application.ini:

---
resources.FrontController.moduledirectory = APPLICATION_PATH "/modules"
resources.FrontController.defaultModule = "default"
resources.Modules=''
---

BUT, I use a different directory structure:

application
Bootstrap.php
modules
default
controller
models
views
users
Bootstrap.php
controller
models
views
admin
etc...

Every module have a Bootstrap.php, except for default who use the
application Bootstrap.

This is how I've setup my application and I feel very comfortable :)

Il giorno 21/set/09, alle ore 11:12, huajun qi ha scritto:

> 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:

---
Emanuele Deserti
Netwing S.r.l.
<emanuele.deserti@netwing.it>
Tel.: 0532 - 1912002
http://www.netwing.it

没有评论: