Hi James,

On Fri, Aug 13, 2010 at 1:31 PM, James Pic <[email protected]> wrote:
> On Thu, Aug 12, 2010 at 8:51 PM, Jerome Renard <[email protected]> 
> wrote:
>> James,
>>
>> On Thu, Aug 12, 2010 at 3:15 PM, James Pic <[email protected]> wrote:
>>> On Thu, Aug 12, 2010 at 2:19 PM, Jerome Renard <[email protected]> 
>>> wrote:
>>>>
>>>> Context aware configuration files
>>>> ---------------------------------
>>>>
>>>> Creating a website requires to go through 3 different execution contexts:
>>>>
>>>> 1. dev
>>>> 2. staging
>>>> 3. production
>>>>
>>>> Each context has its own specificities. For example the database used for 
>>>> each
>>>> of these 3 contexts is different. So this must be defined for each context 
>>>> and
>>>> used according to the one the web application is actually running in.
>>>>
>>>> Those 3 contexts should be handled by the Configuration component, during 
>>>> the
>>>> configuration directive merge process.
>>>>
>>>> Directory structure
>>>> -------------------
>>>>
>>>> In order to provide a clean directory structure the Configuration component
>>>> should be able to read and understand a directory structure compared to 
>>>> this
>>>> one: ::
>>>>
>>>>     /[..]/conf/
>>>>             |-- common
>>>>             |   |-- dev
>>>>             |   |-- prod
>>>>             |   `-- staging
>>>>             `-- apps
>>>>                 |-- app1
>>>>                 |   |-- dev
>>>>                 |   |-- prod
>>>>                 |   `-- staging
>>>>                 `-- app2
>>>>                     |-- dev
>>>>                     |-- prod
>>>>                     `-- staging
>>>>
>>>
>>> What if that's *not* what the user wants? Will he still be able to use
>>> the merger with simple ezcConfiguration objects? In that case i see no
>>> objections ;)
>>
>> Hmm I did not thought about that problematic, but I think that if we do our 
>> job
>> correctly we should be able to use the merge mechanism on two files. What do
>> you think ?
>>
>
> I though maybe we could just allow the user to merge configuration
> objects into another configuration object, which can then be used by
> your special manager, or normal managers, or normal writers and/or
> readers.
>
> Would that be simple and efficient enought?

I think so, it should no be possible to merge more than two
configuration objects.
You will get an octopuss otherwise. So merging two configuration objects into a
new one sound acceptable to me, and give enough flexibility to do more
work after
the merge process.

-- 
Jérôme Renard
http://39web.fr | http://jrenard.info

Reply via email to