Web api performance?

后端 未结 1 918
闹比i
闹比i 2021-02-06 01:16

I was thinking ,

The WebApi along with routing mechanism works in such way that it reads the http verb ( GET POST etc...) and t

1条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-06 01:36

    Web api has a lot of options that you don't have with HTTP Handler if you don't code it Full list: http://www.asp.net/whitepapers/mvc4-release-notes#_Toc317096197

    • OData support (via Queryable attribute)
    • Content Negotiation
    • Filters
    • Model binding and validation
    • Ability to self host outside of IIS
    • Link generation to related resources that incorporates routing rules
    • Full support for routes/routing
    • Ability to create custom help and test pages using IApiExplorer

    Performance comparison HttpHandler vs WebAPI: http://www.west-wind.com/weblog/posts/2012/Sep/04/ASPNET-Frameworks-and-Raw-Throughput-Performance

    As always, you need to choose the the technology that suits you best, if you want performance go with Http Handler. If you want flexibility and rest go with Web API. You might want rest if you expose web services that other will consume

    0 讨论(0)
提交回复
热议问题