转载自Stack Overflow,原文地址:http://stackoverflow.com/questions/2954372/difference-between-spi-and-api
What is the difference between Service Provider Interface (SPI) and Application Programming Interface (API)?
More specifically, for Java libraries, what makes them an API and/or SPI?
the API is the description of classes/interfaces/methods/... that you
call and use to achieve a goal
the SPI is the description of classes/interfaces/methods/... that you
extend and implement to achieve a goal
Put differently, the API tells you what a specific class/method does for you and the SPI tells you what you must do to conform.
Sometimes SPI and API overlap. For example in JDBC the Driver class is part of the SPI: If you simply want to use JDBC, you don't need to use it directly, but everyone who implements a JDBC driver must implement that class.
The Connection interface on the other hand is both SPI and API: You use it routinely when you use a JDBC driver and it needs to be implemented by the developer of the JDBC driver.
分享到:
相关推荐
用28335写的:SPI读取传感器的输出,并通过ECAN送出来。
赠送原API文档:springfox-spi-2.7.0-javadoc.jar; 赠送源代码:springfox-spi-2.7.0-sources.jar; 赠送Maven依赖信息文件:springfox-spi-2.7.0.pom; 包含翻译后的API文档:springfox-spi-2.7.0-javadoc-API文档...
STM32F103实验:SPI程序源代码。 1、开发环境:KEIL。 2、编程语言:C语言。
第十一节: SPI读写串行FLASH.pdf
msp430f2系列的资料:SPI。(中文)
赠送原API文档:springfox-spi-2.9.2-javadoc.jar; 赠送源代码:springfox-spi-2.9.2-sources.jar; 赠送Maven依赖信息文件:springfox-spi-2.9.2.pom; 包含翻译后的API文档:springfox-spi-2.9.2-javadoc-API文档...
赠送原API文档:springfox-spi-2.4.0-javadoc.jar; 赠送源代码:springfox-spi-2.4.0-sources.jar; 包含翻译后的API文档:springfox-spi-2.4.0-javadoc-API文档-中文(简体)版.zip 对应Maven信息:groupId:io....
赠送原API文档:springfox-spi-3.0.0-javadoc.jar; 赠送源代码:springfox-spi-3.0.0-sources.jar; 赠送Maven依赖信息文件:springfox-spi-3.0.0.pom; 包含翻译后的API文档:springfox-spi-3.0.0-javadoc-API文档...
赠送原API文档:springfox-spi-2.4.0-javadoc.jar 赠送源代码:springfox-spi-2.4.0-sources.jar 包含翻译后的API文档:springfox-spi-2.4.0-javadoc-API文档-中文(简体)-英语-对照版.zip 对应Maven信息:groupId...
SPI 1 2 SPI简介 SPI配置 SPI简介 SPI简介 1 LoRa芯片与MCU通过SPI进行通信。SPI(Serial Peripheral ...可以看出虽然SPI也是串行通信协议,但是主机所占用的引脚依然比I2C和UART的多,而且主机引脚数量会随着从机
赠送原API文档:springfox-spi-2.7.0-javadoc.jar; 赠送源代码:springfox-spi-2.7.0-sources.jar; 赠送Maven依赖信息文件:springfox-spi-2.7.0.pom; 包含翻译后的API文档:springfox-spi-2.7.0-javadoc-API文档...
赠送原API文档:springfox-spi-3.0.0-javadoc.jar; 赠送源代码:springfox-spi-3.0.0-sources.jar; 赠送Maven依赖信息文件:springfox-spi-3.0.0.pom; 包含翻译后的API文档:springfox-spi-3.0.0-javadoc-API文档...
SPI库函数配置中,结构体成员有SPI_NSS这个东西,这个东西是什么意思,当时看着是不知所云。 经过不断查找资料得出以下答案: 软件模式: SPI_InitStructure.SPI_NSS = SPI_NSS_Soft; 硬件模式 SPI_InitStructure....
51单片机开发板实验:SPI总线上挂接多个X5045的读写操作程序源代码。 1、开发环境:KEIL。 2、编程语言:C语言。
NULL 博文链接:https://k1121.iteye.com/blog/2275121
wosa_xfs实例(从SPI到API),从底层SPI开发到中间层,最后到API的调用
SPI(Service Provider Interface)是 Java 中一种基于接口的服务发现机制,旨在实现代码解耦和可扩展性。通过 SPI,开发者可以定义一组接口,而具体的实现则由不同的提供者来提供,实现了解耦的目的。 SPI 机制使得...
赠送原API文档:springfox-spi-2.2.2-javadoc.jar; 赠送源代码:springfox-spi-2.2.2-sources.jar; 赠送Maven依赖信息文件:springfox-spi-2.2.2.pom; 包含翻译后的API文档:springfox-spi-2.2.2-javadoc-API文档...
SPI 协议包括了主从结构、全双工通信和时钟同步等特点。下面是 SPI 协议的基本特性: 主从结构: SPI 包括一个主设备和一个或多个从设备。主设备负责生成时钟信号和控制通信过程,而从设备在主设备的控制下进行数据...
描述: SPI(串行外设接口)从机基于输入配置创建从机。在 MOSI 上一次接收一个字节还将在 MISO 上一次推出一个字节数据。任何有关输入字节的数据都将在 MISO 上运出。保持CS_n时,支持每个事务多个字节交易期间较低...