What is OOJS ?

OOJS is a programming paradigm not any tool which is around from the 70’s. OOJS is centered around objects rather than functions. There are many languages which are well known Object oriented languages like C#, Java, Python, Javascript. Javascript is a bit controversial.

There are 4…

There are 4 ways to create objects in javascript:

  1. Object Literal
  2. Object.create()
  3. Using constructor pattern
  4. ES6 Classes

Object Literal

// Most common way of creating object
let object = {}


// Make sure you add {} or pass null in method.
let object = Object.create({})
object.name = 'Shailender';

Using constructor pattern

function makeObj(name) {
this.name = name;
let object = new makeObj('Shailender');

ES6 Classes

class Obj {
this.name = name;
let object = new Obj('Shailender');

Some time developers needs instant server to host JSON. So let’s make on such server.

Step1> npm install -g json-server

Step2> mkdir my-manager && cd my-manager

Step3> Create a server.json file.

Step4> Paste JSON in that server.json file.

Mine server.json file have this code

{ “managers”: [ { “id”: 1, “first_name”: “Shailender”, “last_name”: “Singh”, “phone”: “219–839–2819” } ] }

Step5> json-server server.json

Browse http://localhost:3000/managers


Happy Now :)

Angular2 is a quite popular web framework now days. We are seeing that the population of JS libraries are growing day by day. The community of Angular is very helpful. We find many good results in single search.

So I also decided to contribute this great community. Here I am making a simple Angular2-Redux Integration app.

So a beginner can understand easily how we can integrate these two revolutionary technologies together.

you can visit this link for more information. Here I have written whole code. Any suggestion or PULL Requests are welcomed.

Shailender Singh

I’m a Javascript Developer and Architect specializing in Web technologies. Love to contribute in Open Source, AI and Machine Learning.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store