A software framework, in computer programming, is an abstraction in which common code providing generic functionality can be selectively overridden or specialized by user code providing specific functionality. Frameworks are similar to software libraries in that they are reusable abstractions of code wrapped in a well-defined API.
Software frameworks have these distinguishing features that separate them from libraries or normal user applications:
- inversion of control - In a framework, unlike in libraries or normal user applications, the overall program's flow of control is not dictated by the caller, but by the framework.[1]
- default behavior - A framework has a default behavior. This default behavior must actually be some useful behavior and not a series of no-ops.
- extensibility - A framework can be extended by the user usually by selective overriding or specialized by user code providing specific functionality
- non-modifiable framework code - The framework code, in general, is not allowed to be modified. Users can extended the framework, but not modify its code.
Rationale
The designers of software frameworks aim to facilitate software development by allowing designers and programmers to devote their time to meeting software requirements rather than dealing with the more standard low-level details of providing a working system, thereby reducing overall development time.[2] For example, a team using a web application framework to develop a banking web site can focus on the operations of account withdrawals rather than the mechanics of request handling and state management.
Criticism
It can be argued that frameworks add to "code bloat", and that due to competing and complementary frameworks and the complexity of their APIs, the intended reduction in overall development time may not be achieved due to the need to spend additional time learning to use the framework. Of course once the framework is learned future projects might be quicker and easier to complete. The most effective frameworks turn out to be those that evolve from re-factoring the common code of the enterprise, as opposed to using a generic "one-size-fits-all" framework developed by third-parties for general purposes.[citation needed]
Examples
Software frameworks typically contain a considerable housekeeping and utility code in order to help bootstrap user applications, but generally focus on specific problem domains, such as:
- Artistic drawing, music composition, and mechanical CAD[3][4]
- Compilers for different programming languages and target machines.[5]
- Financial modeling applications[6]
- Earth system modeling applications[7]
- Decision support systems[8]
- Media playback and authoring
- Web applications
- Middleware
Architecture
According to Pree,[9]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 those parts where the programmers using the framework add their own code to add the functionality specific to their own project.
Software frameworks define the places in the architecture where application programmers may make adaptations for specific functionality—the hot spots.
In an object-oriented environment, a framework consists of abstract and concrete classes. Instantiation of such a framework consists of composing and subclassing the existing classes.[10]
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."[11] 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.
List of general-purpose frameworks
- ActionScript Foundry is an open source Flex framework written in ActionScript 3 and Java.
- BFC is a RAD framework for developing database-centric distributed computing applications in a .NET environment.
- CodeIgniter is an open source application framework for PHP Platform.
- Component-based Scalable Logical Architecture (CSLA) is a standard way to create robust object oriented programs using business objects, implemented using .NET.
- CNI (Compiled Native Interface) is a software framework for the GNU GCJ compiler which allows Java code to call and be called by native applications (programs specific to a hardware and operating system platform) and libraries written in C++.
- Google Web Toolkit (GWT) is an open source Java software development framework.
- Java Native Interface (JNI) allows Java code running in the Java virtual machine (VM) to call and be called by native applications (programs specific to a hardware and operating system platform) and libraries written in other languages, such as C, C++ and assembly.
- Leonardi is an open source application framework for GUI applications.
- MARF is an open source general purpose Java pattern recognition framework.
- Rails is a Free Software application framework for the Ruby Platform.
- Spring is an open source application framework for the Java platform.
- JSF is an open source application framework for the Java platform, which uses component based and event-driven approach for rapid application development.
- Symfony is an open source application framework for PHP Platform.
- Twisted is an open source event-driven application framework written in Python for developing Internet applications.
- Zend Framework is a powerful and extensible application framework, with a loosely-coupled component library for PHP Platform.
See also
- Application framework
- Class (computer science)
- Design pattern (computer science)
- Don't repeat yourself
- Enterprise Architecture framework
- Implicit invocation
- Jini | Upnp | Salutation which have been called coordination frameworks.
- Programming paradigm
- Web application framework
External links
- Annual frameworks conference
- Frameworks vs. Libraries
- What is framework?
- A Quest to Define a Framework
- D4: A Pattern Language for Designing, Developing, Documenting and Deploying Object-Oriented Software Frameworks
- Ammerse, Principles for designing software frameworks
- A guide for Building Frameworks
References
- ^ Riehle, Dirk (2000), Framework Design: A Role Modeling Approach, Swiss Federal Institute of Technology, http://www.riehle.org/computer-science/research/dissertation/diss-a4.pdf
- ^ "Framework". DocForge. http://docforge.com/wiki/Framework. Retrieved 15 December 2008.
- ^ Vlissides, J M; Linton, M A (1990), "Unidraw: a framework for building domain-specific graphical editors", ACM Transactions of Information Systems 8 (3): 237-268
- ^ Johnson, R E (1992), "Documenting frameworks using patterns", Proceedings of The Conference on Object Oriented Programming Systems Languages and Applications (ACM Press): 63-76
- ^ Johnson, R E; McConnell, C; Lake, M J (1992), Giegerich, R; Graham, S L, eds., "The RTL system: a framework for code optimization", Proceedings of the International workshop on code generation (Springer-Verlag): 255-274
- ^ Birrer, A; Eggenschwiler, T (1993), Proceedings of the European conference on object-oriented programming, Springer-Verlag, pp. 21-35
- ^ Hill, C; DeLuca, C; Balaji, V; Suarez, M; da Silva, A (2004), "Architecture of the Earth System Modeling Framework (ESMF)", Computing in Science and Engineering: 18-28
- ^ Gachet, A (2003), "Software Frameworks for Developing Decision Support Systems - A New Component in the Classification of DSS Development Tools", Journal of Decision Systems 12 (3): 271-281
- ^ Pree, W (1994), "Meta Patterns-A Means For Capturing the Essentials of Reusable Object-Oriented Design", Proceedings of the 8th European Conference on Object-Oriented Programming (Springer-Verlag): 150-162
- ^ Buschmann, F (1996), Pattern-Oriented Software Architecture Volume 1: A System of Patterns. Chichester, Wiley, ISBN 0471958697
- ^ Larman, C (2001), Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process (2nd ed.), Prentice Hall, ISBN 0130925691
Recent Comments