Welcome Guest, Not a member yet? Register   Sign In
Libraries in Subfolders
#1

[eluser]AgentPhoenix[/eluser]
http://derekallard.com/blog/post/codeign...ubfolders/

Very excited about this and looking forward to all the new toys in the next version. Awesome work, guys!
#2

[eluser]wiredesignz[/eluser]
CI is quietly trying to adopt a modular scheme.

Libraries in subfolders is an admission that CI has huge limitations in organisational structure in its present form.

Just get over it fella's and add Modular Extensions to the CodeIgniter core.
#3

[eluser]xwero[/eluser]
That Rick Ellis guy never adds comments to his SVN changes :coolsmile:

I hope it goes a step further and you are somehow allowed to load files from where ever you want.
#4

[eluser]Adam Griffiths[/eluser]
Oooh, nice. I would love to see CI go modular without the use of extensions, plugins, hooks etc. Then it would truly be the ultimate framework!!!!!! Tongue
#5

[eluser]Mirage[/eluser]
[quote author="xwero" date="1218561369"]That Rick Ellis guy never adds comments to his SVN changes :coolsmile:

I hope it goes a step further and you are somehow allowed to load files from where ever you want.[/quote]

Am I missing something or are 'include' and 'include_once' excluded from the loading capabilities in CI? :-)
#6

[eluser]xwero[/eluser]
[quote author="Mirage" date="1218577502"]
Am I missing something or are 'include' and 'include_once' excluded from the loading capabilities in CI? :-)[/quote]
In the current code the filepaths are still semi_hardcoded
Code:
if (file_exists(APPPATH.'config/'.$class.EXT))
            {
                include_once(APPPATH.'config/'.$class.EXT);
            }
CI would be more flexible if the paths could change.

A real world scenario : if you run multiple apps from one CI base and some of the apps share a config file it would be more DRY to put it in the system/config directory than copying it per app.

Another example is that multiple apps using the same extended helper.
#7

[eluser]nmweb[/eluser]
You could always do symlinks.

In general though I agree. Why not a $CI->add_controller_dir() method to point to another controller dir that needs to be looked into when searching for controllers? Makes for more flexibility.
#8

[eluser]Colin Williams[/eluser]
xwero, should two apps really be tightly coupled like that? Also, it's easy enough to have one repository, then all the app-specific libs/helpers do is include '/repo/lib.php';
#9

[eluser]Tom Glover[/eluser]
It again depends on the purpose for the application, for example im making 3 sites, that run of the same template, and the same design, with only minor difference's so this is where it would be useful.
#10

[eluser]xwero[/eluser]
nmweb what if you remove the file where all the other files are symlinked to? Apps can be removed if clients fail to pay or change to another company. Creating a "master" app to make sure the file doesn't gets deleted seems a bit wasteful of diskspace, but at the same time it is appealing.

Colin if you have several apps that only need to be themed by domain my solution is to put almost all of the files in the system directory. I hacked the loader library to make this possible but i would like to see an official solution.

About the helpers, if you set up a repo directory with for example a MY_url_helper.php and at a later date (another) developer adds a MY_url_helper.php to the application/libraries directory. This can cause bugs because a same function is defined in the repo library.




Theme © iAndrew 2016 - Forum software by © MyBB