Could someone guide me on how web based online diagramming software's work? I would really appreciate if you could point me to example resources to get some knowledge on this. 

Following are the some of the samples web based online tools that iIhave been trying to studying:

<http://www.creatly.com>  

<http://smoot.sourceforge.net/smoot/> 

This second example has source code for the implementation as well. But if any of you have prior experience on this subject, could you share it with us?