Wolfgang Reinhardt | 1 Nov 02:46 2005
Picon

Setting an resource to value of datapath

Hi,

i'm trying to set up the resource of a view by the result of an web  
service.
The scenario is that i call an web service which generates a gif and  
returns the url to the generated picture. I am able to acces the url  
with a datapath..

My problem now is how can i set the resource of an view dynamically  
to the url returned by the web service?

Any ideas?

regards,

Wolle
Henry Minsky | 1 Nov 04:19 2005
Picon

Re: Setting an resource to value of datapath

In the demos/amazon app, there is an example of this, a view which shows
an image of a CD album cover, from an  Amazon search. It sets its datapath
to the desired xpath, and then constrains the "source" attribute to the data value.

The line

<attribute name="source" value="${this.data}"/>

does that.



        <view name="cover" datapath="ImageUrlSmall/text()" y="7" width="50" height="50" clip="true"
            onmouseover="dragsmall.display(this, this.datapath.xpathQuery('text()'))"
            onmouseout="dragsmall.hide()"
            onmousedown="dragsmall.start()"
            onmouseup="dragsmall.stop(); this.itemDropped(parent.datapath);"
            ondblclick="this.parent.getInfo()">
            <attribute name="source" value="${this.data}"/>
            <method name="itemDropped" args="dpath">
                if (dragsmall.droppedInView(cart.parent)) {
                    cart.addItem(dpath);
                } else if (dragsmall.droppedInView(wish.parent)) {
                    wish.addItem(dpath);
                }
            </method>
        </view>



On 10/31/05, Wolfgang Reinhardt <wolle <at> upb.de> wrote:
Hi,

i'm trying to set up the resource of a view by the result of an web
service.
The scenario is that i call an web service which generates a gif and
returns the url to the generated picture. I am able to acces the url
with a datapath..

My problem now is how can i set the resource of an view dynamically
to the url returned by the web service?

Any ideas?

regards,

Wolle
_______________________________________________
Laszlo-dev mailing list
Laszlo-dev <at> openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev



--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com

_______________________________________________
Laszlo-dev mailing list
Laszlo-dev <at> openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
David Temkin | 2 Nov 00:05 2005

Re: [laszlouser] Release of LaszloPHP for PHP-Remoting - using of PHP-Classes like in amfPHP

Sebastian -- this sounds quite promising. I am forwarding to the  
openlaszlo mailing lists as well.

In terms of AMF, here are a couple of observations --

1) you're right, we'd rather not use a Flash-specific solution or  
format :-)
2) instead of using bytecode, how about serialize PHP datatypes to  
XML? (Is there a standard approach for this, perhaps based on XML-RPC)
3) this approach appropriate for LZX since XML is essentially a  
native datatype in LZX.
4) if you like the fact that AMF transmits compressed binary, how  
about just use GZipped XML over http? Compression is comparable (at  
least) the bytecode solution that we use proxied data
5) an XML-oriented solution rather than a  bytecode or javascript- 
oriented solution will provide portability into other runtimes when  
LZX supports them (incl. flash player 8.5, which uses different  
bytecode!)

- D.

On Oct 31, 2005, at 10:23 AM, Sebastian Wagner wrote:

