Principles of Object-Oriented Software Development Object-oriented programming languages.

Slides:



Advertisements
Similar presentations
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Copyright © 1998 by Addison Wesley Longman, Inc. 1 Chapter One Preliminaries, including –Why study PL concepts? –Programming domains –PL evaluation criteria.
Classes & Objects Computer Science I Last updated 9/30/10.
Principles of Object-Oriented Software Development The language DLP.
ITEC200 – Week03 Inheritance and Class Hierarchies.
Object-Oriented Analysis and Design
Object-Oriented Design & Programming Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Principles of Object-Oriented Software Development The language Smalltalk.
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
OOP in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Reasons to study concepts of PL
Scripting Languages For Virtual Worlds. Outline Necessary Features Classes, Prototypes, and Mixins Static vs. Dynamic Typing Concurrency Versioning Distribution.
OBJECT ORIENTED ANALYSIS & DESIGN Vassilka Kirova Department of Computer & Information Science NJIT.
Harvey SiyPrinciples of Object-Oriented Software Development by Eliens Slide 1 Object-Oriented Programming Languages Principles of Object-Oriented Software.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
The Object Oriented Programming Languages (OOPL). Done by: Tayeb El Alaoui Supervised by: Dr Driss Kettani.
Object-Oriented Databases
Programming Languages Structure
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
ASP.NET Programming with C# and SQL Server First Edition
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
Abstract Data Types and Encapsulation Concepts
OOP in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
Teamwork Know each other Compete Leadership Strengths and Weaknesses
Object Oriented Programming
Comparison of OO Programming Languages © Jason Voegele, 2003.
Programming Languages and Paradigms Object-Oriented Programming.
11 1 Object oriented DB (not in book) Database Systems: Design, Implementation, & Management, 6 th Edition, Rob & Coronel Learning objectives: What.
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
Programming Languages Summer
1 Programming Language History and Evolution In Text: Chapter 2.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Introduction to Object Oriented Programming CMSC 331.
Chapter 18 Object Database Management Systems. McGraw-Hill/Irwin © 2004 The McGraw-Hill Companies, Inc. All rights reserved. Outline Motivation for object.
Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Object Oriented.
CSC480 Software Engineering Lecture 11 September 30, 2002.
Chapter 2: A Brief History Object- Oriented Programming Presentation slides for Object-Oriented Programming by Yahya Garout KFUPM Information & Computer.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
Object-Oriented Programming Chapter Chapter
(1) ICS 313: Programming Language Theory Chapter 12: Object Oriented Programming.
ISBN Object-Oriented Programming Chapter Chapter
Copyright © 2005 Elsevier Object-Oriented Programming Control or PROCESS abstraction is a very old idea (subroutines!), though few languages provide it.
Principles of programming languages 10: Object oriented languages Isao Sasano Department of Information Science and Engineering.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
The Object-Oriented Database System Manifesto Malcolm Atkinson, François Bancilhon, David deWitt, Klaus Dittrich, David Maier, Stanley Zdonik DOOD'89,
Object orientation and Packaging in Java Object Orientation and Packaging Introduction: After completing this chapter, you will be able to identify.
A Survey of Object-Oriented Concept Oscar Nierstrasz.
Programming Language Theory 2014, 1 Chapter 1 :: Introduction Origin : Michael L. Scott School of Computer & Information Engineering,
ISBN Chapter 12 Support for Object-Oriented Programming.
A Survey of Object-Oriented Concepts, by Oscar Nierstrasz Reviewed by Odd Petter N. Slyngstad for DT8100, 27/1/2005.
1 THE OBJECT-ORIENTED TECHNOLOGY: An Executive Summary 서울대학교 컴퓨터공학부 Internet Database Lab 교수 김형주 Spring 2007.
CSCE 343 – Programming Language Concepts Welcome!.
1 Case Study: Meta Classes  Class representation in memory  Class variables and class methods  Meta Classes  3 Level System  4 Level System  5 Level.
Programming Language History and Evolution
The Movement To Objects
The Object-Oriented Database System Manifesto
1.1 Reasons to study concepts of PLs
Object-Orientated Programming
Programming Language History and Evolution
Ada – 1983 History’s largest design effort
CS565 Advanced Software Development
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Presentation transcript:

Principles of Object-Oriented Software Development Object-oriented programming languages

Introduction The object paradigm Comparing Smalltalk, Eiffel, C++ and Java Design dimensions of object-oriented languages Prototypes -- delegation versus inheritance Meta-level architectures Summary Q/A Literature

Object-oriented programming languages the object paradigm language design dimensions classless prototypes meta-level architectures Additional keywords and phrases: programming languages, orthogonality, reliability, complexity, types, delegation, multiple paradigms, prototypes, reflection

The object paradigm Subsections: A classification of object-oriented languages Alternative object models Object extensions of Lisp, C and Prolog Script languages -- integration with Java

The notion of object abstract data types -- software engineering frames -- artificial intelligence semantic data models -- database system development capability-based computing -- distributed systems Simula

object-oriented structurally capability of representing arbitrarily structured complex objects operationally the ability to operate on complex objects through generic operators behaviorally the specification of types and operations (data abstraction) Perspectives of object orientation

A classification of object-oriented languages

Objects object creation facility message passing capability class capability inheritance features language characteristics

