TechWire

Tag - javascript

Useful JS and CSS libraries

Javascript හා CSS යොදාගෙන මේ වෙනකොට ලෝකයේ ගොඩක් libraries හදල තියෙනවා. මේ libraries නිර්මාණය කරලා තියෙන්නෙ web developersලගේ හා designersලගේ පහසුවට. මේවා භාවිත කරලා ගොඩක් ලේසියෙන් හා ඉක්මණින් අපිට අවශ්‍ය webpage එකක් dynamic හා interactive විදියට නිර්මාණය කර ගන්න පුළුවන්. ඒ දේවල් කරන්න අවශ්‍යවෙයි කියල හිතෙන libraries ගැන පොඩි විස්තරයක් තමයි මේ article එකෙන් දෙන්නෙ.

Read More

The Javascript Revolution – Part I

Scott Hanselman, the popular blogger from Microsoft, asks: if you had to start over, what technologies would you learn in 2014? It’s both an interesting and a timely question, when the software world is overflowing with new languages, programming paradigms, platforms and frameworks. Which ones to choose? Not only the newcomers to the industry, but the veterans as well seem to be in doubt about what language or technology he should master next.

Hanselman has an interesting answer to the question:

Learn one language you can build large systems with AND also learn Javascript.

That one language might be Ruby, Python, C#, Java, Scala or anything from the myriad of other choices available. That choice may depend on where you work at and your personal preferences. But Hanselman also goes on to declare that learning Javascript a must for everybody. But let us stop for a moment and ponder: why Javascript?

A decade back, Javascript was only a scripting language used to add fancy animations and validate inputs in websites. It gained popularity since it ran in the browser (as opposed to in the server) and almost all web browsers supported it. But that’s all Javascript was good for back then.

Then in 2007, Jeff Atwood, co-founder of Stack Overflow, proposed what was to be known as ‘Atwood’s Law‘:

Any application that can be written in Javascript, will eventually be written in Javascript.

It was a pretty radical statement, even in 2007.

Fast forward to 2014, we see Javascript everywhere. From client-side and server-side web apps to mobile and desktop apps, Javascript is being used almost everywhere. Never has any other programming language been able to become omnipresent to this extent.

Though Javascript started as a client-side language for webapps, it has now conquered the server-side as well with Node.js. Node is to Javascript what’s Rails is to Ruby. Many tech giants like Paypal, LinkedIn and Yahoo have begun to ditch their previous (and successful) web frameworks in favor of Node.

Nodejs

Projects like node-webkit have enabled developers to write desktop apps in Javascript. The effort is still in its early stages, but the community is ever more enthusiastic and are actively working to see a light in this horizon. As for mobile apps, a considerably large percentage of apps for Android and iOS are now being written using Phonegap. Ubuntu is pushing the developers to write more and more native apps in HTML5 that would work on both desktop and mobile devices.

It has made its way to hardware programming as well. Tessel is an upcoming microcontroller (similar to Arduino and Raspberry Pi) that runs on Javascript. There are other projects like Espruino that are already in the market.

One bitter point of Javascript used to be its low performance record. It was okay for short bursts of calculations and event handling, but when it came to the nitty-gritty of complex problems Javascript always lagged behind. But the tide has turned with the advent of asm.js, an optimized subset of Javascript, which can be generated by transpiling C or C++ code. This has paved way to create FPS games, database engines, and even video converters that would run in your web browser!

Keep calm and learn Javascript

Has Javascript become the one language to rule them all? We wouldn’t know yet. In the coming weeks, we’ll explore how and why Javascript has become successful in each of these domains in detail. Stay tuned!