[AWS] How to handle the result of a template-parsed string
Pascal Obry
pascal at obry.org
Fri Apr 16 08:51:25 CEST 2004
Jessica, Vincent,
> The template parser Parse function is returning a string.
> So I see two ways to handle it:
> 1) Call aws.response.build with the string as a parameter;
Yes, that's a standard usage.
> 2) or Call aws.response.file: the string is stored in the file.
Not very efficient !
> problem with 1) cascading style sheets (css) references in the string do
> not work.
What's the problem?, this definitly should be working and I know AWS servers
that are using CSS.
> problem with 2) what happens if 2 users request simultaneously the parsed
> file with different data for each user: my file could be overwritten and one
> user would not get the data he has requested.
That's indeed a concerned. If you want to pass by a file (which I think is
just plain wrong) you have also to add support for concurrency. So the
filenames should be different for each user.
> And I don't think it is great to generate one file for each request.
Agreed.
> What is the best way to implement that?
Using the first solution which should be ok with CSS.
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
More information about the AWS
mailing list