API、框架和中间件有什么区别? [英] What is the difference between an API , framework and middleware?

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

问题描述

我脑子里突然想到了这个问题!API,框架和中间件之间有什么区别?基本上所有这些都为应用程序提供抽象的低级服务.那为什么dot net叫framework,windows API叫好..API?

Just Randomly got this question in my head! Whats the difference between API , Framework and middleware? Essentially all of them provide abstract low level services to apps. In that case why is dot net called framework and windows API called well.. API?

推荐答案

API 是应用程序程序员接口.它只是一个术语,指的是程序员将用于与软件交互的方法.例如,一个 DAO 可能有一个 save() 方法.保存是 DAO API 的一部分.在较高级别,您可能具有将用户添加到系统功能.这是系统 API 的一部分.

An API is an Application Programmer Interface. Its just a term that refers to the methods a programmer will use to interface with the software. For example, a DAO might have a save() method. Save is part of the DAO API. At a high level, you might have an Add User to System functionality. Thats part of the system API.

框架是一个工具或一组工具.例如,Spring 是一个框架,可以管理您的控制反转、依赖注入,并提供漂亮的模板让您的生活更轻松.您可以通过其 API 使用 Spring.

A framework is a tool or set of tools. For example, Spring is a framework that manages your inversion of control, dependency injection, and provides nifty templates to make your life easier. You use Spring via its API.

中间件是允许一堆孤立的系统或功能进行交互的软件.所以如果你有一个网站和一个支付系统,你就可以使用中间件来连接.

Middleware is software that allows a bunch of isolated systems or functionalities to interact. So if you have a website, and a payment system, you use middleware to hookem up.

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

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