|
|||
|
any recommendations for how to structure zend framework for working with multiple websites?
I want to share the core framework and other core classes but still have a lot of flexibility for customizing specific sites. Also, to take this a step further, how about multiple "concepts", each concept having multiple websites (and all sharing a common framework). |
|
||||
|
Hi Twiddly, i'm not an expert, just a wannabe but i work in this way with ZF (I learned from the Akelos Project.
I work in a shared hosting webserver, so my file structure is something like Code:
/. ---------------->(something like /home/user_name/.)
/zf
/zf/library
/zf/docs
/zf/etc...
/my_project
/my_project/app
/my_project/app/controllers
/my_project/app/models
/my_project/app/views
/my_project/html
/public_html
Code:
<IfModule mod_php5.c> php_value include_path "/home/user_name/zf/library/." </IfModule> PHP Code:
If the /public_html folder of my_addon_domain.com is /public_html/my_addon, then i remove this folder and i create a soft link, with the same name than the folder: Code:
ln -s /home/user_name/my_project/html/ my_addon Hope this may give you some ideas. Cheers. |
|
||||
|
Hi Elemental, you are so right!
Quote:
Quote:
I think that sharing one core to multiple applications, isn't the best idea, but may be usefull. In any case you can upload multiple copies of it, after all, one of the goals of ZF is the easy installation. Cheers |
|
|||
|
thanks for the replies.
This is a dedicated server, with thousands of websites. I don't want to have to update the framework a thousand times ![]() Sounds like each site would have its own Application dir and share the rest? Also, the sites all share a common database and are similar in functionality. The look & feel (layout, css) must be configurable per site but otherwise the general features/functions are shared. |
|
|||
|
You could install ZF on a global location (like /usr/local/share/ZendFramework-1.0.2) and then symlink to this directory. When you update the framework you install it in /usr/local/share/ZendFramework-1.0.3 and then site by site you can update the symlink.
|
|
||||
|
I actually spent the better part of today setting up subversion repositories for the bulk of our projects at work.
The solution we finally settled on was using svn:externals pointing to the release tags. Each site we produce now has its own repository. Each repository has a svn:external property pointing to a release tag in the zend repository. When it comes time to update the framework, we simply change the svn:externals property to point to the new release tag and update, test, repair, test, check in, then the live site gets an update as its just a working copy of that site last stable release tag. The bad side of this is that everysite has a copy of the zf code. Space isn't a problem for us at work, but at home or on a more limiting hard drive you might still want to do the symlink thing. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|