Welcome Guest, Not a member yet? Register   Sign In
File hierarchy and setup for CodeIgniter and ZendFramework or possibly more...
#1

[eluser]Unknown[/eluser]
I have been reading a lot about all these frameworks and choices out there and I know that alot of it depends on the project type and scale. since for our project which is both large and complex we can not easily by pass the Zend's classes nor CodeIgniter's light foot print and speed. We would also need jquery and Extjs and not very sure about what we might need 1 year down the line. However for now this is the way we would like to setup our project if possible?

fr (Frameworks)
--CodeIgniter_1_7_2 (system folder content)
--Zend_1_9_5 (aci, amf, classes)
--Zendx_1_9_5 (xtras and own made)
--Jquery_1_3_2 (the library)
--Extjs_1_2_5 (the library)
public_html
index.php
index.html
config
view
model
controllers
helpers
hooks
language
libraries
errors
=========================================
What i would like even better is if I could do it this way:

fr (Frameworks)
--CodeIgniter_1_7_2 (system folder content)
--Zend_1_9_5 (aci, amf, classes)
--Zendx_1_9_5 (xtras and own made)
--Jquery_1_3_2 (the library)
--Extjs_1_2_5 (the library)
public_html
index.php
index.html
helpers
hooks
language
libraries
config
errors
pr1(my project MVC)
--view
--model
--controllers

Problem is i can not get the above to work, any help would be very very very much appreciated.

I would have all my Frameworks in one folder, all my view and controllers, models in one. I understand that i would not be able to have all of zend's frameworks benefit to me but only the use of classes and the CI would be the main framework which is what i whant. however if we could switch frameworks in whole that would be like heaven!
#2

[eluser]n0xie[/eluser]
Use symlinks

Also why have your view, model and controller in one folder, and the helpers, hooks etc in the root? These are usually application specific.

This is our basic skeleton and would be a more sane approach imho:

Quote:- releases/
- current/
- version1/
- application/
- controllers/
- etc
- version2/
- application/
- controllers/
- etc
- frameworks/
- CI/
- current
- CI1.7.2/
- CI1.7.1/
- CI1.7.0/
- Zend/
- Zendx/
- log/
- config/
- public_html/
- index.php
- public/
- JS/
- Jquery/
- Extjs/

Rationale being that the JS libraries should be publicly available and readable. The rest of the files should never be exposed via your webserver: it's not necessary plus it could potentially be exploitable.

The way it works is like this:
- the index.php has application point to /releases/current.
- /releases/current is a symlink to the current version. So if you want to upload a new version, you create a new directory (this can be done using your SCM and be automated), upload/export your version, then change the symlink to current ét presto, website is updated. Something broke? You symlink back to the previous version, and website is back to previous release, while you try to find out what went wrong. Capistrano can automate this process for you.
- the index.php has system point to /frameworks/CI/current.
- /frameworks/CI/current is a symlink to the current version of CI. Again, if a new release comes out, you upload it, then change the symlink and your CI is updated. You notice some change broke something, you set the symlink back to the previous version and you're done.

Hope this helps. Especially when it comes to larger projects, a good file structure can make the difference between support hell or easily maintainable.




Theme © iAndrew 2016 - Forum software by © MyBB