advantages of webapi in comparison with web services and wcf - asp.net-web-api

i was asked in an interview the following question about webapi
Why we need webapi?
I told "the services that are created in webapi can be used across wide range of devices like laptop, desktop, tablet and mobiles."
Then the interviewer asked why it cannot be done using web services and wcf?
I don't know the answer.
Can anyone let me know the answer.

Copying the title of your question into a search engine yielded the following link.
WCF and ASP.NET Web API
WCF is Microsoft’s unified programming model for building
service-oriented applications. It enables developers to build secure,
reliable, transacted solutions that integrate across platforms and
interoperate with existing investments. (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 is an
ideal platform for building RESTful applications on the .NET
Framework.
There is also a table detailing when you should use which.

Related

integrating oracle hospitality pms with laravel application

How to integrate oracle hospitality opera 5.5 pms with my laravel application to get room information? Is there any REST api for connecting with this pms?
My intention is to get room owner details by passing room number to pms. Heard about fias.But how to connect with my application. Is there any proper api url?
You will need use OEDS/OWS API.
OPERA Web Services (OWS) is a collection of Windows-based Web Services that provides access to OPERA functionality, and also acts as an interface between OPERA and external applications, such as a Web booking engine.
OWS is designed using the Microsoft .NET Framework and is compatible with current versions of the Microsoft Windows® Operating System. OWS-WS uses SOAP/HTTP as a transport protocol to allow for seamless exchange of information between various applications. By focusing solely on SOAP/HTTP, this platform embraces a widely accepted standard for exposing business logic, and in part shields all parties from the low-level complexities of raw XML messaging.

what is Telerik Reporting Services and what actually needs to implemented in it?

I have been working with Telerik for a while but recently i have encountered about Telerik Reporting services.I'm most confused with telerik reporting services (REST and WCF)
What is Telerik Reporting Services ? A web services in a broad sense is way that two software systems will communicate and exchange data by a certain mutual understanding protocol.But what we are achieving with telerik reporting services .What exactly one should implement in this web services and consume
I was more worried and badly needed was what to be implemented in the service than how to implement it.Can any one tell me in an layman terms what we are implementing in the services .
Telerik Reporting Services are a set of services that allow report generation from client applications.
Based on the technology there are:
Telerik Reporting REST Service, which has two implementations based on ASP.NET WebAPI framework and ServiceStack. This service is designed for the purposes of the Telerik HTML5 Report Viewer. The service can be used directly by any third party client applications as well.
Telerik Reporting WCF Service, which is based on Windows Communication Foundation (WCF) and is designed for the purposes of the Telerik Silverlight Report Viewer. The service can be used directly by any third party client applications as well.
You can find more information in the Telerik Documentation

Hosting ASP Web API in IIS Without All The ASP Overhead?

I've read from Scott Hanselman that a self-host console application of ASP Web API has 50% speed efficiency over a traditional ASP.NET MVC Web API project, since it doesn't have as much internal overhead.
My question is, what if I want to host a Web API in IIS? Can't use a Console Application, but still want to reap the benefits of not having the entire ASP.net framework overhead for only needing a simple web API?
It is 'theoretically' possible with OWIN. Some one asked the same question here.

ASP.Net or Node.js in the following situation

Good morning,
I am going to write a web service and I am not sure which framework would suit the situation best. I understand what Node and .Net are good at.
The client will call the services at the following stages:
App loads up - user logins in via Facebook API.
User can create an "entity". This entity will be stored in a database (SQL for .Net/ Azure table for Node) and also posted to a Facebook application (timeline stuff). User can make changes to this at any time.
User can browse Facebook Friends (Facebook API again).
Changes to the entity will be pushed to all users who have "joined" the same entity (SignalR .net/Socket.io Node).
That is the skeleton of the web services, there may be more Facebook calls or CRUD operations. Which Framework will handle this best?
Many thanks.
Aside from the mentioned WebAPI, also consider the excellent ServiceStack for building a webservice.
Any well-written code regardless of the framework will be able to handle it.
If you are a .NET developer I personally think type safety of C# is important so I would not go down the Azure node.js way since it will also force me to use Azure.
I would personally use ASP.NET Web API.
As long as you build your application on a solid framework, you'll be on the bright side (assuming you know how to set-up such an application in a secure and proper manner). For .NET i'd use the Web API and for node.js i'd stick with something like express/connect.
Just keep in mind that node.js and the frameworks based on it are still subject to heavy changes, whereas ASP.NET is production-safe since years.
As a bottom line, i don't think you're able to say "X is better than Y because of Z" in this scenario. It's a matter of personal preferences, infrastructure and your technical skills.

What is the difference among Web Service, WCF and Window Service?

I got a lot of theoretical answers from Google that WCF is better than Web Service etc. etc. But I want to know from the programming and implementation point of view. I am very new to coding and want to know that how do we implement all three of these technologies? How are they different and in which scenario we should used which technologies?
Thank you in advance.
A web service is an API that is hosted for access via a network connection - often the internet - and usually accessed over HTTP (or HTTPS).
WCF is a Microsoft .NET development framework that can be used to implement web services. That is, WCF-services are a subset of all web-services.
Windows services are a separate beast entirely: they are long-running programs that run on your local Windows machine, typically with no user interaction and on system accounts. They are used to handle many things in Windows, from low-level driver functionality to software updates.
You're really comparing apples and oranges. A web service is simply a program that you can "call" using the HTTP protocol. Typically, HTTP requests sent to the service contain some XML describing the method called and any parameters. The response from the service likewise contains XML with the return value and any output parameters. It's a little more complicated than this, but it gives you the basic idea.
Windows Communication Foundation (WCF) is a framework for building network services. You can use this framework to build web services if you wish. I suspect that what's tripping you up are the various Visual Studio project templates. You have one for WCF services and one for web services. The web service template builds a web service that runs inside of IIS. The WCF template gives you far more flexibility (you can make a web service as a stand-alone application, for example), but it is far more complicated.
If you're just beginning, I'd start with web service template and IIS-based web services.
MSDN is always a good reference:
Web Service Tutorial:
http://msdn.microsoft.com/en-us/library/8wbhsy70%28VS.80%29.aspx
WCF Tutorial:
http://msdn.microsoft.com/en-us/library/ms734712.aspx
I think its always easier to learn by doing.
Good luck

Resources