CodeIgniter Forums
Quick question about folder stucture... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Quick question about folder stucture... (/showthread.php?tid=39563)



Quick question about folder stucture... - El Forum - 03-14-2011

[eluser]Steve Moss[/eluser]
Hello all, I've been using CI quite some time now and I really like it. However I don't really like the folder structure. I mean why do I need to have so many folders inside 'application' folder? Is it possible to move everything except 'models', 'views' and 'controllers' to system folder? I don't really get why I need those folders there (except for config). I never use them anyway and I don't even know why they are there...


Also... Why it dose not have PDO as MySQL connector?


Quick question about folder stucture... - El Forum - 03-14-2011

[eluser]oldmatt[/eluser]
Each of the folders in application has a specific purpose. Most of them correspond to a directory in the core.

CI attempts to load from these first and then it attempts to load from core.


Quick question about folder stucture... - El Forum - 03-14-2011

[eluser]Steve Moss[/eluser]
Hehe, I just found out how to fix my problem. NetBeans has this option to "Ignore" folders of your choice so it won't show them. Smile


Quick question about folder stucture... - El Forum - 03-14-2011

[eluser]oldmatt[/eluser]
Hey. That's nice to know. Thanks.


Quick question about folder stucture... - El Forum - 03-16-2011

[eluser]IgnitedCoder[/eluser]
As common practice for me I generally drag the application folder out of the system folder so I can update CI easily... so instead of:

system
index.php

I cut the app folder and then I have. so if a new CI version shows up its easy to replace the system folder. Its just cleaner I guess/think.

application
system
index.php

I generally template out my header, footer and content

so view generally have a template folder

view
templates

Then I seperate out each view by controller

views
home
login
browse
etc.

I realize you didn't ask for this much detail but I figured it couldn't hurt to share.

Brendan


Quick question about folder stucture... - El Forum - 03-16-2011

[eluser]oldmatt[/eluser]
Like Brendan I too will drag the folder out, however, I like to move the system and application folders to outside the webroot and leave the index.php file in the web root with any javascript, flash, image, css folders.

I also use the method Brendan mentioned regarding views, it is very easy to find a view (or a partial view) that way.