3

I'm developing a sort of scrum board web app but I'm not sure how to approach the aspect if it changing and updating for users that are looking at the same page.

Scenario: We have a table with 3 columns (To Do; In Progress; Done) populated with elements inside. If I drag one from To Do to In Progress (jQuery/AJAX); what type of approach could I use to have it update on all users viewing that scrum board (they would see Object 1 move from Column 1 to 2)

Theory: Right now I'm thinking of pinging the database every 15 seconds or so (I know that there won't be a large amount of users so it won't strain the database) and redraw accordingly... but I don't feel it's proper.

An example would be Google Docs shared Excel sheets.

Is there a way to create a delegate in PHP to accomplish this? If not, could you point me in the right direction? (Perhaps learning another language for this aspect?)

Jish
  • 207
  • 1
  • 8

2 Answers2

6

You may want to look into WebSockets. In particular, if you're open to new technologies, I know that the Socket.io library for Node.js is really good for realtime web interfaces. You won't need to do anything with polling, it is all event-based, and your data should change immediately. It also has some really nice tutorials available across the web:

Community
  • 1
  • 1
Ryan Endacott
  • 8,772
  • 4
  • 27
  • 39
  • 1
    Accepting this answer as of now. Thorough links and from first glance on everything seems like it opens up the potential I'm looking for... Will adjust my answer if needed. Thank you for your quick and informed response. – Jish Jun 26 '13 at 14:29
  • You're welcome! Happy implementing! It's a fun tech to work with, and it's really easy to get up and running. – Ryan Endacott Jun 26 '13 at 14:30
5

There's a (relatively) new JavaScript framework called Meteor that does this. Here's a good StackOverflow question about how it differs from node.js.

Community
  • 1
  • 1
austin
  • 5,816
  • 2
  • 32
  • 40