Welcome Guest, Not a member yet? Register   Sign In
How to structure my CI project
#1

[eluser]Frank Liu[/eluser]
Hi All,

What is the best practice for structuring a CI Project?

My group has about 10+ people. Each person could potentially contribute to a portion of the website (some silly web tools). Should each person create his own application folder, where he will have a complete set of mvc+helpers+config, or each person manage their own mvc files in a single app?

I would prefer the first approach since then each can manage their own portion with their own version control system. However, if so, how do we share certain things among applications. For instance authentication. In order to do it properly, we really need "libraries" for authentication, models for storing user data and controllers/views for login/logout/user management pages. Is there a clean way for me to reuse these across different apps? In Django, sharing across apps is built into the python language, i.e. just import packages/modules. In php/CI, it's not apparent how to achieve this. Ideally, maybe something like

$this->load->model($model_name, $app_name);

Currently I am doing silly things like symlink the model/view files around. But this somehow feels dirty.

In addition, is there a recommended way to store media files like js, css, img files? The way i am planning to do this is to create a media file in each app and again symlink them into a central static file server directory. This way, each app folder is completely self-contained. Is this proper?


Messages In This Thread
How to structure my CI project - by El Forum - 08-14-2009, 01:43 AM
How to structure my CI project - by El Forum - 08-14-2009, 04:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB