To read all comments associated with this story, please click here.
I know having raw TCP support in HTML isn't a good idea.
I do like the way Flash gets around it: it makes a request to the target on port 587 before initiating the TCP socket, and expects an XML security certificate permitting the connection. That means you have to authorise it on the server-side, but aside from that it doesn't actually interfere with the stream. So if you wanted to make e.g. a web-based IRC client, you could use a standard IRCd and no websocket proxy, just run an authenticating script on that port to demonstrate you consent to the connections.
Anyways, raw TCP is a legitimate feature that Flash has over HTML, and Flash is still worth considering in certain situations.
Flex is a framework, built on to of Actionscript, and so therefore, Actionscript is the language. Actionscipt can be used to write Flex apps, but then it can also be used to write pretty much anything you care to against the Flash runtime (so long as what you "want" is supported".)
I've made some pretty fancy BlazeDS/Flex apps myself, to demonstrate for example that browser gan be notified real time from JMS queue. Had invisible Flash app on otherwise regular HTML page and when message arrived into JMS queue on the server targeting specific client/browser, Flash called javascript function that updated the HTML DOM leaving user with impression that he has realtime and live HTML page.
That however was just a demo and usable ONLY in intranet. So I would not deploy such an app into uncontrolled environment like public internet. First reason would be limited server resources, as every browser would have live TCP connection back to the server.
Such a functionality in public apps however should be implemented with AJAX or some other means to poll the server for updates. There might be more elegant ways but live TCP conection is not one of them. Possible but not feasable.
Edited 2011-11-09 13:04 UTC





Member since:
2010-06-02
I'm actually kinda disappointed by this.. since there's no TCP socket support in HTML5 (WebSockets require a wrapping proxy), i built a version of my app in flash, and it worked wonderfully, was fast and reliable. The Flex UI widgets didn't seem to work too well on an Android device, though, and i heard they were making mobile/touch-friendly versions of them, but i suppose this means it's all deprecated in favour of AIR. Shame, i would've liked to have a single client running on desktop browsers and phone browsers...
Flex is a decent enough language to deal with, although this was my first //really proprietary// system and documentation/googleability was incredibly low compared to ordinary c/c++/php/whatever for any common framework.