Classification hybrid -- C, Lisp, Pascal, Prolog frame-based -- knowledge-based reasoning distributed, concurrent, actor -- parallel computing alternative object models -- prototypes, delegation

Alternative object models

Object extensions of Lisp, C and Prolog Object extensions Lisp -- LOOPS, FLAVORS, CLOS, FOOPS C -- Objective C, C++ Prolog -- SPOOL, VULCAN, DLP Commercial products -- languages Smalltalk, Eiffel, C++, Objective C, Object Pascal, Java

Object structure -- efficient mapping C++ struct A {... } == class A { public:... } class A {... } == struct A { private: … } The equivalence between class and struct

Script languages Java embedding Javascript -- Dynamic HTML Perl -- CGI/Web library JPL Tcl/Tk -- tclets Jacl, Tcl Blend Python -- Grail JPython

Objects in Javascript

javascript function object_display(msg) { object method return msg + ' (' + this.variable++ + ')'; } function object() { object constructor this.variable=0; this.display = object_display; return this; } var a = new object(); create object document.write(a.display("a message")); document.write(a.display("another message"));

Comparing Smalltalk, Eiffel, C++ and Java Subsections: Criteria for comparison Language characteristics

Criteria for comparison class libraries programming environment language characteristics

Language characteristics uniformity of data structures documentation value reliability inheritance mechanisms efficiency memory management language complexity

Smalltalk Eiffel C++ Java uniformity high medium low medium documentation value medium high medium high reliability medium medium low* high* protected operations no no yes yes multiple inheritance no yes yes no* efficiency low medium high low garbage collection yes yes no* yes language complexity low* medium high medium

Design dimensions of object-oriented languages Subsections: Object-based versus object-oriented Towards and orthogonal approach -- type extensions Multi-paradigms languages -- logic Active objects -- synchronous Java/C++

Object Oriented Language Design object: state + operations class: template for object creation inheritance: super/base and subclasses object-oriented = objects + classes + inheritance data abstraction -- state accessible by operations strong typing -- compile time checking

Orthogonal approach objects -- modular computing agents types -- expression classification delegation -- resource sharing abstraction -- interface specification

Multi-paradigm languages logic

Open systems reactive -- flexible (dynamic) choice of actions modular -- (static) scalability Dimensions of modularity encapsulation boundary -- interface to client distribution boundary -- visibility from within objects concurrency boundary -- threads per object, synchronization

Active objects synchronous Java/C++

Object-based concurrency add processes -- synchronization multiple active objects -- rendezvous asynchronous communication -- message buffers

Synchronous C++/Java

active class S { sC++ public: m () {... } () { pseudo-constructor select { 01 -> m(); external call instructions... || accept m; accept internal method instructions... || waituntil (date); time-out instructions... || default default instructions... } } }

Prototypes delegation versus inheritance Subsections: Alternative forms of sharing Implementation techniques -- Self

Prototypes cloning -- creation time sharing delegation -- lifetime sharing exemplars

State slots -- parents, variables and methods Creation shallow cloning deep cloning Delegation implicit delegation explicit delegation

Improving performance special purpose hardware hybrid languages static typing dynamic compilation Implementation techniques -- Self

Self -- prototypes objects, cloning, delegation Dynamic compilation -- type information customized compilation message inlining lazy compilation message splitting Implementation techniques -- Self

Meta-level architectures

The class concept abstract data type -- interface description object generator -- template for creation repository -- for sharing resources object -- instance of a metaclass

Postulates everything is an object every object belongs to a class every class inherits from the class Object class variables of an object are instance variables of its class class-based languages

Reflective definition of Class name Class supers (Object) iv (name supers iv methods) methods (new...)

Summary

The object paradigm notion of object -- viewpoints classification -- object extensions 1

Comparing Smalltalk, Eiffel, C++ and Java criteria -- libraries, environments, language characteristics comparison -- language characteristics 2

Design dimensions of object-oriented languages object-oriented -- object-based + inheritance orthogonal dimensions -- objects, types, delegation, abstraction open systems -- dimensions of modularity 3

Prototypes -- delegation versus inheritance prototypes -- cloning and delegation performance -- dynamic compilation 4

Meta-level architectures class -- the concept of class meta architecture -- subclass and instance hierarchy reflection -- postulates 5

Questions 1. What are the basic characteristics of object-oriented languages? 2. How would you classify object-oriented languages? Name a few representatives of each category. 3. What do you consider to be the major characteristic of the object model supported by C++? Explain. 4. Why would you need friends? 5. How would you characterize the difference between object-based and object-oriented? 6. Along what orthogonal dimensions would you design an object- oriented language? Explain. 7. Give a characterisation of active objects. In what situations may active objects be advantageous? 8. How would you characterize prototype-based languages?

9. What are the differences between inheritance and delegation? Does C++ support delegation? Explain. And Java? 10. How would you characterize the concept of a class? 11. Can you sketch the meta architecture of Smalltalk? 12. How would you phrase the postulates underlying class-based languages? Can you give a reflective version of these postulates?

Further reading A concise treatment of programming languages is given in [BG94]. Further, you may want to consult [Wegner87], which contains the original presentation of the discussion concerning the distinction between object-based and object-oriented. For Java, read the original white paper, [Java]. An interesting extension of C++ is described in [Petitpierre98]. At the corresponding web site, there is much additional material. Finally, for an account of the design and evolution of C++, read [Stroustrup97]. For more information on C++, visit and for Java,