框架和工具箱之间的主要区别是什么? [英] What is the major difference between a framework and a toolkit?

查看:320
本文介绍了框架和工具箱之间的主要区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

框架是否允许您抽象泛型代码 - 但不是完整的方式(例如:抽象一个网络连接 - 但不是您实际上对数据做什么),并且不解决任何特定的通用需求,而工具包通用问题的解决方案(例如:对话框小部件)?

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?

推荐答案

框架强制开发人员设计一些模式,并为代码生成提供一些工具。这与我的第一句话很吻合,因为它以特定的样式/模式生成代码。

Library为您提供了功能,供您随意使用。就像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

这篇关于框架和工具箱之间的主要区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