Saturday 18 January 2014

Javascript : Introducing Object oriented Javascript

OOPS INTRODUCTION  :

JavaScript is not a object-oriented programming language but it has
strong capabilities of oops,even people debate have taken place
due to the differences in object-oriented JavaScript compared to
other languages.

User can create classes and object and can use in their JavaScript code.





Class

Defines the characteristics of the Object and how object should behave.

Object

An Instance of a Class and help to access method of class.

Property

An Object characteristic, such as color,size,alignment.

Method

It defines Activity and behaviour, such as walk.

Constructor

A method called at the moment of instantiation.

Inheritance

A Class can inherit characteristics from another Class i.e from base class.

Encapsulation

A Class defines only the characteristics of the Object . It provide security to code .

Abstraction

The conjunction of complex inheritance, methods, properties of an Object must be able to simulate a reality model.

Polymorphism

Different Classes might define the same method or property.
Having same look but acted differently on different places

NOTE :  Javascript is a prototype of  object oriented language but it a bit confusing for
              programmer because javascript functions used as class

No comments:

Post a Comment