Posts

Showing posts from April, 2017

Introduction to Angular JS

Image
Hello! I hope you had a good day and an awesome week. 😊 In this post, I thought of giving you an idea what AngularJS is. Before getting to know what AngularJS is, you need to know what a single page application is.  A single page application(SPA) is a web application or a web site which loads only a single web page and dynamically update that page as per user’s interaction. The goal of SPAs is to provide a user experience similar to that of a desktop application. SPAs use AJAX and HTML to create responsive web pages without constant page reloads. This means most of the work is done in the client side or front-end. Client having a dynamic communication with the server is a must in SPAs. Let’s see some features of SPAs,            Appropriate content is dynamically added to the webpage.            Use of AJAX for client server communication.            Use of sockets for bidirec...

Different Streams in Node.js

Image
Hello! I hope you had a good day and an awesome week. 😊 In this post, I thought talking about different types of streams in Node.js. A stream as defined in computer science is a sequence of data elements (usually bytes, but not necessarily) made available over time which can be accessed sequentially. In Node.js, there are 4 types of streams namely,           Readable             -   stream which is used to read data           Writable                -   stream which is used to write data           Duplex                 -   stream which is used to both read and write data           Transform            -   stream which can modify or tra...

Setting up the Environment with Node.js

Image
Hello! I hope you had a good day and an awesome week. 😊 As I promised on the previous post, in this one we’ll do some coding using Node.js. But before we jump into coding, we need to set up a proper environment. Setting up the Environment Before working with Node.js, it should be installed to your machine. So, to install, you can follow the link given below, https://nodejs.org/en/download/ There, select the setup according to the operating system of your machine. When installing go with the default options. After the installation, open command prompt and type ‘node --version’ as below, If the version is shown, Node.js is successfully installed to your machine. If not, it should be reinstalled. Let’s Code Let’s start small. First, we’ll see how to print something in the command prompt. A JavaScript file (a file with .js extension) should be created. Let’s call it ‘Hello.js’. This can be done using a simple text editor or using and IDE (Integra...

Introduction to Node.js

Image
Hello! I hope you had a good day and an awesome week. 😊 In this post, I’ll give a brief introduction to Node.js which is currently in trend. First of all, what is node.js? Node.js is an open source, cross platform run-time environment for server-side and networking applications. It was developed by Ryan Dahl. It is built on V8 engine which the JavaScript engine of Google Chrome. Its initial release was supported only Mac OSX and Linux. Listed below are some features of Node.js which makes it a better choice for web development, Non-blocking I/O(input/output) - Node.js operates on non-blocking I/O model, which means, the main thread (as node.js is single threaded) will not wait for I/O operations to get complete, instead it will continue to execute after calling an API. Asynchronous - Node.js is asynchronous because of its non-blocking I/O nature. This happens because of the main thread not waiting for the completion of I/O operations. Event-Driven -  Node.js ha...

JavaScript Classes

Image
Hello! I hope you had a good day and an awesome week. 😊 In this post, I thought of talking about JavaScript classes. Before we talk about JavaScript classes, we need to know what JavaScript is. I know you all know what that is, but just in case if you have forgotten I’ll give you a brief introduction. JavaScript is a scripting language that can be used to client-side processing and can be inserted into HTML pages. Some of its major features are, ·          Open-source ·          Single threaded ·          Non-blocking I/O ·          Asynchronous ·          Dynamically typed ·          Multi-paradigm ·          Event driven JavaScript doesn’t have classes. It is a class-less languag...