-- Jurian Sluiman <[email protected]> wrote
(on Sunday, 10 April 2011, 03:28 PM +0200):
> With several ZF projects on one server and each a default config (Zend and 
> ZendX libraries in the library/ folder of a project) we have many ZF 
> libraries 
> on our system.
> 
> Not all versions are the same but we'd like to reduce the number (mainly 
> because of APC performance). We run Zend Server CE and have zend-server-
> framework installed. What is the best option?
> 
> 1) All projects use the /usr/local/zend/share/ZendFramework/library/Zend lib
> 2) We install our own /usr/local/zend-framework/1.11.5/Zend libs
> 3) Status quo (libraries per project)
> 
> For 1) we need to make sure all projects still work after an update. With BC 
> breaks, it can cost suddenly a serious amount of time to fix it. Advantage: 
> simple update, all in one place.
> For 2) we don't need to worry about the different versions, because we 
> install 
> the libraries under different version numbers.
> For 3) I don't think it's the best option, but maintainability is the best.
> 
> The next thing is namely not to worry about production, but rather 
> development 
> environments: how do we manage keeping the libraries in a custom place for 
> all 
> different developers?

Zend_Loader_Autoloader actually understands a concept of versioned ZF
libraries already, which would make (2) an obvious choice. On the
following page:

    http://framework.zend.com/manual/en/zend.loader.autoloader.html

look for the section entitled "Selecting a Zend Framework version".
Basically, have the latest version of ZF symlinked to a standard
directory, use the Zend_Loader_Autoloader class from that directory,
and then point it to the base directory and indicate a version you wish
to use.

Zend_Application is also aware of this information, and you can
configure it with the keys "autoloaderzfpath" and "autoloaderzfversion".

This approach allows you to have parallel ZF installs, while still
re-using them if several applications share the same versions.
Additionally, you can keep only the latest version of a given minor
release at a time -- these introduce BC breaks *extremely* *rarely* (as
in: only for security issues), which allows you to further minimize the
number of versions you retain on your system.

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to