File hierarchy and setup for CodeIgniter and ZendFramework or possibly more... |
[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/ 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. |
Messages In This Thread |
File hierarchy and setup for CodeIgniter and ZendFramework or possibly more... - by El Forum - 11-13-2009, 03:36 AM
File hierarchy and setup for CodeIgniter and ZendFramework or possibly more... - by El Forum - 11-13-2009, 04:28 AM
|