One way that I have implemented this in our solo app is to use the
LzDelegate and LzTimer together. For instance:
[CODE]
<method name="startPoll">
this.pollDelegate = new LzDelegate( this, "pollServer" );
LzTimer.addTimer( this.pollDelegate, 1000 );
</method>
<method name="pollServer">
canvas.checkSession(); // checks if session is still valid
board.updateBoard(srv.boardname); // updates the board dataset
LzTimer.resetTimer( this.pollDelegate, 1000 );
</method>
[/CODE]
So in this case the my dataset is called "board" and the "updateBoard()"
method just makes the dataset request the data from the source again.
This is how the boards on http://www.clockthat.com get updated
"globally" so that all users can see updated boards.
HTH,
Adeola.
John Sundman wrote:
> Pablo wrote the chapter in the Dguide and I edited it & updated it. I
> believe it's accurate and good, so far as it goes.
>
> What it does not tell you, because it cannot, is how to architect your
> application so that it scales well. When we get questions about how to
> build applications that use a persistent connection to handle millions
> of simultaneous users, the answer is, "talk to [EMAIL PROTECTED]"
> to see about consulting services, or to have laszlo build your
> application for you.
>
> That being said, perhaps Pablo and I should get together for an hour or
> so to go over the documentation with an eye to improving it.
>
> In general, the OpenLaszlo documentation does not cover best practices
> for architecting applications (design patterns, things like that).
> Some books are in the works that will address this gap.
>
> jrs
>
>
>
> On May 9, 2006, at 1:50 PM, Benjamin Shine wrote:
>
>> You have to poll the database, or use the persistent connection. Pablo
>> or John, is there any good persistent connection documentation? This
>> question has come up twice in the last few weeks.
>>
>> On May 9, 2006, at 7:42 AM, Rami Alkhalyleh wrote:
>>
>>> Hi All,
>>>
>>> I used laszlo to view the data from the database, so when the data
>>> in the database updated how can update the viewable data at the
>>> laszlo file without refresh the page?
>>>
>>> thanks in advance
>>>
>>>
>>> Regards
>>> Rami
>>> _______________________________________________
>>> Laszlo-user mailing list
>>> [email protected]
>>> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user