平台和框架有什么区别? [英] What is the difference between a platform and a framework?

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

问题描述

有几个关于 Stack Overflow 的主题和网络上的帖子解决了这个问题:

There are a couple of topics on Stack Overflow and posts on the web addressing this question:

但是,它们都不能真正帮助我理解框架和平台之间的实际差异.

However, none of them really help me understand the actual differences between a framework and a platform as I conceive of them.

我的意思的例子:

  • 框架:Rails、Django 或 Laravel.
  • 平台:Node.JS 或 Meteor

在上述示例中,框架与平台的区别究竟是什么?

What exactly sets apart a framework from a platform in the above examples?

推荐答案

框架

可以将框架比作需要附上一些肉的骨架.这种程序化的肉体通常由链接到并使用部分骨架的特定应用程序提供.所以实际的工作,即.填充孔和连接点由应用程序完成.

A framework could be compared to a skeleton which needs to get some flesh attached to it. This programmatic flesh is usually provided by a specific application that links to and uses parts of the skeleton. So the actual work, ie. filling the holes and connecting the dots, is done by the application.

在编程中,框架允许程序员专注于他们面临的实际任务,而不是浪费时间重新发明轮子.通常,框架附带一组预定义的函数和类.例如,在使用 Spring (Java) 或 Symfony (PHP) 时,程序员无需过多考虑诸如持久性、路由和会话管理之类的事情,因为这些工作是由标准化的框架组件完成的.

In programming, frameworks allow programmers to concentrate on the actual tasks they are faced with rather than to waste their time reinventing the wheel. Usually, frameworks are shipped with a set of predefined functions and classes. When using Spring (Java) or Symfony (PHP) for example, programmers do not need to think about things such as persistence, routing and session management too much because the work is done by standardized framework components.

平台

另一方面,平台提供运行应用程序所需的硬件和软件工具——无论是独立程序还是构建在框架之上的程序.大多数情况下,它具有平台即服务 (PaaS) 的风格,这意味着平台软件本身的代码基础没有分发或许可.相反,它是在云中运行的托管解决方案的一部分,可以通过 API 或 GUI 访问.

A platform, on the other hand, provides both the hardware and the software tools needed to run an application - be it a standalone program or one which has been built on top of a framework. Mostly, it comes in the flavor of Platform-as-a-Service (PaaS), meaning that the code-basis of the platform software itself is not distributed or licensed. Rather, it is part of a hosted solution running in a cloud which can be accessed via APIs or GUIs.

通常,平台构建为可扩展的多租户系统,同时为许多用户提供访问权限,从而利用规模经济以可承受的价格提供服务.然后,开发人员可以使用 force.com 或 Google App Engine 等平台来构建和运行自己的应用程序.在许多情况下,这些应用程序比独立程序更轻量级,因为大部分业务逻辑都包含在平台中.

Typically, platforms are built as scalable multi-tenancy systems, providing access to many users at the same time, thus using economies of scale to be able to offer services with an affordable price tag. Developers can then use platforms such as force.com or Google App Engine to build and run their own applications. In many cases, these applications are more light-weight than standalone programs because most of the business logic is contained in the platform.

来源:https://commercetools.com/blog/2015/11/19/framework-vs-platform.html

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

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