Architecture, Framework, Pattern and Component
     - Reusables in Software Engineering

V.V.S.Raveendra

The words Architecture, Framework, Pattern and Component are used very often among the software engineering community. We can find a number of definitions in literature for these words. However, rarely do we find all the words examined together. Here, I make an attempt to differentiate between these words briefly.

The purpose of all these ideas is 'reuse' in software engineering. Architecture is a concept. The architecture of a software system can be documented. It is not a piece of code. Code written for an application can adhere to documented architecture. A number of applications can be developed adhering to a single architecture. Architecture is not domain dependent. Architecture of an Insurance application can be reused for a Retail application. The focus of architecture is more on non-functional aspects of a system rather than functional.

Framework is a large collection of programs. It is not a document or mere concept. A framework can be made adhering to predefined architecture. It is the largest possible code that can be reused. It can be domain independent (examples: System Infrastructure Framework, Middleware Integration Framework) or domain dependent (example: Enterprise Application Framework). Software application can be built on a framework quickly, in comparison with building from scratch.

Design patterns are recurring solutions to design problems you see over and over. Pattern is again conceptual like architecture and can be documented. It is not a program. The implementation (or code) of a pattern is specific to your application. Architecture makes software concepts reusable at a higher level and pattern at a lower level.

Component is a small collection of programs that can be reused. Interfaces are well defined. ‘Plug and Play’ is possible. Component can be domain dependent (examples: premium calculation routine, parts explosion engine) or independent (examples: event or error logging routine, calendar). Component makes code reusable on a smaller scale. Framework makes code reusable on a larger scale. Building a framework requires a lot of investment; on the other hand, building a component needs small investment.

To sum up - after determining architecture, a framework can be built following it. To build the framework a number of patterns can be used. The framework can have a number of components. All four fall in the solution space.

References:
  • Object-Oriented Application Frameworks, Fayad & Schmidt, Comm. ACM, 40(10), 1997.
  • Frameworks = (Components + Patterns), Johnson, Comm. ACM, 40(10), 1997.
  • The Design Patterns Java Companion, James Cooper, Addison-Wesley Design Patterns Series, 1998.

10 September 2003