A framework ( English for frame structure ) is a programming framework that in the software technology , particularly in the context of object-oriented software development as well as in component-based , is used development approaches. In a more general sense, a framework is also used to describe a regulatory framework .
A framework is not itself a finished program, but provides the framework within which the programmer creates an application. a. the structure of the individual application is also influenced by the design patterns used in the framework . For example, the Microsoft Foundation Classes support the Model-View-Controller pattern .
Ralph E. Johnson and Brian Foote described a framework as follows in the article Designing Reusable Classes in the Journal of Object-Oriented Programming in 1988 :
“A framework is a semi-complete application. It provides a reusable, common structure for applications. The developers build the framework into their own application and expand it in such a way that it meets their specific requirements. Frameworks differ from toolkits in that they provide a coherent structure instead of a simple set of auxiliary classes. "
A framework therefore usually specifies the application architecture. In this case a reversal of the control takes ( Inversion of Control ) instead: The programmer registered concrete implementations , which then by the Framework are controlled and used, rather than - as in a class library to use only classes and functions -. If the registration of the specific classes is not firmly anchored in the program code, but is configured “from outside”, this is also referred to as dependency injection .
In particular, a framework defines the control flow of the application and the interfaces for the specific classes that have to be created and registered. Frameworks are therefore generally developed and used with the aim of reusing “architectural patterns”. Since such patterns cannot be designed without considering a specific application domain , frameworks are mostly domain-specific or limited to a certain type of application. Examples are frameworks for graphic editors, accounting systems or shops on the World Wide Web .
There is no general definition of frameworks due to the large number of diversity. The term is often used incorrectly for this reason, so that, for example, already ordinary class collections are incorrectly declared as framework. This is also due to the fact that the term now has a high priority in information technology and can be misused due to a lack of an absolute definition.
White box and black box frameworks
The white box and black box abstraction refers to the visibility of an implementation behind the interface. In an ideal black-box abstraction, clients do not know the details behind the interface and its specification. In a white box abstraction, the interface can still enforce encapsulation and limit what clients can do, even though the implementation allows substantial interference to be inherited . However, the implementation of a white box is completely in place and can therefore be studied to better understand what lies beneath, what constitutes the abstraction. (Some authors further distinguish between white boxes and glass boxes , with the white box allowing the implementation to be manipulated and the glass box merely allowing the implementation to be studied.)
Frameworks can also be subdivided as follows (in some cases no strict separation):
- Application Frameworks
- form the programming framework for a certain class of applications ( horizontal slice ) , which provide functions and program structures that are important for all applications of this class.
- Domain frameworks
- however, the programming framework for a certain problem area ( vertical slice ) , i.e. functions and structures that are typically required to solve this problem area.
- Class frameworks
- combine classes and methods that offer support on a specific level of abstraction for a wide range of applications.
- Component frameworks
- abstract from the object-oriented level and offer an environment for the development and integration of software components. Software components are usually viewed as a bundle of classes with clearly defined interfaces.
- Coordination frameworks
- (such as Jini and UPnP ) provide forms and facilities for device interaction and thus primarily serve their seamless and scalable interoperability. For example, if a "Jini-enabled" printer is connected to a network that uses Jini, it can independently tell other devices what kind of printer has been added - so that other devices are now "aware" of this new option.
- Testing frameworks
- are used to carry out (automated) software tests , especially in the context of test-driven development . Popular examples are JUnit for module tests or Selenium for testing web applications .
- Web frameworks
- are designed for the development of dynamic websites, web applications or web services.
Due to the imprecise definition and different usage of the term "framework", the inclusion or exclusion of the following list is not clear in many cases.
- .NET Framework from Microsoft
- 1C: Enterprise
- Action Request System (ARS) - Application Framework from BMC Remedy
- Adobe Flex
- Apache Spark
- Bootstrap Framework from Twitter
- Django (Framework)
- Eclipse Rich Client Platform
- TYPO3 Flow
- Horde (framework)
- JavaServer Faces
- JBoss Seam
- OpenIDE RCP
- Microsoft Foundation Classes
- Robot Framework
- Robot Operating System
- Ruby on Rails
- Spring (framework)
- Visual Component Library (VCL) - Borland's component library
- WoltLab Community Framework (WCF) - PHP framework
- YAML (framework) CSS framework
- Zend Framework
- Wolfgang Pree: Component-based software development with frameworks . dpunkt, 1997, ISBN 3-920993-68-3 .
- Krzysztof Cwalina, Brad Abrams: Framework Design Guidelines - Conventions, Expressions, and Patterns for Reusable .NET Libraries . Addison-Wesley, 2007, ISBN 3-8273-2626-5 .
- Ralph E. Johnson, Brian Foote: "Designing Reusable Classes" in the "Journal of Object-Oriented Programming" (1988); "A framework is a semi-complete application. A framework provides a reusable, common structure to share among applications. Developers incorporate the framework into their own application and extend it to meet their specific needs. Frameworks differ from toolkits by providing a coherent structure, rather than a simple set of utility classes. "; Source: Petar Tahchiev, Felipe Leme, Vincent Massol: JUnit in Action, 2nd edition, paperback, Manning Publications, 2010, ISBN 1935182021 , page 4
- Clemens Szyperski, Dominik Gruntz, Stephan Murer: Component Software. Beyond object-oriented programming . 2nd Edition. Addison-Wesley, London; Munich 2002, ISBN 0-201-74572-0 , p. 40 f .