Hoofdstuk 4 - Domain Modeling Flashcards
Why is it necessary to validate and analyze the requirements?
They must be validated so that we know we are building the right system and analyzed to see if we understand the problem correctly. (Are we modeling the problem domain adequately?)
What’s the decomposition principle for functional and object-oriented decomposition?
◦ Object-oriented: decompose according to the objects a system must manipulate
▪ several couples “is-a” hierarchies
◦ Functional: decompose according to the functions a system must perform
▪ single “subfunction of” hierarchy
Can you give the advantages and disadvantages for functional decomposition? What about object-oriented decomposition?
◦ A functional decomposition is good with stable requirements or single function and it has a clear problem decomposition strategy. However, it is naive because modern systems perform more than one function and interfacing with other systems is difficult.
◦ Object-oriented decomposition is better for complex and evolving systems and the encapsulation provides robustness against typical changes.
How can you recognize “god classes”?
◦ It would have lots of tiny “provider” classes, mainly providing access operations. Also, the inheritance hierarchy is geared towards data and code-reuse.
◦ Overall in the project there would be few large “god” classes doing the bulk of the work.
What is a responsibility? What is a collaboration?
◦ Responsibilities: the public services an object may provide to other objects but not the way in which those services may be implemented.
◦ Collaborations: Other objects necessary to fulfill a responsibility. When collaborating, these objects play a role and to play this role, other objects must have certain responsibilities.
Name 3 techniques to identify responsibilities.
◦ Class enumeration
◦ Verb phrase identification
◦ scenarios and role play
What do feature models define?
◦ They define a set of reusable and configurable requirements for specifying the systems in a domain.
◦ They define the commonalities and variations between the members of a software product line
Give two advantages and disadvantages of a “clone and own” approach.
◦ Advantages – Efficiency:
▪ Saves time and reduces costs
▪ provides independence
▪ readily available
◦ Disadvantages – Overhead:
▪ propagating changes
▪ adapting the clone is difficult
▪ repetitive tasks are common
Explain the main difference between a social fork and a variant fork
◦ A social fork is a branch of the original project. So we would need pull requests to merge in main branch. A social fork ceases to be maintained. (Different routes that all go back to the main one)
◦ Variant forks are maintained separately via social forks. Here duplicated effort is needed to let everything match and work. (Multiple parallel lines)
How does domain modeling help to achieve correctness? Traceability?
◦ Traceability: are the requirements equal to the system
▪ Via proper naming conventions
▪ Especially names of classes and operations
◦ Correctness: are we building the system right and are we building the right system?
▪ Good maintainability via a robust model of the problem domain (what not how)
▪ Model the problem domain from the customer perspective
▪ Role-playing scenarios helps to validate use cases
▪ Feature Diagrams focus on commonalities/variations