平台和api这两个词到底是什么意思? [英] what do the words platform and api exactly mean?

查看:33
本文介绍了平台和api这两个词到底是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我买了一本书学习 java SE 6 平台".我想知道平台这个词的真正含义是什么.原因不仅仅是我可以使用的一堆类.库下 Netbeans 中的 JDK 1.6 节点.

i've bought a book "learning the java SE 6 platform". i wonder what the word platform really means. cause isn't it just a bunch of classes that i can use. the JDK 1.6 node in Netbeans under Libraries.

API 是什么?是不是和平台一样.但是库不是一个意思吗……一堆类和一些超类等等?

And what is API? isn´t it the same thing as platform. But doesnt library mean the same thing..a bunch of classes with some superclasses and so on?

推荐答案

术语平台"用于表示任何软件、服务和资源的集合,在特定上下文中,它们被视为给定的,因此可以使用作为应用软件的构建块(或在此之上构建更高级别的平台 - 在另一种情况下被视为平台的东西)

The term "platform" is used to denote any collection of software, services and resources that, within a specific context, are considered a given so they can be used as building blocks for application software (or to build a higher level platform on top of that - something considered a platform in another context)

API 是应用程序编程接口的首字母缩写词.这通常意味着调用约定(函数签名等)的集合,应用程序(您正在编写的程序)可以使用这些约定来细读驻留在库或平台中的功能.

API is an acronym for application programming interface. This usually means the collection of calling conventions (function signatures and the like) that can be used by an application (the program you are writing) for perusing functionality residing inside a library or a platform.

API 与库不同 - 术语接口表示它仅指定您可以调用的内容以及其行为方式.实现接口的实际库可以自行决定如何提供指定的功能.

An API is not the same as a library - the term Interface conveys that it only specifies what you can call, and how that behaves. The actual library that implements the interface can decide for itself how it delivers the specified functionality.

API 的一个很好的例子是 JDBC API——这是 Java 程序与数据库通信的标准方式.每个数据库供应商都有自己的协议来连接到数据库、绑定变量等到数据库命令,但是 JDBC API 抽象了所有这些并定义了一个共同点,允许所有 Java 程序使用相同的一组函数进行对话 - 理想情况下- 任何数据库.实际提供驱动程序是数据库供应商的工作,即实现一个符合 API 的库,并且知道它如何为特定的数据库系统完成其任务.因此,在这种情况下,您有许多驱动程序库(每个供应商都有自己的,有时是多个),但它们都通过 API(在这种情况下,JDBC API - 请参阅http://java.sun.com/j2se/1.5.0/docs/api/java/sql/package-summary.html

A good example of an API is for example the JDBC API - this is the standard way for java programs to communicate with databases. Each database vendor has its own protocol for connecting to the database, binding variables and such to database commands, but the JDBC API abstracts all that and defines a common ground what allows all java programs to use the same set of functions to talk to - ideally - any database. It is the database vendor's job to actually provide a driver, that is, implement a library that is in accordance with the API and knows how it can fulfill its tasks for that particular database system. So in this case you have many driver libraries (each vendor has their own, sometimes multiple ones) but they all deliver their functionality through the same set of functions, classes etc. specified by the API (in this case, the JDBC API - see http://java.sun.com/j2se/1.5.0/docs/api/java/sql/package-summary.html

有时,API 非常广泛,以至于它被认为是一个平台,但术语平台更笼统,平台不一定是 API.例如,标准 UNIX 实用程序(如 ls、grep、cd 等)的集合可以被视为一个平台,而不是一个 API.

Sometimes, an API is so extensive that it is considered a platform, but the term platform is more general, a platform does not need to be an API. For example, the collection of standard UNIX utilities like ls, grep, cd etc. can be considered a platform, but not so much an API.

这篇关于平台和api这两个词到底是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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