Lecture 8: Components and Implementation Flashcards
What is an interface?
- Specifies a named set of public features
- Separates the specification of its functionality from its implementation
- Defines a contract that classes and subsystem may realise
What should the contract be conformed to?
- operation
- attribute
- association
- constraint
- stereotype
- tagged value
- protocol
What is a required interface syntax?
A required interface indicates that a classifier uses the services defined by the interface
What is an assembly connector?
You can connect the provided and required interface using an assembly connector
What is ports organising interface?
• Specifies the interaction point between a classifier and its environment
• A port is typed by its provided and required interfaces:
- May have a name
What is the key to interfaces?
• Interfaces are key to component based development
What is a component?
- Defines the requirements for software deployed to hardware
- Represents a part of a system that **encapsulates **the contents whose display is replaceable within its environment
What can a component be (2 kinds)
Can be either logical or physical
What is a subsystem?
- Acts like a unit of decomposition for larger systems
- Used to decompose larger systems into manageable chunks
- Connected to an interface to create a **system architecture **
How do you finding interfaces and ports?
- Look for repeating groups of operations and its usefulness elsewhere
- Possibilities for future expansion
- Cohesive sets provided and required interfaces and organise to named ports
- Look for dependencies between subsystem
How do you design interfaces?
- Designing interfaces based on common sets of operation
- Designing interfaces based on common roles
- Designing interfaces based on plug-in features/algorithms
- The Façade pattern can be used to create “seams” in a system
What is a physical archietecture?
- Subsystems and interfaces comprise the physical architecture of the model
- Can apply “layering” architectural pattern
What are the advantages of using interfaces?
- Defines** contracts** that classes and subsystem may realise
- Programming to its interfaces increases **flexibility and extensibility **
- Programming to interfaces rather to classes reduces dependencies between classes and subsystems
What are the disadvantages of using interfaces?
- Can add flexibility but may lead to complexity
- Can make it difficult to understand
What’s the implementation purpose?
- Implements the design classes and components
- Converts the design model into executable program