Re: Module Structure ideas
| From: | Virgilio Quilario | Date: | Wed, 11 Feb 2009 13:20:16 +0000 |
| Subject: | Re: Module Structure ideas | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-288117@lists.php.net to get a copy of this message | ||
> Last year I began to sepearte my module files to many files for their
> purposes.
>
> Last time use use lots of dirs for their types
>
> someting like
>
> controllers
> a.cont.php
> b.cont.php
> definition
> a.def.php
> b.def.php
> models
> a.model.php
> b.model.php
> views
> a.view.php
> b.view.php
>
> Then I realize this model creates confusion when you start to debug a module.
>
> My next step was putting module files in one dir,
> also I want to load them into text editor with spesific order
> (same to including order).
>
> and I came up some ting like this
>
> a.test.def.php
> c.test.mdl.php
> e.test.cnt.php
> g.test.rtr.php
> i.test.view.php
> k.test.dr.js
> m.test.m.js
> o.test.css
>
> test_app.a.def.php
> test_app.c.mdl.php
> test_app.e.cnt.php
> test_app.g.rtr.php
> test_app.i.view.php
> test_app.k.dr.js
> test_app.m.js
> test_app.o.css
>
> test.adef.php
> test.cmdl.php
> test.ecnt.php
> test.grtr.php
> test.iview.php
> test.kdr.js
> test.m.js
> test.o.css
>
> My point of view the 3. option is good for me.
>
> So I want to ask this
>
> (beacause I'm using very closed working model. Just KDE and KATE)
>
> is kind of file structure may lead any kind of problems in future or
> diffrerent situation ?
>
> also is there any suggestion to using different methot to archive similar
> goals.
>
option #3 works for me too small projects without using frameworks.
for big projects, i prefer to organize my script files by type:
/models
/controllers
/views
i don't have problems with jumping around folder to folder because i
keep files open in separate windows.
Virgil
http://www.jampmark.com