On Wednesday 29 August 2007, Raymond Bosman wrote:
> > > This reminds me of some email I sent earlier about the send_array
> > > construct to pass larger amounts of variales where we concluded that
> > > this would make available variables less visible, so we should propose
> > > another mechanism. The "solution" back then was, to include the sub
> > > template from your application and return the result to the main
> > > template which may echo it anywhere using {raw}.
> >
> > I completely agree. This is a problem with way the application is built.
> > Imagine you have the same problem in programming with lots of functions
> > that call each other in succession. Do you pass variables along in the
> > same way? No, it becomes messy.. you can then either group them somehow,
> > make global variables or you make some other means to get the info (e.g
> > through other methods).
>
> Yes, I agree. The Template engine supports in these terms only 'grouping'
> and passing variables along.  Grouping is supported in a way that the user
> application can create objects that are sent to the template. Once in a
> template grouping is not possible anymore.
>
> Global variables and class members are in programming terms not supported
> in the template engine.
>
> Personally, I compare each template with a function. The {use} variables
> are the function arguments. I think all the solutions we proposed are used
> in one or another way in a programming language.
Yes, this is what I do as well. Can you give me examples of the original three 
proposals in programming languages? The last two have parallels to 
programming languages except you don't know in which context your template 
will be called and so don't know which globals will be available....

Cheers,
Frederik


-- 
Components mailing list
Components@lists.ez.no
http://lists.ez.no/mailman/listinfo/components

Reply via email to