术语“平台”和“框架”指的是什么?
我以前多次遇到这个问题,并再次看到这些术语,但不知道它们在计算机工程中的真正概念。
平台和框架指的是什么?
我看到很多术语,例如平台无关和开发平台,框架也一样,但我无法安静地理解它们。他们指的是图书馆吗?它们指的是不同类型的操作系统吗?
I ran into this question many times ago and have seen the terms again and didn't know their real concept in computer engineering.
What do platform and framework refer to?
I see many terms like platform-independent and development platforms, and also same for frameworks, but i can't quietly understand them. Do they refer to libraries? do they refer to different kinds of Operating-System?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
术语“框架”的定义非常明确:框架与库非常相似,只是控制是颠倒的。 (控制反转是构成框架的定义特征。) IOW:您调用库,但框架调用您。
另一种思考方式是,您编写一个应用程序,但将所有无趣的细节留空并使用库来填充它们。框架 OTOH 是一个应用程序。这是一个应用程序,其中将所有有趣详细信息留空,供您填写。(当然,在您用来填写空白的代码中,您可以依次填写自己调用库。此外,框架本身将调用库来实现其内部工作,并且框架通常捆绑有一组与框架紧密集成的库。仍然很清楚。仅仅因为框架和库一起装在一个包中并不意味着没有区别。)
然而,术语平台并没有很好的定义。它也严重超载。在移植本机应用程序的上下文中,它通常指CPU ISA(例如x86,AMD64,IA-64,POWER,MIPS,ARMv9,Sparc),硬件架构(PC,CHRP,PReP,Mac),内核( Linux、NT)和基础库(POSIX、Win32、Core Foundation)。
在更广泛的软件开发环境中,“平台”通常字面意思是“您的代码所在的平台”。对于本机应用程序,这可能与上面基本相同,对于 JVM 应用程序,它可能是 JVM 加 JRE 加 OSGI。
基本上,您可以非常字面地理解这个比喻:平台允许您(即您的代码)比没有它时站在更高的位置。
The term framework is very well defined: a framework is very similar to a library, except that Control is Inverted. (Inversion Of Control is the defining characteristic of what constitutes a framework.) IOW: you call a library, but a framework calls you.
Another way to think about it, is that you write an application, but leave all the un-interesting details blank and use libraries to fill them. A framework OTOH is an application. It is an application which has all the interesting details left blank for you to fill in. (Of course, in the code you use to fill in the blanks you can in turn call libraries yourself. Also, the framework itself will call libraries to implement its inner workings. And, frameworks usually come bundled with a rich set of libraries which are tightly integrated with the framework. However, the distinction is still clear. Just because the framework and the libraries ship together in one package doesn't mean there is no distinction.)
The term platform, however, is not so well defined. It is also heavily overloaded. In the context of porting native applications, it usually refers to the combination of CPU ISA (e.g. x86, AMD64, IA-64, POWER, MIPS, ARMv9, Sparc), hardware architecture (PC, CHRP, PReP, Mac), kernel (Linux, NT) and base libraries (POSIX, Win32, Core Foundation).
In the broader context of software development, "platform" usually literally means "that which your code stands on". For a native application, that could be basically the same as above, for a JVM application it could be the JVM plus the JRE plus OSGI.
Basically, you can take the metaphor quite literal: a platform allows you (i.e. your code) to stand on higher ground than you could without it.
平台是一个无定形术语,可以表示:
另一方面, 框架通常是工具的集合:它们可以是基于软件、硬件、方法/模式的(尽管不一定是任何特定框架中的所有这些),它们结合起来提供构建应用程序(或应用程序的特定层)的方法
框架的一些示例包括:
软件
硬件/软件
方法/模式(或流程)
Platform is an amorphous term, which can mean:
Frameworks on the other hand are usually a collection of tools: which could be software, hardware, methodology/pattern based (although not necessarily all of these in any particular framework) that combine to provide a way of building applications (or specific layers of an application)
A few examples of frameworks are:
Software
Hardware/Software
Method/Patterns (or Process)
平台通常意味着与软件运行的环境有关。因此它通常意味着操作系统(例如windows或Linux),但有时也意味着体系结构(x86可能是一个平台,或者java虚拟机)。框架通常是函数或类的集合,因此通常与库相同,或者可以以相同的方式粗略地理解。
Platform usually means something to do with the environment the software is running in. So it often means the operating system (e.g. windows or Linux), but sometimes the architecture (x86 might be a platform, or the java virtual machine). A framework is usually a collection of functions or classes so often is the same as a library, or can be roughly understood in the same way.
我将尝试平台部分:平台用于谈论您“构建”的东西,或者您可以将其视为“站立”以完成某件事的字面比喻。我使用过“电话平台”——它由软件和硬件组件组成,可以开发交互式语音应答系统。
I'll try the platform part: Platform is used to talk about something that you "build upon" or you can think of as "stand upon" for a literal analogy to get something done. I've used "telephony platforms" - which consist of software and hardware components that enable the development of interactive voice response systems.
您可以在此处阅读有关平台和软件框架的信息:
链接文本
You can have a read about Platforms and Software Frameworks here:
link text