Re: Module Structure ideas

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-02-11 at 21:20 +0800, Virgilio Quilario wrote:
> > 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
> 
Number 3 looks good. but I would tend to keep .js and .css files in
their own directories respectively, as for most projects, I'll have lots
of different .js files for differents tasks, and several .css files
(screen, print, internet explorer, etc.) It makes it a lot easier for
me, as usually (unless I'm doing AJAX work) the php and javascript won't
overlap, and css is almost always completely separate.


Ash
www.ashleysheridan.co.uk


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux