Skip to main content

Application framework versus component reuse

Short answer

Application frameworks reuse a design and architecture through white-box extension with inversion of control, requiring knowledge of internals. Component reuse composes independent black-box components through interfaces, with application code controlling flow and needing only interface specs. Frameworks are large and tied to their architecture; components are smaller, replaceable, and follow standards like EJB or .NET.

Provide a brief comparison of application framework versus component reuse.

An application framework is a reusable sub-system design made of a collection of abstract and concrete classes and the interfaces between them. An application is built by extending the framework (adding subclasses and filling in "hot spots"). Component reuse means building an application by composing independent, ready-made components that are used through their published interfaces.

PointApplication frameworkComponent reuse
What is reusedA design plus code: a skeleton of a whole application or sub-systemIndividual, self-contained components
GranularityLargeSmall to medium
Reuse styleWhite-box: extended by subclassing and overriding methodsBlack-box: used only through interfaces
Control flowInversion of control: framework calls the application code ("don't call us, we'll call you")Application code calls the components
Knowledge neededMust understand the framework's internal design; steep learning curveNeed to know only the interface specification
IndependenceTied to the framework's language and architectureIndependent and replaceable; deployed separately
StandardsDefined by the framework itselfComponent models such as EJB, .NET, CORBA CCM
ExamplesMVC frameworks (Spring MVC, Django), GUI frameworks, Java SwingPayment gateway component, report generator component, ActiveX/.NET controls

In short: frameworks reuse a design and architecture and are customised from inside; components reuse implemented services and are plugged together from outside. They are often combined, e.g. a web application built on a framework that also uses third-party components.

✓ Answer checked by Claude Sonnet 5.5

All Software Engineering chapter 5 questions →