Thursday, 14 July 2016

Object-Oriented JavaScript


Javascript-Logo-Frontend-Labs.png

Objects are used to represent the real world entities in our code like bank account, books, person, etc, by storing all relevant information in one place, i.e, an object. We have two ways to create objects in javascript, i.e., 'Literal notation' and 'Constructor functions notation'.

You must be thinking what are they and what is the difference between them? Right! Let's start with the object definition :

Constructor functions notation

Literal Notation

Read more about Object-Oriented JavaScript visit Findnerd.

Friday, 1 July 2016

Socket.IO using node.js and express

85f2b927bffe54c0d3c00cbfa1d9a1e3915d086e_main_hero_image.jpg

In node.js Socket.io enables real time event based communication. What that means is that we can communicate to the server from the client and in return the server can talk back to the client. Socket.IO uses WebSockets when it can and has fail overs if the browser does not support it.
Step by Step implementation of socket.io using node.js.

Step 1: In first step I am assuming that you have already created the project using express.js and node.js. If you didn't do that then please read my previous blog and create the project. After that just install socket.io module.

Step 2: Now go to app.js there we will require socket.io and connect socket with our server.

Read more about Socket.IO using node.js and express visit Findnerd.