Key Concepts
Don't reinvent the wheel — but know what you're installing. Reuse is powerful and risky at the same time.
Benefits of Reuse
Faster delivery, lower cost, battle-tested code, reduced risk.
Reuse Risks
Dependency hell, supply chain attacks, license conflicts, obsolescence.
Application Frameworks
Frameworks provide reusable architecture + infrastructure for a class of applications.
Software Product Lines
A family of related software products sharing a common architecture and components.
Concept Deep Dives
Click each concept to expand — real examples, diagrams, pros & cons.
Benefits of Reuse
When to Use
Almost always — ask 'does this already exist?' before building.
Real-World Example
Building auth? Use Passport.js. Need payments? Stripe SDK. Need ML? scikit-learn. Time saved: weeks.
✓ Advantages
- Faster time to market
- Lower development cost
- Proven, tested functionality
⚠ Watch Out
- Must evaluate before trusting
- License considerations
- Version management overhead
Reuse Risks
When to Use
Before adding any dependency — evaluate the risk.
Real-World Example
Log4Shell (2021): one vulnerability in a logging library (log4j) affected millions of systems worldwide.
✓ Advantages
- Understanding risks lets you mitigate them
⚠ Watch Out
- Transitive dependencies: npm install adds thousands of packages
- Abandonware risk
Application Frameworks
When to Use
Starting any new application in a well-known domain (web, mobile, ML).
Real-World Example
Django provides: ORM, auth, admin, migrations, templating — you provide the business logic.
✓ Advantages
- Architectural guidance built in
- Convention over configuration
- Large community
⚠ Watch Out
- Framework lock-in
- Framework updates can break your code
- Opinionated = less flexibility
- Skeleton structure
- Common utilities
- Extension points
- Business logic
- Custom components
Software Product Lines
When to Use
When building multiple variants of the same product for different customers/markets.
Real-World Example
Android: core OS + customized by Samsung, Xiaomi, OnePlus with different features per market.
✓ Advantages
- Systematic reuse across products
- Economies of scale
- Consistent quality
⚠ Watch Out
- Upfront investment in platform
- Governance overhead
Quick Reference
- 1Software reuse: using existing software components rather than building from scratch.
- 2Benefits: lower costs, faster delivery, proven reliability.
- 3Risks: dependency hell, supply chain attacks, license issues, obsolescence.
- 4Generators of reuse: libraries, frameworks, COTS, services (SaaS/APIs).
- 5Application frameworks: reusable software infrastructure defining system architecture.
- 6Software product lines: family of related systems sharing common architecture.
From the Book & Beyond
Case Study — One Product Line, Three Emergency Services
Sommerville's flagship product-line example is a vehicle dispatching system for emergency services: one generic resource-management core, marketed to police, fire, and ambulance services. The four-layer architecture — interaction, I/O management, resource management, database — stays fixed while components get specialized per customer. And the differences are real: police forces have a large number of vehicles but relatively few vehicle types, while fire services have many specialized vehicle types but fewer vehicles — so even the vehicle database structure has to change. New instances start from the closest family member, not from scratch, and requirements get renegotiated to minimize changes to the base application.
2026 Perspective — Reuse at Planetary Scale
Sommerville notes that systematic reuse was uncommon "until around 2000." In 2026, reuse is the default: npm hosts millions of JavaScript packages, PyPI hundreds of thousands for Python, and a typical web app contains far more third-party code than code its own team wrote. That flips the chapter's cost table — "finding, understanding, and adapting components" is nearly free now — but dependency risk exploded: one compromised or abandoned package can break or backdoor thousands of products. Hence SBOMs (software bills of materials), increasingly demanded by regulators and enterprise buyers, plus automated dependency scanners in every CI pipeline. The reuse benefits were real; so were the problems.
Quiz — Test Yourself
Think through your answer first, then reveal.