From: Clemens E. <lin...@we...> - 2003-10-16 20:58:44
|
Hi there! > I've spend serveral hours looking into the push/pull > (pushlet) solution and must say that I have managed to > get a working prototype of the server-side push > feature. Wow, great! > I think it's possible that dynapi will be able to > support both Push and/or Pull functionality. It's > still a far way off and requires a lot of time to > think through the design of the system (only if I had > a full time dynapi job :) > > In short I think it will be as simple as adding an > event listener to a dynobject: > > io.addEventListener({ > onserver_someventhere : function(e,s) { > // some code here > }, > onserver_anothereventhere : function(e,s) { > // some code here > } > }); > > With this technology we could use ioelement with any > webserver or server-side language to implement the > push and/or pull requests > > With the push method the client is notified whenever > the server invokes or raises an event: > > ws_invokeEvent('someeventhere') > ... > ws_invokeEvent('anothereventhere') To implement the whole thing with EvenListeners is a good idea in my eyes. It would keep the whole thing simple and tell the client that something happend and the client can act is needed. > The Push/Pull technique should work with all supported > web browsers. The API will handle all the technical > details so the user only have to listen in for an > event from the server. > > What do you think? I dont know if you´re asking me or someone different. However, I think its really great! This would enable JS-developers to ship arround one of the biggest problems when using javascript for interactive-multiuser-stuff: The bidirectional communication. Of couse, the current implementation isnt really bidirectional, because it forces the client to act, when the server tells the client to do something, but it keeps things simple and allows the js-programmer to do the same thing like with "real" bidirectional communication. Really great, dynapi rocks so much! lg Clemens PS: Is there a efficient way to add html to a dynlayer, instead of: strold = dynLayer.getHTML(); dynLayer.setHTML(strold+strnew); PS2: How hard would it eventuelle be to port Dynapi-3 to Konqueror3? How long did it take to port dynapi to opera7? However I use Mozzi, I think its more important to support Konqueror than NS4, because the number us NS4-users decreases every day. With Safari + Konqueror many users will use the KHTML-engine althought its not my taste... |