10 things you didn't know JavaScript could do

You can do all kinds of crazy stuff with JavaScript. Developer Sebastian Golasch show us what's possible today: gamepad-controlled 3D games, Flash on the iPad, running a webserver, and more...

JavaScript has gone a long way since its birth in 1995. A hard way for sure, full of misunderstanding, misuse and ignorance. But times have changed, since the last five years JavaScript has been gaining more and more attention. With more attention, more developers are actually using JavaScript, using it for many different purposes and enjoying its beauty. Classical "Ugly Duckling" story, if you ask me.
In the following article, we will discover 10 use cases for JavaScript that are different from the common "in browser" ones, you're used to.

01. It's time for a hangout

Do you remember the 80s vision of Facetime-like video communication?
It only took 20 years before this has gone mainstream due to nearly everywhere available broadband internet and the heavy use of a little software called Skype.
With the capabilities of Adobe's Flash and Google's attempt to build a social network, we already have the capabilities of video communication in our browser. Wouldn't it be cool to have those abilities without using a third-party plug-in such as Flash?
Fortunately, the browser vendors thought the same and implemented the "getUserMedia" API into their software. This was a first step in order to access devices like cameras or microphones directly from your browser.
Using Node.js as a server in the back of such an application, it's amazingly easy to transport the video signal over the air to one or more clients. Unluckily, by the time of writing this, only Chrome and Opera are supporting the API, but others will catch up fast.
The cleaner approach for a two way communication is a Chrome only thing at the moment, called WebRTC. Because of WebRTC, clients are enabled to open peer to peer communication channels, directly connecting client with client.

For the sake of fun, check out Sindre SorhusPhoto Boothimplementation done in 121 bytes!

Comments