库、平台和框架之间的区别? [英] Difference between library, platform and framework?

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

问题描述

我遇到过 frameworklibraryplatform 等术语.例如,我们说 Spring 框架 而不是 Spring 库;正如我们所说的 Java Platform 而不是 Java LibraryJava Framework.

I have come across the terms framework, library, platform. For example, we say Spring framework and NOT Spring library; as also we say Java Platform and NOT Java Library or Java Framework.

我试图在网上进一步了解,但它们之间的区别仍不清楚.谁能帮我理解它们之间的区别.

I tried to do understand further online, but the difference in them isn't still clear. Can anyone help me understand the difference between them.

推荐答案

Library 只是一套供你使用的工具.它通常不会对您强制执行工作流,您的代码将执行库代码.Math 是一个很好的库示例.

Library is just a set of tools for you to use. It won't normally enforce a workflow on you and your code will be executing library code. Math is a good example of a library.

Framework 强制执行工作流,因为它是一个工作的东西,并且只给你扩展点来放置你的代码,它会运行你的代码并为你控制事情.例如,您无法控制 spring 框架何时调用您的控制器.您将获得有关 Spring 认为您的类是控制器需要做什么的指导.

Framework enforces workflow as it is a working thing and only gives you extension points to put your code in and it will run your code and control things for you. For example you have no control when spring framework will call your controller. You are given guidelines on what you need to do for Spring to think your class is a controller.

平台定义了一个可以围绕其开发系统的标准.它将有一组标准 API 公开特定组件(流、文件系统、端口等)供您使用.JVM 是平台和操作系统的一个很好的例子.

The platform defines a standard around which a system can be developed. It will have a set of standard APIs that expose specific components (streams, file system, ports, etc) for your use. JVM is a good example of a platform as well as operating systems.

这篇关于库、平台和框架之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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