The Open-Closed Principle states:
Components should be open to extension but closed to modification.
This applies to components that range in size from single classes to entire systems.
The application of the principle to systems leads to the framework concept. A framework is an application that can be extended (customized) without being modified:
A framework for desktop applications can be customized into a word processor, a spreadsheet, an image editor, etc. In these cases the framework usually provides a GUI, a persistence mechanism, an error handling mechanism, and an architecture.
Here is the start of a simple framework for a Java application: