Object-Oriented Programming Paradigm

The terms objects and oriented in something like the modern sense of object-oriented programming seem to make their first appearance at MIT in the late 1950s and early 1960s. Objects as a formal concept in programming were introduced in the 1960s in Simula 67, a programming language designed for discrete event simulation, created by Ole-Johan Dahl and Kristen Nygaard of the Norwegian computing Center in Oslo. Object-oriented programming developed as the dominant programming methodology in the early and mid 1990s when programming languages supporting the techniques became widely available

Object-oriented programming (OOP) is a programming paradigm that represents concepts as objects that have data fields and associated procedures known as methods. Objects, which are usually instances of classes, are used to interact with one another to design applications and programs.

Here each object is capable of receiving messages, processing data, and sending messages to other objects. Each object can be viewed as an independent machine with a distinct role or responsibility. The methods on these objects are closely associated with the object.

The object-oriented approach encourages the programmer to place data where where it is not directly accessible by the rest of the program. Instead, the data is accessed by calling specially written functions, commonly called methods, which are bundled in with the data. The programming construct that combines data with a set of methods for accessing and managing those data is called an object.

Fundamental concepts and features :

1) Dynamic dispatch – When a method is invoked on an object, the object itself determines what code gets executed by looking up the method at run time in a table associated with the object. This feature distinguishes an object from an abstract data type (or module), which has a fixed (static) implementation of the operations for all instances. It is a programming methodology that gives modular component development while at the same time being very efficient.

2) Encapsulation – Encapsulation means that the internal representation of an object is generally hidden from view outside of the object’s definition. Typically, only the object’s own methods can directly inspect or manipulate its fields. Hiding the internals of the object protects its integrity by preventing users from setting the internal data of the component into an invalid or inconsistent state. A benefit of encapsulation is that it can reduce system complexity, and thus increases robustness, by allowing the developer to limit the inter-dependencies between software components.

3) Inheritance – It is a way to reuse code of existing objects, or to establish a subtype from an existing object, or both, depending upon programming language support.

4) Decoupling – Decoupling refers to careful controls that separate code modules from particular use cases, which increases code re-usability. A common use of decoupling in OOP is to polymorphically decouple the encapsulation.

5) Abstraction – Abstraction captures only those details about an object that are relevant to the current perspective. Abstraction can apply to control or to data: Control abstraction is the abstraction of actions while data abstraction is that of data structures.

Other OOP concepts include – Classes, instances, methods etc.

OOP language

1) Pure OO languages, because everything in them is treated consistently as an object, from primitives such as characters and punctuation, all the way up to whole classes, prototypes, blocks, modules, etc. They were designed specifically to facilitate, even enforce, OO methods. Examples: Eiffle, Emerald, Ruby, Scala, Smaaltalk.

2) Languages designed mainly for OO programming, but with some procedural elements. Examples: C++, JAVA, C#, VB.NET, Python.

3) Languages that are historically procedural languages, but have been extended with some OO features. Examples: Visual Basic,Fortran, Perl, COBOL, PHP.

4) Languages with most of the features of objects (classes, methods, inheritance, reusability), but in a distinctly original form. Examples: Oberon and Common Lisp.

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: