Pages

Saturday, March 23, 2013

Is JavaScript the Future of Programming?

Is-javascript-the-future-of-programming--1fa74a1dff

JavaScript is the programming language that makes a website interactive. Slideshows, advertising pop-ups and Google's autocomplete feature are all examples of JavaScript at work. It was first created by Brendan Eich at Netscape in 1995 — nicknamed Mocha during development, released in beta as LiveScript and ultimately named JavaScript in order to piggyback on the popularity of Java (another programming language) for marketing reasons.
At first, developers didn't take JavaScript seriously, because it wasn't seen as a serious development language like Java, Ruby or Python, which are server-side languages. JavaScript was the frosting on the cake, only responsible for user experience. But the language continues to become more prolific, often recommended as a first language to learn for beginners. If you use JavaScript with a framework called Node.js, you can now actually use JavaScript as a server-side language.

Why JavaScript is Widely Used

JavaScript is the only client-side scripting language. Therefore, it's being used on nearly every website you see on the web. This is one of the reasons why Codeacademy offers JavaScript as the first language for users to learn. Unlike the classic languages that might be taught in a computer science department at a university, JavaScript will definitely be used on the job if someone begins working as a web developer.
Also, since JavaScript Runs in a browser, you don't need to download software to use it. All you need is a text editor (such as TextWrangler or TextEdit) and a browser. This is a clear benefit for novice programmers.
Despite its utility, programmers don't consider JavaScript the most refined of languages — it looks messy. CoffeeScript is an attempt to change this — it makes JavaScript look more like Ruby or Python by getting rid of curly braces and semicolons and adding white space and indents. These changes make code easier to read, whether you're returning to old code and trying to remember what it does, or working on a project with another programmer.

What JavaScript Can Do

First, like we said earlier, JavaScript can be used to build an entire site if used with Node.js and MongoDB (a database). Node.js is asynchronous, which makes it highly scalable and a great fit for all the big data out there. For example, one developer found sending 600 emails with Node.js takes three seconds, and would take 30 seconds with PHP. MongoDB is a document-oriented database built for scalability but still very functional to offer the best of both worlds.
JavaScript is now one of the preferred ways of developing applications for Windows 8's new UI. It's the top language used on Github. Lots of sites are built with Node, including Klout, Storify and Yammer. Being able to use the same language on the front end and the back end makes life easier for development teams.
On its own, JavaScript is responsible for animations like pop-up windows and with AJAX, those websites that reveal new data without a page refresh. An example of AJAX in action is here — see how when you click on an image, the URL changes and the display changes without the entire page refreshing. AJAX stands for Asynchronous JavaScript And Xml, so it can't be used apart from JavaScript.

Is JavaScript the Language of the Future?

HTML5 was said to be the end of Flash, but if HTML5 is the organizational tool, it's JavaScript that's taking the place of the Flash element. Those videos or other visuals that used to be served in a plugin are now served with JavaScript, which runs in your browser, so you don't have to download a third-party plugin to see it, and developers know everyone is getting the same experience. Since JavaScript started as the language that looked like Java but wasn't capable of the same tasks, it's a bit of a surprise to see anyone betting on it to get still bigger. It's also not the most eloquent — programmers say that Ruby or Python is written the way you'd expect it to be, so it's more natural. But a language is only as good as the tools that go with it, and thanks to additions like Node.js, jQuery (a library), JSON (JavaScript Object Notation) and MongoDB, JavaScript has a bright future.



No comments:

Post a Comment