| Previous · Next | |
| User | Message |
|
apeiron
|
Date: 2/26/2011 7:16 pm · Subject: Re: setScratch · Rating: -1
I know I'm the new guy and don't have proper context on this.. but in reading over the conversation I'm wondering if it would be beneficial to maintain a single object in the session for this purpose and just pass in the data as a json string? Then you're guaranteed ordered, don't need a prefix, and don't have limitations for complex types. There would be some question as to whether or not to rely on the client side to pass in any existing scratch vars so the server can just replace the current scratch object or to merge the passed in object with the existing session object. Seems like either could grow out of hand quickly. You could also encode the string, not much for security but would prevent any encoding conflicts with http specification.Also I can't seem to respond in the forum, my rights probably aren't setup yet. I'll check on that Monday. --- doug@plainblack.com wrote: From: <doug@plainblack.com> To: chris@plainblack.com cc: Subject: [wg-dev] Re: setScratch Date: Sat, 26 Feb 2011 18:53:45 -0600 preaction wrote: I can't see why we would need a prefix, but if anyone else can find a reason we could do it. I also don't see the need to prefix the scratch var with "www_" anymore, but I think that's because we currently make no guarantees about the (in)security of session scratch. Otherwise, it's up to the developer/admin to make sure nothing intercepts the pairs being sent to setScratch, if they are using something that requires setScratch, or that the name doesn't cause some other problem ('shop' might, for example). As we move away from using query strings as function specifiers / request routing, this will become less of a concern. http://www.webgui.org/forums/dev/setscratch/3 -- WebGUI http://www.webgui.org |
| Back to Top |
Rate [ | ]
|
|
arjan
|
Date: 2/26/2011 8:36 pm · Subject: Re: setScratch · Rating: -1
Hi Chris,Right now, you already can put arbitrary data in a scratch variable such as a json string. But the great thing of the session scratch is, that a templater can use it without any knowledge of perl or javascript. You post the data with a form and you retrieve it with a template variable. Simple as can be. As soon as json would be required you lose both simplicity as well as the possibility to use it with - best practice - progressive enhancement. The limit right now is, that although you can set as many variables as you like, it's limited to only one per click. And since the limit is only a limit in practical use - one per click - and not an actual limit, there's no real reason for a limit of one variable. And the prefix thing is about how you retrieve the variable from the form post data. Right now you call it with specific names: scratchName and scratchValue. That's why I wondered if a prefix might be necessary. Because other variables may fall though to be processed by the next contentHandler. If you only have one, the whole name is effectively a prefix, as it is now. Kind regards, Arjan. On 02/27/2011 02:16 AM, chris@plainblack.com wrote: apeiron wrote: -- Recent: http://www.lomcongres.nl/ Congres- en nieuwsbriefportaal met relatiebeheer systeem voor het Landelijk Overleg Milieuhandhaving Setting Standards, a a Delft University of Technology and United Knowledge simulation exercise on strategy and cooperation in standardization, http://www.setting-standards.com United Knowledge, internet voor de publieke sector Keizersgracht 74 1015 CT Amsterdam T +31 (0)20 52 18 300 F +31 (0)20 52 18 301 bureau@unitedknowledge.nl http://www.unitedknowledge.nl M +31 (0)6 2427 1444 E arjan@unitedknowledge.nl Bezoek onze site op: http://www.unitedknowledge.nl Of bekijk een van onze projecten: http://www.handhavingsportaal.nl/ http://www.setting-standards.com/ http://www.lomcongres.nl/ http://www.clubvanmaarssen.org/ |
| Back to Top |
Rate [ | ]
|