問題描述
框架是否允許您抽象通用代碼 - 但不是以完整的方式(例如:抽象網絡連接 - 但不是您對數據的實際操作),并且不能解決任何特定的常見需求,而工具包有一般問題的解決方案(例如:對話框小部件)?
Does a framework allow you to abstract generic code - but not in a complete way (Ex: Abstract a network connection - but not what you actually do with the data), and does not solve any particular common requirement whereas a toolkit has solutions to generic problems(Ex: Dialog box widget)?
真實世界示例:Prototype 是一個框架",但 Dojo 是一個工具包".
Real world Example: Prototype is a "framework", but Dojo is a "toolkit".
所以我的問題是,將某物稱為框架與將其稱為工具包的標準是什么?
So my question is, what is the criteria to call something a framework vs calling it a toolkit?
推薦答案
Framework 對開發人員強制執行一些設計模式,并提供一些代碼生成工具.這與我的第一句話很吻合,因為它以某種樣式/模式生成代碼.
庫為您提供了您希望使用的功能.像 C 的 stdio 函數一樣,C# 控制臺、PHP 等內置"函數
您可以將庫視為一種 API
Framework enforces some design pattern on the developer and give some tools for code generation. This sits well with my first sentence, as it generates code in a certain style/pattern.
Library gives you functionality for you to use as you wish. Like the stdio functions of C,
Console of C#, The "built in" functions of PHP etc
You can regard a library as a kind of API
這篇關于框架和工具包之間的主要區別是什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!