Tuesday, February 8, 2011

What's the Difference? Object Oriented Languages (Project 6)

Project 6 - Object oriented languages

Object Oriented Language Survey
This blog posting is designed to provide a very high level comparison of the most popular object oriented languages. In order to understand the basics of these languages and how they differ from each other, it is necessary to understand what an object oriented language is.

Aspects of an Object Oriented Language
At the heart of any object oriented programming language is the concept of the Object. An object has a state, an intrinsic quality of the object, and behavior, which is the way in which the object interacts with all that is connected to it. An object stores its state into fields, which act as variables or placeholders for the information that describes the state of an object. The behavior of a programming is referred to as its method or methods. A method operates on an object’s state using some type of predetermined algorithm.
An object oriented language is a collection of objects and their interrelationships. By encapsulating code into object instead of a stream of code, the following advantages are gained:
        Modularity, which is the ability to a program to be created from independent objects that can be reused within an application.
        Information Embedding - Data is maintained within the object, creating higher security by not exposing raw data.
        Code Recycle-ability - Code can be reused between projects
        Code Substitution and Debugging - Objects, in the process of debugging and troubleshooting, can be substituted easily by other well tested objects of code.

Object Oriented Programs share the following fundamental aspects: Class; Inheritance; Interface; and Package(s). A class is a common schema of information, with an instance being just that, a singular example of a class of object that is described by a schema. Inheritance can be seen when objects can share attributes in a hierarchical fashion, allowing common attributes of a class of objects to be shared, flowing in a parent to many children form. An interface is simply a collection of methods for an object that describes how the object will interact with aspects external to the object. A package is a collection of related classes and interfaces, provided as a means of organizing complex objects.

C++
C++ is the object oriented language that most closely resembles the procedural language C. C++ shares much of the syntax of C. One of the inventors of C++ refers to C++ as “C with classes”, a statement that reflect a shared heratage with one of the most popular procedural languages. C++ is not trademarked, which has allowed the language to flourish without the encumbrance of a language that is laden with licensing issues. C++ has a very flexible structure, allowing types of data to be converted to different types of data within the application.

JAVA
JAVA is an object oriented language developed by Sun Microsystems to be a language that would run on multiple platforms without the need to recompile the code for each specific hardware type. A JAVA application runs in a JAVA run-time environment, allowing JAVA code to be compiled and run abstracted from the hardware beneath. JAVA is a highly structured language with a rich set of tools available to validate the data types in use, manage memory, and dynamically debug code before and during the compilation process.

Python
Python is a highly human readable object oriented language that is licensed as open source, providing a free licensing model even for commercial software. Python lends itself to being highly modular, with a large open source library and a large set of syntax shared with C/C++ that allows for an easier learning curve for experience programmers.

Object-C
Object-C is another object oriented language that was designed to resemble the syntax of the C programming language. It was licensed to NeXT Computers, which was purchased by Apple Computers, allowing it to become the favored object oriented platform for Apple devices (OS X and IOS, namely). Object-C is designed to be a lean interpretation of the C programming language, structured as an object oriented language.

Delphi
Delphi is the grandchild of Borland Software’s Turbo Pascal (so old that it is one of the last programming languages I studies in the past), in the form of an object oriented language. Delphi is a fast compiling, highly structured language that has a very readable format structure. Due to the long history behind this language and ease of understanding, it is a popular language.

Ruby
Ruby is another open source language that is designed around best of breed object oriented languages with a very natural syntax. It has become especially popular because of the Ruby on Rails, which is a free web development environment that creates a framework for developing web platforms with minimal programming effort. Ruby is a high functioning object oriented language that is someone unique in supporting only single inheritance, which creates a simplicity in defining the relationship between objects in its code.

Comparison and Contrast

The following table provides a very brief overview comparing these popular object oriented programming languages.

Language
Overview
Similarities
Differences
JAVA
The most popular object oriented language with as few platform dependencies possible
class-based, strong resemblance to C programming libraries
Multi-threaded language the relies on the JAVA run-time environment to interact with the underlying hardware
C++
An extension of the C Programming language in an Object Oriented format
Syntax so similar to C programming that it is often considered to be a merged language
In addition to being object oriented, C++ provides flexible declarations of data types, compared to C
Python
Open Source natural syntax language designed as a powerful, easy to learn language
Python runs on many common hardware platforms, with a large set of libraries resembling C
Python is a stronly typed language that prevents data types from being easily changes within an object
Object-C
The primary object oriented language for Apple platforms
High similarity to the syntax of C
Instead of objects calling a method to communicate, Object-C uses a message passing paradigm to allow modules to interact with each other
Delphi
Object Oriented descendant of Pascal
Very human readable formatted object oriented code
Very Windows centric development platform
Ruby
Open source language with ease of human readability of code that can be combined easily into high power code
based on the simplest aspects of Perl, Smalltalk, Eiffel, Ada, and Lisp
Everything in Ruby is an object, and every data type in Ruby has a value


No comments:

Post a Comment