Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Software framework

From Wikipedia, the free encyclopedia
Software that supports solution development via inversion of control
"Framework (computer science)" redirects here. For other uses, seeFramework (disambiguation).

Asoftware framework issoftware that provides reusable, generic functionality which developers can extend or customize to create complete solutions. It offers anabstraction layer over lower-level code and infrastructure, allowing developers to focus on implementingbusiness logic rather than building common functionality from scratch. Generally, a framework is intended to enhance productivity by allowing developers to focus on satisfying business requirements rather than reimplementing generic functionality.[1] Frameworks often include support programs,compilers,software development kits,code libraries, toolsets, andAPIs that integrate variouscomponents within a largersoftware platform or environment.

Unlike alibrary, where user code controls the program'scontrol flow, a framework implementsinversion of control by dictating the overall structure and calling user code at predefined extension points (e.g., throughtemplate methods orhooks). Frameworks also provide default behaviours that work out-of-the-box, structured mechanisms forextensibility, and a fixed core that accepts extensions (e.g., plugins or subclasses) without direct modification.

A framework differs from an application that can be extended—such as aweb browser via anextension or a video game via amod—in that it is intentionally incomplete scaffolding designed to be completed through its extension points while following specific architectural patterns. For example, a team using aweb framework to develop a banking website can focus on writing banking business logic rather than handling low-level details likeweb request processing orstate management.

Comparison with libraries

[edit]

Software frameworks differ from standard libraries in key ways:

  • Inversion of control: In a library, user code controls the program's flow and calls library functions as needed. In a framework, the framework controls the flow and calls user code at specific points, often via theTemplate Method Pattern.
  • Default behaviour: Frameworks provide pre-implemented functionality (e.g., standard features or workflows) that can be used as-is or customized within a predefined structure. Libraries, by contrast, require user code to assemble and configure functionality.
  • Structuredextensibility: Frameworks enable new features or altered behaviour through structured mechanisms such as hooks, callbacks, or APIs. Libraries allow extensibility but without predefined integration points, relying on user code for integration.
  • Open-closed principle: The framework's core logic is generally fixed, allowing extensions (e.g., plugins or subclasses) but not modification of the framework itself.

Pattern

[edit]

According to Pree,[2] software frameworks consist offrozen spots andhot 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 theTemplate Method Pattern in which thefrozen spots are known as invariant methods and thehot 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 theHollywood Principle: "Don't call us, we'll call you."[3][4] This means that the user-defined classes (for example, new subclasses) receive messages from the predefined framework classes. Developers usually handle this by implementingsuperclassabstract methods.

Tradeoffs

[edit]
icon
This sectionneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources in this section. Unsourced material may be challenged and removed.
Find sources: "Software framework" – news ·newspapers ·books ·scholar ·JSTOR
(April 2011) (Learn how and when to remove this message)

One potential downside of using a framework is that it adds to the size of a program, a phenomenon termedcode 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.[citation needed] However, once a framework is learned, development team speed may increase for future work.

Some claim that the most effective frameworks evolve fromre-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.

Examples

[edit]

A framework generally focuses on a specific problem domain, including:

Some notable frameworks:

See also

[edit]

References

[edit]
  1. ^"Framework".DocForge. Archived fromthe original on 7 October 2018. Retrieved15 December 2008.
  2. ^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, Lecture Notes in Computer Science,821,Springer-Verlag:150–162,CiteSeerX 10.1.1.74.7935,doi:10.1007/BFb0052181,ISBN 978-3-540-58202-1{{citation}}: CS1 maint: work parameter with ISBN (link)
  3. ^Larman, C (2001),Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process (2nd ed.),Prentice Hall,ISBN 978-0-13-092569-5
  4. ^Gamma, Erich;Helm, Richard;Johnson, Ralph;Vlissides, John (1994).Design Patterns. Addison-Wesley.ISBN 0-201-63361-2.
  5. ^Vlissides, J M; Linton, M A (1990), "Unidraw: a framework for building domain-specific graphical editors",ACM Transactions on Information Systems,8 (3):237–268,doi:10.1145/98188.98197,S2CID 11248368
  6. ^Johnson, R E (1992), "Documenting frameworks using patterns",Conference proceedings on Object-oriented programming systems, languages, and applications - OOPSLA '92, ACM Press, pp. 63–76,doi:10.1145/141936.141943,ISBN 0201533723,S2CID 604969
  7. ^Birrer, A; Eggenschwiler, T (1993), "Proceedings of the European conference on object-oriented programming",Frameworks in the financial engineering domain: an experience report,Springer-Verlag, pp. 21–35
  8. ^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,6:18–28,doi:10.1109/MCISE.2004.1255817,S2CID 9311752
  9. ^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,doi:10.3166/jds.12.271-280,S2CID 29690836

External links

[edit]
International
National
Other
Note: This template roughly follows the 2012ACM Computing Classification System.
Hardware
Computer systems organization
Networks
Software organization
Software notations andtools
Software development
Theory of computation
Algorithms
Mathematics ofcomputing
Information systems
Security
Human-centered computing
Concurrency
Artificial intelligence
Machine learning
Graphics
Applied computing
Specialized PlatformDevelopment
Retrieved from "https://en.wikipedia.org/w/index.php?title=Software_framework&oldid=1328125290"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp