Difference between library, platform and framework?

旧街凉风 提交于 2019-12-10 11:16:01

问题


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.


回答1:


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 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.

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.



来源:https://stackoverflow.com/questions/48239046/difference-between-library-platform-and-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!