[Laszlo-dev] Re: serverless operation toplevel attribute
Oliver Steele
steele at laszlosystems.com
Tue Jan 18 16:09:31 PST 2005
[Moving to laszlo-dev:]
On Jan 18, 2005, at 6:39 PM, Henry Minsky wrote:
> The hack for 'serverless' http data sources right now is that if you
> construct a dataset with the "transport=direct" attribute, then
> LzDataset constructs an anonymous XML datasource as its parent,
> otherwise it constructs an LzHttpDatasource.
Here's how to bring this into line with the Compilation Switch+Toplevel
Attribute proposal:
- Add <canvas proxied="false|true|inherit"> to the schema.
- Add LzCanvas.proxied. Change CanvasCompiler to initialize this from
<canvas proxied>, when it is present.
- When the application is initialized, if canvas.proxied=='inherit'
then set it to true or the value of the lzproxied query parameter.
(I'm thinking that the query parameter should be lzproxied instead of
proxied, as per "fake query parameter namespaces".)
- Modify LzDataset.prototype.construct to test for (canvas.proxied ||
args.transport=='direct').
Can something similar be done for media requests?
This implements the parts about libraries, compilation warnings, or
debug warnings, but it gets enough of the feature implemented to begin
using it. It also leaves <datasource direct> in the schema; we can
remove or rename that once we have a final spec.
> There is actually at present no LZX tag to construct an
> LzXMLDatasource from script.
>
> This implementation needs to be changed, although, does anyone
> actually use <datasource> in their code anymore, or do they just
> declare <dataset> for everything?
>
>
> LzDataset.prototype.construct = function ( parent , args ){
> //Default datasource type is http
> if (! parent.instanceOf(_root.LzDatasource) ) {
> this.oncanvas = parent == _root.canvas || parent == null;
> if (args.transport == "direct") {
> parent = new _root.LzXMLDatasource( _root.canvas,
> { name: "anonXMLDS" +
> _root.LzDataset.anonDatasourceNum++});
> } else {
> parent = new _root.LzHTTPDatasource( _root.canvas,
> { name: "anonHTTPDS" +
> _root.LzDataset.anonDatasourceNum++});
> }
> parent.repset = true;
> }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2250 bytes
Desc: not available
Url : http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20050118/e5fbe335/attachment.bin
More information about the Laszlo-dev
mailing list