Components vs. Objects Luigia Petre Turku Centre for Computer Science & Åbo Akademi University, FIN-20520 Turku, Finland Presented at Nordic Workshop on.

Slides:



Advertisements
Similar presentations
Object-Oriented Software Engineering Visual OO Analysis and Design
Advertisements

UML an overview.
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Lecture # 2 : Process Models
Computer Science Dept. Fall 2003 Object models Object models describe the system in terms of object classes An object class is an abstraction over a set.
Object-Oriented Analysis and Design: Object Modeling – Class Diagrams
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
Object-Oriented Analysis and Design
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML – Class Diagrams.
Chapter 14 (Web): Object-Oriented Data Modeling
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Marcelo Santos – OOAD-CDT309, Spring 2008, IDE-MdH 1 Object-Oriented Analysis and Design - CDT309 Period 4, Spring 2008 Object-oriented concepts.
Requirements Analysis 2 What objects collaborate to achieve the goal of a use case?
© Copyright Eliyahu Brutman Programming Techniques Course.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
7M822 UML Class Diagrams advanced concepts 15 September 2008.
7M822 UML Class Diagrams advanced concepts 14 October 2010.
Chapter 14: Object-Oriented Data Modeling
Structured Vs. Object Oriented Analysis and Design SAD Vs. OOAD
Chapter 13 (Online): Object-Oriented Databases
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
BCS 2143 Introduction to Object Oriented and Software Development.
OBJECT ORIENTED PROGRAMMING CONCEPTS ISC 560. Object-oriented Concepts  Objects – things names with nouns  Classes – classifications (groups) of similar.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
Software Models (Cont.) 9/22/2015ICS 413 – Software Engineering1 -Component-based software engineering -Formal Development Model.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 8 Slide 1 Chapter 9 Structuring System Data Requirements.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
Introduction To System Analysis and Design
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
1 © Prentice Hall, 2002 Chapter 14: Object-Oriented Data Modeling Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
CSC480 Software Engineering Lecture 11 September 30, 2002.
Domain Modeling Part2: Domain Class Diagram Chapter 4 pp part 2 1.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
Component-Based Software Engineering(CBSE) Xingui Tang CS532, Fall /6/2015.
Object-Oriented Data Modeling
Basic Concepts of Component- Based Software Development (CBSD) Model-Based Programming and Verification.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Component-Based Systems X LIU, School of Computing, Napier University TIP As computing systems become more and more complex, software reuse and component-based.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 15. Review Interaction-Oriented Software Architectures – MVC.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
Lecture 2 Intro. To Software Engineering and Object-Oriented Programming (2/2)
WELCOME TO OUR PRESENTATION UNIFIED MODELING LANGUAGE (UML)
1 SYS366 Week 2 - Lecture Visual Modeling and Process.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Object Oriented Programming
UML Diagrams: Class Diagrams The Static Analysis Model
Object-Oriented Modeling
Business System Development
The Object-Oriented Thought Process Chapter 1
Inheritance B.Ramamurthy 11/7/2018 B.Ramamurthy.
Domain Class Diagram Chapter 4 Part 2 pp
Lec 3: Object-Oriented Data Modeling
Chapter 20 Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Appendix A Object-Oriented Analysis and Design
Presentation transcript:

Components vs. Objects Luigia Petre Turku Centre for Computer Science & Åbo Akademi University, FIN Turku, Finland Presented at Nordic Workshop on Programming Theory, Bergen, Norway, Oct 11-13, 2000 (Presented at Nordic Workshop on Programming Theory, Bergen, Norway, Oct 11-13, 2000)

Software Engineering Abstractions l Component-based SE = constructing new systems from already existing, service-providing components l Object-based SE = constructing a new system in terms of interacting, distinct units of information and services called objects

Motivation Both components and objects –have encapsulation properties –are accessed via well-defined interfaces –are considered to improve the reuse of software –are considered to alleviate the software evolution phase –are thought of being natural abstractions of real-world entities –a real-world entity can be modelled / implemented using either notion

Our Aim...is to answer to: (a) What is the essential difference between components and objects? (b) (Why) do we need them both?

Components (1) Software components = units of composition with contractually specified interfaces and context dependencies only A SW component –can be deployed independently –is subject to composition by third parties

Components (2) => possibly 3 parties involved: –one specifies the component, –one implements the specification of a component, –one deploys / use the component contractual interfaces contractual dependencies Component (binary unit)

contractual interfaces contractual dependencies Component (binary unit)

Components (3) A system built up from components –is more robust –is more flexible (alleviates evolution) –has a shorter development time / process The foremost advantage: reuse of software

Objects (1) Object - abstraction from a real-world entity, with associated items of information and a set of specific operations It has –a unique and invariant identifier –a class to which it belongs –a state that has a certain value

Classes (1) Class - abstract data type with a set of properties (attributes and operations) common to its objects - has the means of creating objects with these properties

Classes (2) Person PhysicianDriver superclass / base class subclasses / derived classes inheritance  Person}  Driver}  Person}  Physician}

Objects (2) Objects interaction -- using each others operations Objects visibility -- the state and the implementation of the operations is hidden A system built up from objects –is modular ( designing classes rather than the whole system ) –is reusable ( inheritance ) –alleviates evolution ( objects are fundamental and stable, implementation is hidden )

The conceptual difference: their role Objects –describe / implement real-world entities (and their hierarchies) –mathematical modelling approach to software –partition the state space Components –describe / implement services of real-world entities –engineering approach to software –partition the service space

Example: Mail Delivery System (MDS) Services: –input mail –send mail –load mail into the transportation means –transport mail to destination –confirm delivery

MDS Component View We need a component (PostCar) that is able –to move –to have a certain loading capacity We need a component (Driver) that is able –to drive for x hours in a row –to drive certain types of cars –to receive a salary of no more than y

MDS Object View We need a class PostCar, with –a move operation –a capacity attribute We need a class Driver, with attributes in some ranges

Components vs. Objects = Service vs. Identity Using a service from a component: specify the required service and use any component providing an implementation of that service Using a service from an object: specify what object is used and use the service that particular object (with the particular state) can provide

Using Components and Objects Components -- service-oriented => they describe best the functionality of a system Objects -- identity-oriented => they describe best the problem domain of a system Consequently, we should –start the software development with components –develop each component in terms of objects

UML Diagrams Outline (1) Drive Unload Transport Dispatch Confirm Delivery Input Mail Send Mail Load Customer MDS

UML Diagrams Outline (2) Drive Unload Transport Dispatch Confirm Delivery Input Mail Send Mail Load Customer MDS

UML Diagrams Outline (3) Driver Drive Load Unload Driver TruckDriverCarDriverBusDriver Task Outage On leave On Duty

Conclusions l Components -- service-oriented => best as functional abstractions l Objects -- identity-oriented => best as problem domain abstractions l Components and objects -- best as software construction abstractions