In computer programming, a software framework is an abstraction in which software, providing generic functionality, can be selectively changed by additional user-written code, thus providing application-specific software. It provides a standard way to build and deploy applications and is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate the development of software applications, products and solutions. Software frameworks may include support programs, compilers, code libraries, toolsets, and application programming interfaces (APIs) that bring together all the different components to enable development of a project or system.
Frameworks have key distinguishing features that separate them from normal libraries:
Software frameworks differ from standard libraries in key ways:
According to Pree, software frameworks consist of frozen spots and hot spots. Frozen spots define the overall architecture of a software system, that is to say its basic components and the relationships between them. These remain unchanged (frozen) in any instantiation of the application framework. Hot spots represent the parts where the programmers using the framework add their own code to add the functionality specific to their own project.
The necessary functionality can be implemented by using the Template Method Pattern in which the frozen spots are known as invariant methods and the hot spots are known as variant or hook methods. The invariant methods in the superclass provide default behaviour while the hook methods in each subclass provide custom behaviour.
When developing a concrete software system with a software framework, developers utilize the hot spots according to the specific needs and requirements of the system. Software frameworks rely on the Hollywood Principle: "Don't call us, we'll call you." This means that the user-defined classes (for example, new subclasses) receive messages from the predefined framework classes. Developers usually handle this by implementing superclass abstract methods.
This section needs more citations. (April 2011) |
One potential downside of using a framework is that it adds to the size of a program, a phenomenon termed code bloat. This can be exacerbated by using multiple, sometimes competing, frameworks in the same codebase.
Learning how to use a framework can be substantial. The intended efficiencies of using the framework may be outweighed by the cost to learn it, especially for a framework that is new to the development staff. However, once a framework is learned, development team speed may increase for future work. Learning how to use a framework can be substantial. The intended efficiencies of using the framework may be outweighed by the cost of learning it, especially for a framework that is new to the development staff.[5] However, once a framework is learned, development team speed may increase for future work.
Some claim that the most effective frameworks evolve from re-factoring an existing solution, such as a generic one-size-fits-all framework developed by third parties for general purposes, rather than from green-field development.
Recently, Microsoft Research launched an open-source project that covers software engineering, web navigation, and personal assistant tasks, with training data and evaluation methods available to researchers.
A framework generally focuses on a specific problem domain, including:
Some notable frameworks:
{{citation}}: Cite uses deprecated parameter |citeseerx= (help)