CSC/ECE 517 Fall 2009/wiki2 15 ms: Difference between revisions
Line 47: | Line 47: | ||
* http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html | * http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html | ||
* http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization | * http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization | ||
* http://www.answers.com/topic/object-oriented-programming |
Revision as of 20:38, 9 October 2009
Introduction
"Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which repressents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships."taken from Object-Oriented Analysis and Design by Grady Booch
For all the things that we define as object oriented, the main framework is the object model. An object model can be defined as the collection of principles that form the foundation of object oriented design. The main elements of an object model are -:
- Abstraction
- Encapsulation
- Modularity
- Hierarchy
The goal of this article is to describe how abstraction relates to object oriented languages.
Definition of Abstraction
Abstraction (from the Latin abs, meaning away from and trahere, meaning to draw) is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.[taken from what is abstraction?]
An alternate definition given in the book object oriented analysis and design,states that-:
"An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries,relative to the perceptive of the viewer."
The gist is that abstraction is a concept wherein all but the relevant information about an object is hidden in order to reduce complexity and increase the efficiency. This concept even applies in the field of arts wherein an object or a piece of art created by an artist is a representation of the original model with all the unwanted details removed. In other words it is nothing but recognizing the similarities between objects and ignoring for some time their differences. It focuses on the outside view of the object and separate it's behavior from it's implementation.
Types of abstractions
There are different types of abstractions as suggested by Seidewitz and Stark of which some closely model problem domain entities and some which have no reason for existence. These are as following (mentioned in the order of their usefulness) -:
- Entity abstraction - This is where an object represents a useful model of a problem domain or solution domain entity.
- Action abstraction - This is when an object provides a generalized set of operations, all of which perform the same kind of function.
- Virtual Machine abstraction - This is where an object groups together operations that are all used by some superior level of control, or operations that all use some junior-level set of operations.
- Conincidental abstraction - An object that packages a set of operations that have no relation to each other.
Entity abstractions is what is used widely because it directly parallels a given problem domain.
Definitions taken from object oriented analysis and design by Grady Booch
Mechanisms of finding key Abstractions
A key abstraction is an abstraction without which we cannot describe the system. They give boundaries to our problem.They highlight things that are more relevant to our system and hence to the design and suppress the things that are outside the system. There are two important steps in identifying the key abstractions. These are -:
- Discovery
- Invention
By using discovery we can find the abstraction used by domain experts. Through invention, we can create new classes and objects that are not necessarily part of the problem domain, but are useful in design and implementation. For example, a customer using an automated teller machine speaks in terms of accounts,deposits and withdrawals; these works are part of te vocablury of the problem doman. A developer of such a system uses these same abstractions, but must also introduce new ones, such as databases, screen mangers, lists, queues and so on. These key abstractions are artifacts of the particular design, not of the problem domain.
References
- http://searchcio-midmarket.techtarget.com/sDefinition/0,,sid183_gci343038,00.html
- http://epf.eclipse.org/wikis/openup/core.tech.common.extend_supp/guidances/concepts/key_abstractions_1474DBF2.html
- http://www.mymindleaks.com/blog/programming/object-oriented-programming-abstraction/
- http://www.madsci.org/posts/archives/apr2001/987192403.Eg.r.html
- http://www.codeproject.com/KB/architecture/OOP_Concepts_and_manymore.aspx#Generalization
- http://www.answers.com/topic/object-oriented-programming