On 08/29/2007 04:18 PM Frederik Holljen wrote:
> On Wednesday 29 August 2007, Derick Rethans wrote:
>> On Wed, 29 Aug 2007, Frederik Holljen wrote:
>>> On Wednesday 29 August 2007, Kore Nordmann wrote:
>>>> On Wed, 2007-08-29 at 13:50 +0200, Raymond Bosman wrote:
>>>>>> 1) Use Structs / Objects
>>>>>>
>>>>>> You may combine lots of information in some structs or objects
>>>>>> representing logical objects in your application, and pass nothing
>>>>>> more but them, like a $request-Struct containing all request
>>>>>> information.
>>>>>>
>>>>>> You are probably already dooing this, but the logical seperations
>>>>>> still result in too many variables?
>>>>> Something like?:
>>>>>
>>>>> {use $send}
>>>>> {$send->a}
>>>>> {$send->b}
>>>>>
>>>>> And $send is a default object send to each Template?
>>>> Hmm, nice idea. :)
>>> It's basically a global variable... but how do you know which global
>>> variables are available in a template?
>> Right.., instead of this, it would be more practical to *indicate* it is
>> a global (as in option 4).
> You still don't know what global variables are available though. The only way 
> to find out is to read the php source which is exactly what we wanted to 
> avoid...

The use of global variables is considered "bad application design" in
any programming language I know. Do you think it is a good idea to
introduce such stuff in the template language at all?

I personally like the struct approach. That way, you keep all the good
ideas behind the "send-use" syntax and don't need to pass a variable for
each data value you need in a sub-template.

Regards,
Toby
-- 
Mit freundlichen Grüßen / Med vennlig hilsen / With kind regards

Tobias Schlitt (GPG: 0xC462BC14) eZ Components Developer

[EMAIL PROTECTED] | eZ Systems AS | ez.no
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to