> Hello everyone
>
> Because i needed it for several things i made something for easily  
> accessing
> PHP-Classes with Openlaszlo. In Flash I often used amfPHP for  
> Remoting and
> so it is quiet similar to amfPHP, you can reuse your Classes from  
> amfPHP.
> In general you just write a PHP-Class put it in a certain folder  
> and than
> you are able to access the Methods of the Class remotly. I also made a
> "Servicebrowser" which allows you to have a look at the Methods of  
> your
> Class and the ServiceBrowser also generates some LaszloCode with  
> alle your
> "remotecalls". You can have a quick look at it here:
> http://www.laszlo-forum.de/projekte/laszloPHP/servicebrowser/(there  
> are some
> example Classes on the left)
> On the Clientside you just have to include the Library  
> "LZXRemoting.lzx" /
> use the Code generated by the Servicebrowser.
>
> At the moment these Features are supported:
> -Sending Params or mulit-dimensional Arrays (no matter if Index is  
> numeric
> or assoziativ) from Client to Server and Back again
> -Solo- or Proxied-Application
> -Logging
> -Error-Handling
> -Servicebrowser
>
> This is an alpha-Release ... so send me your reports or you also  
> can post
> your Problems in the German Laszlo-forum <http://www.laszlo- 
> forum.de> or use
> the contactform <http://www.webbase-design.de/cms/kontakt.html> on my
> webside <http://www.webbase-design.de>
>
> You can get it here:
> http://downloads.laszlo-forum.de/
> http://www.webbase-design.de/cms/fileadmin/user_upload/ 
> laszloPHP_ver_01.zip
>
> For Installation just unzip it and upload it to your Webserver
>
>
> But i also got some questions about AMF, writing ByteCode in  
> Laszlo, Licence
> of AMF. I think Openlaszlo will never use the AMF Protocol, because  
> it is
> proprietary to Macromedia, I also do not use it. I just serialize the
> Objects and send it.
> So lets built our own Byte-Code-File for Openlaszlo and Licence it
> Open-Source.
> I just stopped it because you won't find some docs about writing pure
> ByteCode with Actionscript or Javascript. But it has to be  
> possible. AMF
> also is able to write ByteCode and send it to the Server. So can  
> anyone give
> me a hint where to find some Information about writing pure  
> ByteCode with
> Actionscript or Javascript?
>
>
> Regards
> --
> Sebastian Wagner
> http://www.webbase-design.de
> http://www.laszlo-forum.de
> Bleichstra├če 92
> 75173 Pforzheim
> Tel.: 0177-7341829
> Home: 07231-417456
> seba.wagner@...
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------ Yahoo! Groups Sponsor -------------------- 
> ~-->
> Get Bzzzy! (real tools to help you find a job). Welcome to the  
> Sweet Life.
> http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/saFolB/TM
> -------------------------------------------------------------------- 
> ~->
>
>
> Yahoo! Groups Links
>
> <*> To visit your group on the web, go to:
>     http://groups.yahoo.com/group/laszlouser/
>
> <*> To unsubscribe from this group, send an email to:
>     laszlouser-unsubscribe@...
>
> <*> Your use of Yahoo! Groups is subject to:
>     http://docs.yahoo.com/info/terms/
>
>
>
>
Oliver Steele | 3 Nov 01:36 2005

Re: [Internal-Dev] Anyone know where I can read the LPS verison number?

On Nov 2, 2005, at 7:05 PM, P T Withington wrote:
It is in build.properties

Available at runtime as canvas.lpsversion

And on the server as org.openlaszlo.server.LPS.getVersion().

On 2 Nov 2005, at 18:02, Max Carlson wrote:

In compiled LPS I need to be able to get at the current version number.  Is there a file I can read this out of?  Surprisingly, I didn't see it in lps.properties or lps.xml.

_______________________________________________
Laszlo-dev mailing list
Laszlo-dev <at> openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
Max Carlson | 3 Nov 02:05 2005

For your review: Laszlo Database API spec version 1.1

Hi,

I'd like your feedback on the attached revised spec.  Thanks to everyone 
who has provided feedback so far - I've incorporated a lot of it, and 
revision tracking is on so you should be able to easily see the parts 
that changed.  Let me know how it looks.  Once again, I look forward to 
hearing your thoughts and feedback!

Regards,
Max Carlson
OpenLaszlo

_______________________________________________
Laszlo-dev mailing list
Laszlo-dev <at> openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
Henry Minsky | 3 Nov 02:28 2005
Picon

Re: For your review: Laszlo Database API spec version 1.1

I'm a little unclear on how things are divided up to build an app. When you declare a model, that gets compiled on the *server* into a a database schema and a handler that accepts incoming URLs which contain those path-like commands, right?

On the client, there is some protocol that can deserialize the results of commands and turn them into .. .what? datasets?

