简体   繁体   English

ASP.NET Web API:目标是什么?

[英]ASP.NET Web API: what's its target?

I've been playing with ASP.NET Web API samples (http://www.asp.net/web-api/samples). 我一直在使用ASP.NET Web API示例(http://www.asp.net/web-api/samples)。

After some hours of reading articles, checking source code and so on, I got a question. 经过几个小时的阅读文章,检查源代码等等,我遇到了一个问题。

What's the target of ASP.NET Web API? ASP.NET Web API的目标是什么?

  • RESTful APIs for Web sites that look to expose some subset of their system to third-parties. 用于Web站点的RESTful API,这些API看起来会将其系统的某些子集提供给第三方。

... or/and??? ...或/和??? ... ...

  • Pure RESTful APIs that aren't necessarily for Web sites, but for creating SOA or SaaS solutions <--- This is why I'm evaluating different APIs . 纯RESTful API,不一定用于网站,而是用于创建SOA或SaaS解决方案<--- 这就是为什么我要评估不同的API

In addition, how would it perform ASP.NET Web API working with high-demand services? 另外, 它将如何与高需求服务一起执行ASP.NET Web API?

Thank you in advance for the info. 预先感谢您的信息。

Here is the short description and this should have made it super clear by now: 这是简短的描述,现在应该已经使它变得非常清晰:

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API是一个框架,可轻松构建可访问包括浏览器和移动设备在内的广泛客户端的HTTP服务。 ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework. ASP.NET Web API是在.NET Framework上构建RESTful应用程序的理想平台。

It is all about HTTP. 一切都与HTTP有关。 REST is not in your face. REST不在您的面前。 But if you wanna make your application 100% pure REST, ASP.NET Web API is your choice in .NET. 但是,如果您想使应用程序100%纯REST,则ASP.NET Web API是.NET中的选择。

As for the scale-out scenarios, ASP.NET Web API is asynchronous from top to bottom (including extensibility points) and the framework infrastructure allows you to scale out insanely. 至于横向扩展方案,ASP.NET Web API从上到下都是异步的(包括可扩展性点),并且框架基础结构允许您疯狂地横向扩展。 Of course, it doesn't prevent you to shoot yourself in the foot. 当然,这不会阻止您用脚射击。 You can still write garbage with ASP.NET Web API if you are not careful enough. 如果您不够谨慎,仍然可以使用ASP.NET Web API编写垃圾。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM