I have planned to go for asp.net MVC4 web API. Any one can compare class library and asp.net MVC4 web API?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you use a class library it will be faster in terms of performance compared to Web API because there won’t be any serialization or I/O involved when calling a method. The drawback of a class library is that your clients need to be .NET clients. As a consequence this is not an interoperable solution. Also if you decide to make changes to the implementation later you will have to update all clients with the new version of the class library whereas with the Web API you would do it in a single location -> your web server on which the Web API is hosted.
Choosing one or the other will really depend on your scenario and architecture you are willing to support. Whether you need to expose this functionality to non .NET clients or not.