List some possible advantages and disadvantages of building software by plugging together off-the-shelf components.
Advantages:
Disadvantages:
What is meant by a ‘provided interface’?
A description of a set of operations a component makes available to other components.
What is meant by a ‘required interface’?
A description of a set of operations a component needs from other components.
Suppose a component is implemented as an instance of a Java class. What corresponds to:
The provided interface consists of all the public methods in the class.
The required interface consists of all the methods from other classes that the component’s methods make use of.
In object-oriented languages an object belonging to a subclass is allowed to replace an object of the parent class. This is known as substitutability.
In the context of software components, describe a concept that is similar to substitutability.
Components are replaceable: a component can be replaced by another that does the same job.
What would the assume–guarantee contract for a component include and how do the assume and guarantee relate to the component’s provided and required interfaces?
The contract for a component would be:
The assume would be the preconditions of the operations, and items 3 and 4 of the contract above.
The guarantee would be the postcondition of the operations and item 2 of the contract above.
Suppose component X is replaced by component Y, which has different assumptions and guarantees from X. Drawing on your knowledge of design by contract (DbC) suggest what restrictions must apply to the assume and guarantee if Y is to be an acceptable replacement for X. Illustrate your answer with an example.
The assumptions made by Y must be the same as those made by X, or weaker. The guarantee Y makes must be the same as the one X makes, or stronger. In other words Y must not demand more, or deliver less, than X.
For example X might accept up to a million items and promise to process them with 99 per cent accuracy. If Y restricts the maximum to half a million items it is demanding more. If it promises only 90 per cent accuracy it is delivering less.
What are some of the key differences between services and components?
Briefly describe the three kinds of service.
What is meant by task-oriented and entity-oriented services?
Task-oriented services are related to business activities (business processes), whereas entity-oriented services are related to business entities (business objects).
What are the advantages of service-oriented architecture (SOA)?
From your study of the module, list some other types of reusable solution, apart from design tactics, that are available to software engineers.
Write down in your own words what flexibility means in relation to software.
Flexibility is the ability for software to be changed easily.
What concepts introduced in the module relate to flexibility?
List as many ways as you can think of to reduce coupling.
In terms of quality attributes, what are tactics?
They are reusable solutions to the problem of achieving particular qualities.
What are the main tactics for performance?
What are the main tactics for flexibility?