












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Interfaces and Components, Design Workflow, Interfaces, Interface Semantics, Provided Interface, Required Interface, Assembly Connector, Interface Hierarchies, Interface Realization vs. Inheritance, Ports, Components, Component-Based Development, Subsystems, Designing with Interfaces, Raman Ramsin, Lecture Slides, Object Oriented Design, Department of Computer Engineering, Sharif University of Technology, Iran.
Typology: Slides
1 / 20
This page cannot be seen from the preview
Don't miss anything!













Department of Computer Engineering
Department of Computer Engineering
Design Workflow: Architecture and Subsystems Place in the Design Workflow: Architectural Design Design a Use Case Design a Class Design a Subsystem concerned with breaking a system up into subsystems that are as independent as possible. Interactions between subsystems are mediated by interfaces.
Department of Computer Engineering
Interface Semantics A classifier realizing an interface has the following responsibilities for each feature:
Department of Computer Engineering
Alternative Design Approaches Designing to an implementation : specific classes are connected; to keep things simple (but rigid), design to an implementation. Designing to a contract : a class is connected to an interface that may have many possible realizations; to make things flexible (but possibly more complex), design to a contract.
Department of Computer Engineering
Required Interface An interface required by a classifier: the classifier requires another classifier that realizes the interface; show a dependency to a class style interface, a lollipop style interface, or use an assembly connector.
Department of Computer Engineering
Assembly Connector Joins provided and required interfaces.
Department of Computer Engineering
Interface Realization vs. Inheritance Interface realization - "realizes a contract specified by". Inheritance - "is a". Both inheritance and interface realization generate polymorphism. Use interfaces to specify the common protocols of classes that should not normally be related by inheritance.
Department of Computer Engineering
Interface Realization vs. Inheritance: Example
Department of Computer Engineering
Components Component - a modular part of a system that encapsulates its contents and whose manifestation is replaceable within its environment: may have attributes and operations; may participate in relationships; may have internal structure; its external behavior is completely defined by its provided and required interfaces; components manifest one or more artifacts.
Department of Computer Engineering
Components: Standard Stereotypes
Department of Computer Engineering
Subsystems: Applications Subsystems are used to: separate design concerns; represent large-grained components; wrap legacy systems.
Department of Computer Engineering
Designing with Interfaces Use interfaces to hide the implementation details of subsystems: the Facade pattern hides a complex implementation behind a simple interface; the layering pattern organizes subsystems into semantically cohesive layers: dependencies between layers should only go one way; all dependencies between layers should be mediated by an interface; example layers include presentation, business logic, and utility layers.
Department of Computer Engineering
Finding Interfaces: Guidelines challenge associations; challenge message sends; factor out groups of reusable operations; factor out groups of repeating operations; factor out groups of repeating attributes; look for classes that play the same role in the system; look for possibilities for future expansion; look for dependencies between components.
Department of Computer Engineering
Reference Arlow, J., Neustadt, I., UML 2 and the Unified Process: Practical Object-Oriented Analysis and Design, 2
Ed. Addison-Wesley,