Welcome Guest, Not a member yet? Register   Sign In
I do not like CI directory structure!
#1

[eluser]pokerking[/eluser]
1. Root directory is my website:

2. System directory level.

3. There is application level

4. My application level.

Too many layers...

Every time i look at the directoyry structure in Eclipse , i could n't find which file i was working...mainly because duplicating directory structure in application level and system level confuses me. System level is support is enough and there i sno need to duplicate in application level same directory structure.

So i removed all application level directories of CI and replace all views with smarty templates. it will take care of html template caching

A good framework will give option ...i see every framework comes with its own template view crap. Zend frame work view is also crap. Smarty does adequate job for me.

I have my own mem cache for object level caching and i use my own DB mapping.

So i scrapped application level CI directory structure because it is duplicating directory structure.

I don't like to hack stuff but i want to keep my development separate from all framework codes. Framework has to sit on top of my application and provide basic infrastructure services.

CI is too binding... only routing is simple and transparent in CI. Also benchmark class is helpful.

I also want to have Global output class. Mainly for debugging as some of my output can be json or something else. So i want to add up all output in low level layers and encode it before send it to browser. At presnt $this->output available only to controller. And i do not do anything in controller except routing further down.

Anyway .... i doubt anyone use multiple application with system directory structure.

This is what i like the directory structure to be.

SYSTEM
ALL CI directories including config , libraries
APPLICATION ( NO CI files in APPLICATION DIRECTORY )
app1
have its own custom set of directories.
app2
app3

That is what i would do . I do not like to mix framework code with my application business flow. That way i can take it and run to another framework or create my own if this break. Smile
#2

[eluser]wiredesignz[/eluser]
Its quite common to move application out of system and run them in parallel. CI performs quite happily like this.

But I think we need to take your opinions on what a good framework should do with a grain of salt. Your methods won't suit everyone.

Good Luck.
#3

[eluser]pokerking[/eluser]
True. I like framework as a infrastructure service provider sit on to of my business application rules. i do not want both get mingled. That would be a more cleaner to understand the boundaries of each domain and having more option and choices to choose.
#4

[eluser]pan69[/eluser]
Hi,

I think pokerking has a very valid point here. I'm just looking at CI for the first time and I was quite shocked by the fact that by default your application files are stored inside the actual framework structure. I'm sure you can change all this but by default I could for example not use svn:externals to include CI into my projects. I'm not sure how much work is involved in rewiring this stuff but it would mean that I would have to do this rewiring for all my projects by default. In my opinion the framework and the application files should sit next to each other by default and being bound by the front controller (index.php).

Just my two cents...
#5

[eluser]xwero[/eluser]
There is no problem doing what you suggest. Set the system and application directories to directories you choose and leave the application directory empty.

I like CIs approach having only one directory and one file added to the root. When i can't put the framework above the public directory i name the system directory ci to identify the framework and not confuse it with the codeigniter directory of the framework. I often got the luck clients didn't want to change their old file structure and in those cases it's a great solution.

Once you have the ability of putting the framework above the public directory i move the application directory out of the system directory and run multiple applications of one CI base.

To be short you have a lot of flexibility by setting the system and application directory.
#6

[eluser]wiredesignz[/eluser]
I imagine 99.9% of the CI Community agrees with what you say here pan69, its the 0.1% Owners we can't convince to change.

Take notice Ellislab Wink
#7

[eluser]xwero[/eluser]
I think it's a case of the lowest common denominator.

Maybe the people at Ellislab should create a configure your CodeIgniter application, than i don't have to do it Wink

The options i was thinking about are

- an option to move the application directory out the system directory
- add path to public files to index.php
- select additional libraries (validation, html table, ...)
- select helpers
- select database driver(s)
- select AR library use

- set system and application directories and maybe even other directories
- set database configuration
- set autoload configuration
- set config.php configuration

I was thinking about saving the setting but with the last options people will be reluctant to save those on an server they don't control.
#8

[eluser]adamp1[/eluser]
That would be quite a nice little feature not very hard also to make. Just a web form which built the autoload files and stuff.

I do think the application folder should be moved out of system, its just not the right place for it.
#9

[eluser]GSV Sleeper Service[/eluser]
I don't like anchovies
#10

[eluser]adamp1[/eluser]
Riiiiiiiiight...... slightly off topic, but hey, neither do I




Theme © iAndrew 2016 - Forum software by © MyBB