1280 views|0 replies

1662

Posts

0

Resources
The OP
 

What is an API? What is an SPI? [Copy link]

Programming Interface is an application program interface, while SPI is a service provider interface.
In JDK, it is described as follows:
· the API is the description of classes/interfaces/methods/... that you call and use to achieve a goal and
· the SPI is the description of classes/interfaces/methods/... that you extend and implement to achieve a goal

Relationship between API and SPI


Therefore, it is clear that API is an object that you can reference to achieve a certain goal. It clearly tells you what goal it can achieve, and users can plug and play; while SPI specifies that you must inherit or implement it to achieve a certain goal, and it is generally only used by some special-purpose interface developers (of course, some companies or individuals can also inherit or implement SPI to complete specific functions).
Sometimes, API and SPI are indistinguishable, such as Connection interface, Driver interface, etc.

This post is from Microcontroller MCU
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list