1 / 11

Object-oriented programming

Object-oriented programming. Introduction to OO style. Smalltalk. Smalltalk is developed by Alan Kay, Dan Ingalls, and Adele Goldberg at Xerox Parc An untyped, class-based language Classifies attributes and methods as belonging to either classes or to instances

wandaroy
Télécharger la présentation

Object-oriented programming

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. Object-oriented programming Introduction to OO style

  2. Smalltalk • Smalltalk is developed by Alan Kay, Dan Ingalls, and Adele Goldberg at Xerox Parc • An untyped, class-based language • Classifies attributes and methods as belonging to either classes or to instances • All methods are public, while all fields are private • Single inheritance, overriding, abstract class

  3. Design principals of Smalltalk(based on an article of Dan Ingalls in 1981, Byte magazine) • Iterative design • General principal • Language • Communication objects • Organization • User interface

  4. Iterative design • Build an application program within the current system (make an observation) • Based on that experience, redesign the language (formulate a theory) • Build a new system based on the new design (make a prediction that can be tested) • Smalltalk-80 marks the fifth time through this cycle

  5. General principals • Personal mastery: If a system is to serve the creative spirit, it must be entirely comprehensible to a single individual • Good Design: A system should be built with a minimum set of unchangeable parts; those parts should be as general as possible; and all parts of the system should be held in a uniform framework

  6. Explicit communication body body implicit communication mind mind Language design • Purpose of Language: To provide a framework for communication • Scope: The design of a language for using computers must deal with internal models, external media, and the interaction between these in both the human and the computer

  7. Communicating objects • Objects: A computer language should support the concept of “object” and provide a uniform means for referring to the objects in its universe • Storage management: To be truly “object-oriented”, a computer system must provide automatic storage management • Messages: Computing should be viewed as an intrinsic capability of objects that can be uniformly invoked by sending messages • Uniform metaphor: A language should be designed around a powerful metaphor that can be uniformly applied in all areas

  8. Organization • Modularity: No component in a complex system should depend on the internal details of any other component • Classification: A language must provide a means for classifying similar objects, and for adding new classes of objects on equal footing with the kernel classes of the system • Polymorphism: a program should specify only the behavior of objects, not their representation

  9. Organization (Cont.) • Factoring: Each independent component in a system would appear in only one place (inheritance) • Leverage: when a system is well-factored, great leverage is available to users and implementers alike • Virtual machine: A virtual machine specification establishes a framework for the application of technology • Object-oriented model for storage • Message-oriented model for processing • Bitmap model for visual display of information

  10. User interface • A user interface is simply a language in which most of the communication is visual • Reactive principal: every component accessible to the user should be able to present itself in a meaningful way for observation and manipulation

  11. Operating system components • An operating system is a collection of things that don’t fit into a language • Smalltalk incorporates a number of operation system components • Storage management • File system • Display handling • Keyboard input • Access to subsystems • debugger

More Related