Chapter 2.3 - Reuse Flashcards
What is the main goal of software reuse?
To avoid reinventing the wheel by reusing existing solutions in multiple projects.
How does software architecture support reuse?
Through clearly defined interfaces, separation of concerns, and low coupling.
Name some common approaches that focus on reusability.
Libraries, frameworks, Service-Oriented Architecture (SOA), and Component-Based Architectures.
Why does reuse often fail in practice?
It is often done at a small scale, unsystematically, and without considering non-functional requirements.
What is the “Not Invented Here” syndrome?
A resistance to using external solutions due to a preference for in-house development.
What is the trade-off between flexibility and stability in reusable components?
Too much flexibility leads to expensive adaptations, while too little limits reusability.
What is ad-hoc reuse?
Reuse of artifacts that were not originally designed for reuse (e.g., copy-pasting code).
Why is ad-hoc reuse problematic?
It leads to high maintenance costs due to inconsistent and unstructured code duplication.
What is structured reuse?
Systematic planning and development of reusable artifacts, often seen in software product lines.
What is variability in software reuse?
The ability of software to adapt to different requirements or contexts.
What is the difference between external and internal variability?
External variability is visible to customers, while internal variability is hidden (e.g., different communication protocols).
What is a variation point?
A place where the system can be customized or configured.
What are variants?
Specific implementations of a variation point (e.g., different authentication methods).
What is Software Product Line Engineering (PLE)?
A proactive approach to reuse, focusing on developing reusable core assets and customizing them for different applications.
What are the two main processes in PLE?
Domain Engineering – Defines commonalities and variabilities.
Application Engineering – Customizes products based on the reusable assets.
What are the benefits of PLE?
Reduces costs, improves time-to-market, and enhances quality by managing variability systematically.
What is an example of PLE success?
Nokia increased the number of phone models from 4 to 25 using PLE.
What is scoping in PLE?
The process of defining what should be included in the product line based on economic and market factors.
What are the key factors considered in scoping?
Products - what is their market
domains - what problems do we solve?,
features - what is easy, what is risky?
assets - what is there already, what needs to be reimplemented?
Think of cars, planes, phones, etc. e.g they all need a navigation service that reads their position etc but everyone might need something more special with similar core
What is a software framework?
A reusable set of classes that provides a common structure for solving related problems.
What is the Inversion of Control (IoC) principle in frameworks?
The framework calls the user’s code instead of the user calling framework functions (Hollywood principle: “Don’t call us, we’ll call you”).
What is the difference between a library and a framework?
Library: The application controls when to call it.
Framework: The framework controls execution flow and calls the application code.
What is a reference architecture?
A blueprint that defines the best practices, components, and interactions for a specific domain.
What are some examples of reference architectures?
Database-centric (e.g., data warehouses)
Service-oriented (e.g., microservices, REST)
Component-based (e.g., Spring, .NET)
What are the differences between ad-hoc reuse and structured reuse?
Reuse of existing artifacts without prior planning vs Planned, systematic reuse with design considerations
E.g Copy-pasting code from one project to another vs creating Software product lines, frameworks, configurable software
Problems
What is an example of internal vs. external variability?
Internal Variability - Hidden from the user, used for technical improvements. E.g a software system supporting two network protocols but automatically selecting the best one.
External Variability - Visible to the customer, offers customization options. E.g a user choosing between fingerprint, PIN, or face recognition for authentication