Object Model Evolution and Foundations
TSRK Prasad
Department of CSE BITS, Pilani - KK Birla Goa Campus
11-Aug-2014
Object Oriented Programming Object Model: Evolution and Foundations Lecture Outline
1 Evolution of the Object Model
2 Foundations of the Object Model
2 / 29 Object Model: Evolution and Foundations Lecture Outline
1 Evolution of the Object Model
2 Foundations of the Object Model
3 / 29 Object Model: Evolution and Foundations Generations of Programming Languages
Generation Language Innovations 1G (1954 – 1958) Mathematical Expressions (FORTRAN I, ALGOL 58) Procedural Programming (FORTRAN II), 2G (1959 – 1961) List Processing etc (Lisp), File handling (COBOL)
3G (1962 – 1970) Classes, Data abstraction (Simula)
1970 – 1980 Efficiency (C), Standardization (FORTRAN 77) Procedural and OO (C++), OO (1980 – 1990) Pure OO (Smalltalk)
Frameworks OO Scripting (Python), Portability (Java) (1990 – today)
Evolution of the Object Model Generations of PLs 4 / 29 Object Model: Evolution and Foundations Evolution of Programming Languages
Evolution of the Object Model Generations of PLs 5 / 29 Object Model: Evolution and Foundations Evolution of Programming Languages
Evolution of the Object Model Generations of PLs 6 / 29 Object Model: Evolution and Foundations Evolution of Programming Languages
Evolution of the Object Model Generations of PLs 7 / 29 Object Model: Evolution and Foundations Evolution of Programming Languages
Evolution of the Object Model Generations of PLs 8 / 29 Object Model: Evolution and Foundations Evolution of Programming Languages
Evolution of the Object Model Generations of PLs 9 / 29 Object Model: Evolution and Foundations Choice of Language
I have sampled every language, French is my favourite - fantastic language, especially to curse with. The Merovingian, The Matrix Reloaded
Evolution of the Object Model Choice of Language 10 / 29 Object Model: Evolution and Foundations Choice of Language
What would you use? Use a language that is natural to problem domain.
Evolution of the Object Model Choice of Language 11 / 29 Object Model: Evolution and Foundations A Comparison from Wolfram Developers
Scala and J PLs score well with a character count ratio of ~0.5.
Ref: http://blog.wolfram.com/2012/11/14/code-length-measured-in-14-languages/
Evolution of the Object Model Choice of Language 12 / 29 Object Model: Evolution and Foundations Topology of 1G and early-2G PLs
All data is global Subroutines used as code reduction schemes
Evolution of the Object Model Topology of 1G and early-2G PLs 13 / 29 Object Model: Evolution and Foundations Topology of late-2G and early-3G PLs
Support for structural (main-function style) programming Subroutines provide algorithmic abstraction
Evolution of the Object Model Topology of late-2G and early-3G PLs 14 / 29 Object Model: Evolution and Foundations Topology of late-3G PLs
Data abstraction and typing still not present Modules used to group subprograms
Evolution of the Object Model Topology of late-3G PLs 15 / 29 Object Model: Evolution and Foundations Topology of Object-Based and OO PLs
No more global data by default Data and functions are united to form classes and objects Modules used to group classes and objects
Evolution of the Object Model Topology of Object-Based and OO PLs 16 / 29 Object Model: Evolution and Foundations Scalability using OO PLs
Implementation of hierarchy using modules
Evolution of the Object Model Scalability using OO PLs 17 / 29 Object Model: Evolution and Foundations It’s about Productivity
18 / 29 Object Model: Evolution and Foundations
Questions??
19 / 29 Object Model: Evolution and Foundations Lecture Outline
1 Evolution of the Object Model
2 Foundations of the Object Model
20 / 29 Object Model: Evolution and Foundations A Precaution
Give a power drill to a carpenter who knows nothing about electricity, and he would use it as a hammer. He will end up bending quite a few nails and smashing several fingers, for a power drill makes a lousy hammer. – pg 40, OOAD with Applications
Moral: Don’t use OO languages (Java) as procedural (C) languages
Foundations of the Object Model 21 / 29 Object Model: Evolution and Foundations Object Definition
Object is a tangible entity that exhibits some well-defined behaviour.
Objects unify algorithmic and data abstractions
Each object has a state (data abstraction) and exhibits certain behaviour (algorithmic abstraction) and can relate to other objects.
Foundations of the Object Model Object Definition 22 / 29 Object Model: Evolution and Foundations OOP Definition
Object-oriented programming is a method of implementation in which programs are organized as cooperative collections of objects, each of which represents an instance of some class, and whose classes are all members of a hierarchy of classes united via inheritance relationships.
Programming without inheritance ñ Programming with ADTs¦ (not an OO programming)
ADT – Abstract Data Type
Foundations of the Object Model OOP Definition 23 / 29 Object Model: Evolution and Foundations OO Language Definition
A language is object-oriented if and only if it satisfies the following requirements: It supports objects that are data abstractions with an interface of named operations and a hidden local state. Objects have an associated type [class]. Types [classes] may inherit attributes from supertypes [superclasses].
Again, without inheritance, the language is only Object-based not Object-oriented.
Foundations of the Object Model OO Language Definition 24 / 29 Object Model: Evolution and Foundations OO Programming and Resurrection
Foundations of the Object Model 25 / 29 Object Model: Evolution and Foundations More Definitions
OO Design Object-oriented design is a method of design encompassing the process of object-oriented decomposition and a notation for depicting both logical and physical as well as static and dynamic models of the system under design.
OO Analysis Object-oriented analysis is a method of analysis that examines requirements from the perspective of the classes and objects found in the vocabulary of the problem domain.
Foundations of the Object Model 26 / 29 Object Model: Evolution and Foundations
Foundations of the Object Model 27 / 29 Object Model: Evolution and Foundations Reading Material
Sec 2.1 – 2.2, Chapter 2: The Object Model, Object-Oriented Analysis and Design with Applications, Grady Booch, Robert A. Maksimchuk, Michael W. Engle, Bobbi J. Young, and Jim Conallen, Pearson Education, 3rd Edition, 2007.
Foundations of the Object Model 28 / 29 Object Model: Evolution and Foundations Acknowledgements
PLgeneology.png Ch2: Evolution of the Major Programming Languages, Concepts of Programming Languages, Robert W. Sebesta, 10th Edition, Pearson Education, 2012. grief.png http://www.howtogeek.com/121880/the-five-stages-of-programming-grief-humorous-comic/ pl{1-3}.png pg 24 - 28, Introduction, Land of Lisp, Conrad Barski, No Starch Press, 2011. hackles.png http://hackles.org/strips/cartoon75.png object-orientation.jpg http://www.datamation.com/news/tech-comics-teaching-object-orientation-1.html
Foundations of the Object Model 29 / 29