One thing I am concerned about is what is the mechanism where the user  can override or extend  the SQL that is automatically compiled, and directly right their own "command handlers" (I'm not sure what to call this) on the server?

In my experience, each particular brand of database you choose for the back end will have many of its own quirks or unique non standard features, which you will often want to take advantage of, so it would be important to be able to manually write your own "methods", and particulary in the case where you do complex transactions than involve touching a lot of tables, or that involve calling stored procedures in some complex way...


On 11/2/05, Max Carlson <max <at> laszlosystems.com> wrote:
Hi,

I'd like your feedback on the attached revised spec.  Thanks to everyone
who has provided feedback so far - I've incorporated a lot of it, and
revision tracking is on so you should be able to easily see the parts
that changed.  Let me know how it looks.  Once again, I look forward to
hearing your thoughts and feedback!

Regards,
Max Carlson
OpenLaszlo



_______________________________________________
Laszlo-dev mailing list
Laszlo-dev <at> openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev






--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com

_______________________________________________
Laszlo-dev mailing list
Laszlo-dev <at> openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
Henry Minsky | 3 Nov 03:08 2005
Picon

schema validator bug

http://www.openlaszlo.org/jira/browse/LPP-472

There is a long standing bug we have with a third party library that we use to check an lzx file
against the schema that we build. The "jing" schema validator throws stack overflow or
out of memory exceptions when validating certain lzx files. It appears to be triggered on some specific
complex chain of class and subclass definitions, but we have never been able to really classify
what causes it.

We haven't been able to figure out what the bug is, although at one point I modified the source code
of jing to do some some of its depth first searches in a different order and made the problem get a little better.

Still, I would like to punt using the schema validator code entirely, since I don't understand it,
 no one seems to be maintaining it anymore, and they never fixed the test cases I sent. The Sun Multi-schema validator
also exhibits the same bug, so it points to be something in the fundamental algorithm being used, rather than the
implementation. It is possible we have a bug in our schema declaration which causes a circularity, but I haven't
been able to identify this and am not sure how to narrow it down. I did some tracing of the validator as it runs
in the stack overflow cases, but am not sure that approach is less work than starting over with a different solution.

The alternative would be to write our own validator, which would be pretty hard for the general case, or maybe a simplified version which might be more feasible, something to check a more limited class of legal syntax.



--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com

_______________________________________________
Laszlo-dev mailing list
Laszlo-dev <at> openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
Geert Bevin | 3 Nov 09:23 2005

Re: For your review: Laszlo Database API spec version 1.1

Hi Max,

I follow Henry on this, as I said before in my previous comments.

I think that you should settle on a language that allows people to  
provide model datasets and method signatures. The implementation of  
these methods should be totally up to the server-side and I still  
don't any need to add SQL to the mix. The same goes for callbacks.

I still think that you should make the relationship mappings just one  
of the many possible constraints. A lot of others can be useful and  
they will be totally application dependent.
I also miss constraints on fields (notNull, notEmpty, maxLength,  
minLength, ...). For example, here is the list of constraints we  
currently support in RIFE:
http://rifers.org/docs/api/com/uwyn/rife/site/ConstrainedProperty.html
http://rifers.org/docs/api/com/uwyn/rife/cmf/CmfProperty.html
http://rifers.org/docs/api/com/uwyn/rife/site/ConstrainedBean.html

I understand you base it on ActiveRecord, but why, and why  
specifically the Rails alternative? Wouldn't is be much more useful  
to have a more generic approach?

Best regards,

Geert

On 3-nov-05, at 02:28, Henry Minsky wrote:

> I'm a little unclear on how things are divided up to build an app.  
> When you declare a model, that gets compiled on the *server* into a  
> a database schema and a handler that accepts incoming URLs which  
> contain those path-like commands, right?
>
> On the client, there is some protocol that can deserialize the  
> results of commands and turn them into .. .what? datasets?
>
> One thing I am concerned about is what is the mechanism where the  
> user  can override or extend  the SQL that is automatically  
> compiled, and directly right their own "command handlers" (I'm not  
> sure what to call this) on the server?
>
> In my experience, each particular brand of database you choose for  
> the back end will have many of its own quirks or unique non  
> standard features, which you will often want to take advantage of,  
> so it would be important to be able to manually write your own  
> "methods", and particulary in the case where you do complex  
> transactions than involve touching a lot of tables, or that involve  
> calling stored procedures in some complex way...
>
>
> On 11/2/05, Max Carlson <max <at> laszlosystems.com> wrote: Hi,
>
> I'd like your feedback on the attached revised spec.  Thanks to  
> everyone
> who has provided feedback so far - I've incorporated a lot of it, and
> revision tracking is on so you should be able to easily see the parts
> that changed.  Let me know how it looks.  Once again, I look  
> forward to
> hearing your thoughts and feedback!
>
> Regards,
> Max Carlson
> OpenLaszlo
>
>
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev <at> openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
>
>
>
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky <at> laszlosystems.com
>
> _______________________________________________
> Laszlo-dev mailing list
> Laszlo-dev <at> openlaszlo.org
> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net
Max Carlson | 3 Nov 22:51 2005

Re: For your review: Laszlo Database API spec version 1.1

Hi Henry,

Thanks for your feedback.  I'll definitely put some more background on 
how the spec will ultimately work in the context of Laszlo.  Replies below:

Henry Minsky wrote:
> I'm a little unclear on how things are divided up to build an app. When 
> you declare a model, that gets compiled on the *server* into a a 
> database schema and a handler that accepts incoming URLs which contain 
> those path-like commands, right?

Correct.

> On the client, there is some protocol that can deserialize the results 
> of commands and turn them into .. .what? datasets?

A dataset.  As the records in the dataset are mutated, change commands 
would accumulate on the client.  They would then be sent up to the 
server to alter the data source.

> One thing I am concerned about is what is the mechanism where the user  
> can override or extend  the SQL that is automatically compiled, and 
> directly right their own "command handlers" (I'm not sure what to call 
> this) on the server?

I'll add a post-processing callback that allows developers to alter the 
generated SQL as they see fit.

I'll also add a more generic kind of method call that specifies a method 
signature that gets invoked on the server.

> In my experience, each particular brand of database you choose for the 
> back end will have many of its own quirks or unique non standard 
> features, which you will often want to take advantage of, so it would be 
> important to be able to manually write your own "methods", and 
> particulary in the case where you do complex transactions than involve 
> touching a lot of tables, or that involve calling stored procedures in 
> some complex way...

The idea is to hide or abstract as much of that complexity as possible, 
but I agree, we need the escape hatch.

Thanks again!

-Max
Henry Minsky | 3 Nov 23:01 2005
Picon

Re: For your review: Laszlo Database API spec version 1.1

I used to work on a system called OpenACS (www.openacs.org) which is a app server environment that uses Tcl and AOLserver.

There were many modules that people wrote, and the system can be targeted to Oracle, Postgres, and maybe some other database I am not sure.

It is very instructive to see how they did the back end for various modules, such that they could target Oracle or Postgres.

A module, such as a calendar or mailinglist manager, would have a directory of
files, with oracle or postgres-specific queries broken out into separate files, while queries which could be common between them would be in a generic sql file.  Each query was given a name, so that the common code would refer to it by name, and the code for the individual databases would be given the best possible implementation.



On 11/3/05, Max Carlson <max <at> laszlosystems.com> wrote:
Hi Henry,

Thanks for your feedback.  I'll definitely put some more background on
how the spec will ultimately work in the context of Laszlo.  Replies below:

Henry Minsky wrote:
> I'm a little unclear on how things are divided up to build an app. When
> you declare a model, that gets compiled on the *server* into a a
> database schema and a handler that accepts incoming URLs which contain
> those path-like commands, right?

Correct.

> On the client, there is some protocol that can deserialize the results
> of commands and turn them into .. .what? datasets?

A dataset.  As the records in the dataset are mutated, change commands
would accumulate on the client.  They would then be sent up to the
server to alter the data source.

> One thing I am concerned about is what is the mechanism where the user
> can override or extend  the SQL that is automatically compiled, and
> directly right their own "command handlers" (I'm not sure what to call
> this) on the server?

I'll add a post-processing callback that allows developers to alter the
generated SQL as they see fit.

I'll also add a more generic kind of method call that specifies a method
signature that gets invoked on the server.

> In my experience, each particular brand of database you choose for the
> back end will have many of its own quirks or unique non standard
> features, which you will often want to take advantage of, so it would be
> important to be able to manually write your own "methods", and
> particulary in the case where you do complex transactions than involve
> touching a lot of tables, or that involve calling stored procedures in
> some complex way...

The idea is to hide or abstract as much of that complexity as possible,
but I agree, we need the escape hatch.

Thanks again!

-Max



--
Henry Minsky
Software Architect
hminsky <at> laszlosystems.com

_______________________________________________
Laszlo-dev mailing list
Laszlo-dev <at> openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev

Gmane