博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

What is a framework (From C++ FAQ)

Posted on 2007-07-17 20:58  叶落无痕  阅读(210)  评论(0编辑  收藏  举报

A framework is a set of class hierarchies plus models of interaction and cooperation between the various objects of the various hierarchies. The framework defines a generic program structure that is suitable for building a group of related applications or systems. Usually the framework provides default behavior for common situations while allowing the default behavior to be easily overridden with application-specific behavior when necessary. That is, the framework is designed to be customized for solving a specific problem or building a specific business application.

In C++, the most important artifacts in the generic program structure are usually abstract base classes (ABCs) (see FAQs 2.24, 17.03). The framework also prescribes the valid interactions among the objects. In C++, the default behavior and the ability to customize the framework is usually accomplished using inheritance and dynamic binding