30 minutes to make a collaborative paint with Play2, Canvas and WebSocket
blog.greweb.fr
blog.greweb.fr
I've never worked with Canvas before but was surprised/pleased to see how it feels a lot like working with Java2D when rendering a 2D context (strokes, lines, joins, etc.) -- I felt the same about WebSockets, definitely had a "It is that easy to use them? Nice!"
Scala on the otherhand... I'll happily concede that I am possibly a lost-cause when it comes to Scala (14 years of Java will do that do you, and C/C++ before that). When you went to that Hub impl on the server side, a small tear rolled down my cheek caused by brain-pain trying to feel my way through that Scala code (nothing wrong with your code, I just don't like the way Scala looks/feels).
Thanks again for putting this all together and sharing.
I've used Play1 quite a bit and would hate to lose it as a tool.
The idea behind Play2 is to have a framework written in Scala (the core) but providing a full API for both Scala and Java languages. Hence, users can choose their preferred language to write web applications.