views:

25

answers:

2

I need a playlist that's editable from multiple computers. It can be <table> or <ol> but you must be able to drag rows around. This gets sent to the server, which pushes it down to everybody, so I need updates without reloading the page.

I never worked with JavaScript before, but it all seems doable with http://jqueryui.com. Alternatives?

(the server seems the easier part, so I'll decide that depending on the widget, but I like Python)

A: 

Yes, you would use javascript to manage the table reordering, and ajax to query for the reordering. The interesting question is whether you want to poll or do server side push. ;)

hvgotcodes
I mentioned push, and looked into Comet servers, but there's a lot of protocols and finding one supported by a suitable widget is difficult. So I'll take polling answers as well!
Tobias
A: 

You cannot push data to the client. Each webpage will have to poll the server for changes through XmlHttpRequest and update its contents with javaScript. You will have to handle all racing conditions on the server though.

If you haven't worked with javaScript before, your best bet would be to use jQuery and jQueryUI for everything, since it's easy to learn, and can easily achieve what you need.

Read the examples for: http://api.jquery.com/jQuery.ajax/

ArtBIT
@Artbit you can push to the client. google server side push...
hvgotcodes
@hvgotcodes if you are talking about Comet programming (Long polling), that's simply client asking for data and waiting for the longest time possible for the server to send any updates, hence it's still polling. Once the page is loaded, there is no way for the server to send any data to the client, unless the client asks for it.
ArtBIT
Comet is a generic term. Nitpicking which implementation can be called push is very rarely helpful.
Tobias
@Tobias exactly, but voting down on a answer that tries to help isn't helpful either.
ArtBIT