Skip to main content

Posts

Showing posts from February, 2019

NodeJs - The server side JavaScript engine

In this article, I'm going to give an introduction to NodeJs. Node.js is a server-side platform built on V8 Engine. It was developed by Ryan Dahl in 2009. Node.js is an open source, a cross-platform runtime environment for developing server-side and networking applications. Node.js applications are written in JavaScript and can be run within the Node.js runtime on OS X, Microsoft Windows, and Linux. Features of Node.js Following are some of the important features that make Node.js the first priority of software architects. Asynchronous and Event Driven  − All APIs in the Node.js library are asynchronous, ie non-blocking. This essentially means that Node.js based servers never wait for the API to return data. The server moves to the next API after calling it, and the Events of Node.js notification mechanism helps the server get a response from the previous API call. Very Fast  − The Node.js library is built on Google Chrome's V8 JavaScript engine, so code execu...

Java Script - The Most Misunderstood Language in the World

JavaScript typing utilities, like Flow and TypeScript, have become popular in JavaScript apps of all sizes. As I mentioned in our  Script & Style Show typing podcast , typing is a great way to implicitly implement documentation and validation. Flow isn't always easy to perfect, however, and  Object.values  was a pain point for me. When using Flow,  Object.values  could trigger the following error: Cannot call Object.values(…).map with function bound to callbackfn because property {prop} is missing in mixed [1] in the first argument. The reason for this error is that  Object.values()  could return any value type. One way to get past this annoyance is to use the following: .. . ( Object.values ( value1 ) : any ) Using an  any  type is never ideal but providing a type with  Object.values  will help satisfy Flow. In the end, it does make sense that  Object.values  isn't trusted, because anything could...