I've heard these terms used seemingly interchangeably, so I'm a little unclear. Please cite examples.
相关问题
- Is divide by zero an error or an exception?
- I have some questions about Sapper/Svelte
- C# .NET 4.0 Testing Framework?
- How to force Wicket “onchange” AJAX events to be t
- Schema specified is not valid. Errors: 'System
相关文章
- Are there any reasons not to use “this” (“Self”, “
- Call/Return feature of classic C++(C with Classes)
- What are the major differences between C and C++ a
- Swift and Objective-c framework exposes its intern
- Anyone know about Rhomobile?
- State Machine Framework for JBoss/Java? [closed]
- Implement a mutex in Java using atomic variables
- ERROR: iPhone Private Frameworks “No such file or
http://indiegamesguild.com/sgtflame/2010/02/23/frameworks-vs-engines/
Does that answer it?
AFAIK a framework is the structure on which you build your applications. It differs from libraries in that it has inversion of control (i.e. in libraries, you call a subroutine from your code and so you have control; but in frameworks, you bind your subroutines to the framework and it calls your subroutine as and when needed - so the control is with the framework).
An engine is a totally different concept - it's a hybrid between a framework and a library. Like a framework, it has control over the application. However unlike a framework, you don't bind your subroutines to the engine but use its built in API to perform certain tasks (which is like a library).
In summary, a framework is the structure of the application which you can extend and tailor by binding your subroutines to it. OTOH, an engine is the main application itself which you can simply instruct to do what you want it to, using its public API.
Thus, frameworks are more flexible. However, an engine is a working application - so it gets the job done faster because the programmer doesn't need to waste time re-inventing the wheel. He can simply instruct the engine what to do and the engine will handle the internal operations.
A simple multiplication program.
Instead of writing code for converting string to int and then presenting to engine, you have another code which converts it for you. This simplification code is a framework.
Framework examples:
Engine examples:
A survey of different types of each gives a clue...
Engines
Analytical engine, a concept for a computer, designed by Charles Babbage
Frameworks
Artistic drawing, music composition, and mechanical CAD
A framework is something like a set of libraries that are meant to be able to work together. It's meant so you don't need to go around implementing common algorithms, and data structures. You use those libraries (the framework) to arrange them in a way so the functionality they provide helps you solve a problem.
An engine is a system, you feed it with data and it does it's job.
It's worth noting that a library can have an "engine" and an engine can be built using a framework.
These terms, and others, do seem very similar. They're named from a conceptual standpoint, and so could be defined as follows: