80 likes | 98 Views
ASP.Net Web API was developed by Microsoft as an extensible framework for developing HTTP-based services. The HTTP-based services developed using Web API can be accessed by a wide range of clients — browsers, desktop computers and mobile devices.
E N D
ASP.Net Web API was developed by Microsoft as an extensible framework for developing HTTP-based services. The HTTP-based services developed using Web API can be accessed by a wide range of ?lie?ts — ?rowsers, desktop computers and mobile devices. Web API is used widely by developers for developing RESTful applications on top of .Net Framework. On the other hand, Nancyfx is an open source and lightweight framework for building HTTP based services on top of .Net Framework.
Nancyfx is developed using .Net Framework client profile. But design of the lightweight framework is hugely influenced by a widely used Ruby fra?ework — Si?atra. Hence, the developers can use both Web API and Nancyfx to build HTTP-based applications and services on top of .Net Framework. But the developers must remember that Web API and Nancyfx differ from each other in terms of functionality and performance. They must assess the performance of both Web API and Nancyfx to choose the right framework for building HTTP-based services.
Comparing Two Robust Frameworks for HTTP Service Development: Nancyfx vs Web API Design ASP.Net Web API was developed by Microsoft as a robust framework for developing HTTP-based services that can be consumed by a wide variety of clients. In addition to providing features to simplify HTTP-based service development, Web API is also designed as an extensible framework. On the other hand, Nancyfx is designed as a lightweight framework for developing HTTP-based services by leveraging features of .Net Framework.
Configuration In addition to being a lightweight framework, Nancyfx also emphasizes on sensible and default setup. Hence, the developers can start using Nancyfx without dealing with complex configuration. But they must configure Web API properly before developing HTTP-based services. The features provided by Visual Studio enable programmers to create Web API projects without putting extra time and effort.
MVC Architecture Support Despite being designed as a modular framework, Nancyfx does not implement MVC architecture pattern. But Web API functions just like ASP.NET MVC applications. But Web API, unlike ASP.NET applications, does not send HTML view as response. Instead it sends data as response. The feature further distinguished Web API from MVC.
Routing Web API uses convention based routing mechanism. It requires developers to define routes in the RouteCollection. While using Web API, the developers can route HTTP requests to controllers through MVC routing mechanism. But the process of defining routes may differ according to the way Web API is deployed. Nancyfx, on the other hand, supports both legacy and custom routing. It allows programmers to define routes in the constructors of a module. They can further define a route by specifying a Method, Pattern, Action, and Condition.