loading...

Why JavaScript is the best programming language.

15th of August 2019 - by Andrea Mazzilli.

JavaScript used to send forms

Before we start.

In this article I will explain why JavaScript is so important and why for many of us it"s the best language you can learn nowadays. In the last years JavaScript has been criticized by many developers. Indeed JavaScript doesn"t work as many other popular languages. It is not a secret that this language shows some weird behaviours.

JavaScript is the language of the web.

Who doesn't use a web browser nowadays? When you check your e-mails or your social networks, when you ask Google or when you watch Netflix, there is always a JavaScript program running on your browser which makes all these things possible. We have to go back in the 1993 when Netscape introduced this language in their browser for the very first time. Back in those days the web was able to deliver static content, with JavaScript the goal was to make this content interactive. Now in 2019 JavaScript is still the language which runs every single website, the only difference is that our computers are faster, our internet connections are faster and JavaScript has evolved accordingly.

JavaScript is both client-side and server-side language.

A really important milestone in the evolution of JavaScript was to become a server language. In 2009 NodeJS was born and because of that, JavaScript made it to the other side of the bridge. For the first time JavaScript was able to escape from the browser"s sandbox and reach the core of the operative systems like Linux Windows and OsX. But what does this exactly mean? When JavaScript runs in a website it has many restrictions, it runs in a sandbox, a website will never be able to use JavaScript to read a file on your computer or to send an email. But when you run JavaScript on a server that"s another story. Using NodeJS JavaScript is able to access all the services that were restricted to other languages like Php Java and more.

JavaScript community is huge.

When NodeJs arrived, it brought Npm. Npm stands for Node Package Manager, this tool gives access to an incredible amount of free resources. Developers all over the world started to write and share their JavaScript code to solve any kind of issue or to speed up the development of JavaScript applications. Npm is now the largest free development community on the web. On an average Tuesday - npm's busiest day - users download more than 1.3 billion packages of open source JavaScript ( click here for more info ).

JavaScript has tons of Frameworks and Libraries.

Huge companies such as Google and Facebook saw the opportunities in JavaScript and they reacted developing Frameworks and Libraries that are now used by the experts of the modern web development. Just to mention a few, AngularJS and Gulp ( by Google ) ReactJS ( by Facebook ) literally lead the web app market development. These technologies are free and they pushed JavaScript to the next level by giving strong modular approach that help the maintainability of the code and speed up the development of the web. Just to mention a few: Sass, Less, Gulp, Grunt, ExpressJS, ReactJS, AngularJS, VueJS, Redux, RxJS ... and the list goes on.

JavaScript and Mobile Apps.

Since the first iPhone app was published on the App Store, every developer wanted to jump into that market. Unfortunatelly web developers weren"t skilled on Objective-C, but the web community is unstoppable and they quickly found a workaround. The Cordova framework took advantage of the WebView, using it to render HTML and run JavaScript into a mobile app. This came with some limitations in performance and UX. Lately Facebook evolved ReactJS into React Native in order to allow React developers to create higher performant real native apps without the WebView workaround. React Native community is growing up and so is the number of apps using this technology.

JavaScript and Desktop Apps.

It seems that JavaScript spreading is unstoppable. ElectronJS is an amazing free tool which allows web developers to embed their web apps into a desktop application container. This means that you can actually create real Desktop applications that can run on OsX Windows and Linux with all the benefits of a desktop application: more security, working offline and the topbar menu, typical of a desktop application.

JavaScript is faster then you think.

Javascript is mostly used in the browser as "The front-end language", however he cannot work alone. JavaScript needs to interact with the DOM ( document object model ) that is actually rendering the web page ( HTML ). Because the DOM is way slower than JavaScript, he creates a bottle neck that slows down the interaction resulting intoa bad user experience ( UX ). When JavaScript is executed in NodeJS it doesn"t have to talk with the DOM, it can execute operations at lightspeed, and can compete with the fastest programming languages out there.

JavaScript is easy to learn.

JavaScript is the world"s most popular language, because of that the number of JavaScript developers grew up dramatically in the last 10 years. With such many developers it is inevitable to also have a lot of online free resources and with many resources learning a new language become easier. Javascript automatically assigns memory when creating objects and when a resource is no more needed the Garbage Collector removes it from the memory automatically.

JavaScript is used in many software.

During the years JavaScript and due to his popularity JavaScript was included into other popular softwares as the main or secondary scripting language. For example After Effects uses it as the main scripting language which allows to do almost everything programatically. In Unity is the second language and he is probably there only for lazy developers who don't wanna learn C-Sharp.