What's the practical definition of software/programming framework?
The article in Wikipedia seems too verbose.
I understand framework as a well designed set of libraries and tools. The Qt framework provides a set of libraries/tools for cross pla开发者_Python百科tform GUIs. The cocoa framework does the same thing for Mac.
What's the practical definition of software framework?
If you define the overall program structure yourself, but use prebuilt building blocks and primitives for some operations you are using a library.
A framework on the other hand defines the overall program structure for you, letting you add and extend functionality at predefined extension points.
Looks like the answer's in your question.
It's an integrated set of libraries that abstracts some parts of the underlying language or architecture and provides tools that are commonly used in the specific area for which it was designed (e.g. a web framework will have tools to deal with HTML).
The first section of that definition is about as terse as I can imagine the definition for something as vague and nebulous as a software framework could be. From Wikipedia (to save others browsing for it) :
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 a special case of software libraries in that they are reusable abstractions of code wrapped in a well-defined API, yet they contain some key distinguishing features that separate them from normal libraries. 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 extend the framework, but not modify its code.
精彩评论