1 / 18

History of Object Orientation

History of Object Orientation. What is Object-Orientation?. Programming is one of the most complicated and difficult of human activities. It helps a great deal if the program being developed is analogous to a real world solution to the problem. requirements are easier to understand,

Sophia
Download Presentation

History of Object Orientation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. History of Object Orientation

  2. What is Object-Orientation? • Programming is one of the most complicated and difficult of human activities. • It helps a great deal if the program being developed is analogous to a real world solution to the problem. • requirements are easier to understand, • more realism in the expectations of others, • debugging is eased by access to the real world solution • the system is less likely to be obsolete in the end. • This informal approach—the design of the program reflects objects and their behaviour in the real world—is called “object-oriented programming” • First adopted by simulation programmers ca. 1960.

  3. Strengths and Weaknesses of Object-Orientation • Strengths: • the underlying objects are usually well-defined and unchanging • the structure of the solution is variable • Weaknesses: • It is often very hard to grasp the behaviour of the system as a whole • There is no ‘best’ object decomposition for a system of any size. • This approach is considered analogous to the way humans think.

  4. Start with Objects • So we start with objects. • Correspond to real things, having state and behaviour. • Computation performed by objects communicating with each other (“message passing”). • Objects have memory (“state”), consisting of variables or objects. • Each object belongs to a class, which defines the behaviour for objects in that class. • Classes inherit behavior from other, more general classes, forming a hierarchy. • Alan Kay (1993) identified these characteristics as fundamental to object-oriented programming.

  5. Too Simple? • Now this is clearly too simple. • Consider a bat colony—the objects are bats, which communicate and have memory. • Much of their behaviour is general for bats, rather than specific to an individual bat, but it is also clear that bats are individuals and perform internal computation, so an object-oriented model of a bat colony misses a lot of details. • Also, bats change their behaviour (‘class’) with age. • However, a model of the bat colony that fails to consider the bats as individual behaving objects will be incomplete. • An object-oriented model is useful • A way to take individuals into consideration

  6. A Definition • Object-oriented design and programming is an approach to defining a solution to a problem that uses the system's natural structure as a system of interacting objects to provide a programming solution. • Although it will still miss some of the constraints that would apply to a real-world solution, it provides an approach to design that promises to reduce the space of alternative designs enough that the programmer is no longer working with abstract thought.

  7. Ancestry of Object-Oriented Programming • The ancestry of object-oriented programming can be found in imperative and applicative languages. (Languages that define processing instead of state and relations.) • The object-oriented paradigm emerged into the general software community from the simulation community in the early 1970s.

  8. Simulation Objects • Simulation programmers have always viewed the world as objects and semantic relationships, and this led to a natural programming model consisting of objects with • Identity (object names or references) • Behaviour (attributes or methods) and • State (internal data).

  9. Formalism and Simulation • Theoretical workers have long been aware that object-orientation is an inadequate model, because • formal syntax cannot express semantics fully (Alan Turing) • the discrete representation of the world implicit in programming means that formal syntax cannot express causal entailment fully (Robert Rosen). • BUT, it is an adequate approximation for our purposes. • Note: This means object-oriented programming cannot be formalized completely.

  10. ALGOL • ALGOL 58 and 60 were early languages designed to express the constructs of structured programming in a fashion that could be reasoned about effectively. • Ancestors of many languages, including Pascal, C, C++, C#, Java, Ada, and the simulation language, Simula.

  11. SIMULA • SIMULA 1 and 67 were defined by Nygaard and Dahl as object-oriented extensions of ALGOL. • Given that object orientation did not exist at the time, it is probably more accurate to describe it as a simulation language based on ALGOL 60 that incorporated much of what later would become known as object-orientation. • In addition to the features most of us would recognize, it incorporated something elegant called the ‘coroutine’. • This is an instantiation of a subroutine with storage for input and local data that could interact as an object with other coroutines. • The corresponding concept in C++ and Java is the functor. • An object that can be called as if it was a function.

  12. SmallTalk • SmallTalk (Goldberg and Robson, 1982) was a consistent attempt to define computation as objects interfacing by message passing. • Everything, including primitive types, was an object, and all function calls were implemented using messages. • This included primitive arithmetic operations! • Smalltalk is slow (at least ten times slower than C++) but is easy to write in if you can understand the model of computation.

  13. Eiffel • Eiffel was a language designed by Bertrand Meyer (1988) to implement ‘design by contract’. (If you're interested in exploring Eiffel, it is available in the Metrowerks Codewarrior development environment for the Macintosh.) • Meyer’s work in this area was an attempt to formalize object-oriented programming, and was moderately successful. • The principles of modularity (discussed later) are from Meyer.

  14. C++ • C++—Bjarne Stroustrup (Stroustrup, various) designed C++ as ‘C with classes’ to support his simulation work. • This language has become remarkably popular, and is one of the two major OO languages (with Java) .

  15. Java • Java—A language deliberately designed for object-oriented programming in embedded environments. • Popular for web and cross-platform independent applications. • Evolving towards C++.

  16. C# • C#—Microsoft lost a court case with SUN over its specialization of Java for the ‘WINTEL’ environment. C# is Microsoft's attempt to take over the niche occupied by Java. As part of this strategy, Microsoft removed the Java Virtual Machine from the Windows operating system, which led to a further court case that they lost. • Java 5 is quite similar to C#.

  17. Ada • Ada 95 (AARM, 1995) is the latest generation of Ada. • Originally designed (on the basis of Pascal) to be a high-reliability language for embedded systems, but soon accumulated features to support almost any US Department of Defense application. • Not designed to be object-oriented, but during the 1980s-90s, support for object-oriented programming was added to the wish-list. • Named after Augusta Ada Byron, Lady Lovelace, a daughter of Lord Byron and the first computer programmer.

  18. Conclusions • Just like you can write FORTRAN in almost any language, you can use object-orientation in almost any language, but… • Some languages make it easier to be object-oriented.

More Related