Posts Tagged ‘nodejs’

Javascript as a Full Stack Language

Thursday, April 2nd, 2020

Javascript is a scripting language. JavaScript is interpreted and sometimes compiled at run time. It runs natively on your browser which makes it completely cross platform and hardware agnostic.

Javascript is the de facto language used to code the front end interface for web apps. There are many Javascript frameworks which do exactly that. Moreover JavaScript can also be run in a server environment using NodeJs.

JavaScript runs on the client side of the web, which can be used to design / program how the web pages behave on the occurrence of an event. JavaScript is an easy to learn and also powerful scripting language, widely used for controlling web page behavior.

Generally, JavaScript frameworks will do the heavy lifting when it comes to binding your data to your mark-up. You have a model of data, and you have some mark-up to which you’d like to bind it. You can achieve this in vanilla JavaScript yourself if you wish, but a framework such as Angular or React will cater for it most of the time.

With a framework, you’re just doing things faster. You can use all these battle-tested libraries. They’ve been checked for security, they’re in use on a thousand of different websites, they’ve been checked for performance, edge case bugs, so you don’t have to find those bugs over and over again because they’re already been found and fixed.

Another common application for JavaScript is as a (Web) server side scripting language. A JavaScript web server would expose host objects representing a HTTP request and response objects, which could then be manipulated by a JavaScript program to dynamically generate web pages. Node.js is a popular example of this.

Node.js is a platform built on Chrome’s JavaScript run time for easily building fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

In the database side of application development, Javascript also has an offering. Mongo DB has rapidly grown to become a popular database for web applications and is a perfect fit for Node.JS applications, letting you write Javascript for the client, backend and database layer. Its schemaless nature is a better match to our constantly evolving data structures in web applications, and the integrated support for location queries is a bonus that’s hard to ignore.