Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plain Web API or Web API and OData?

Tags:

I'm starting a project that has to expose a RESTful service that will be consumed by a wide variety of clients of several OSs.

I'm reading about Web API and OData using Web API and it's hard for me to decide what to use, the plain Web API or the OData one.

What are some notable pros and cons?

Update
Would you guys be kind enough and comment on why this question is "primarily opinion based"? where exactly do you see any personal opinion here?

like image 416
Shimmy Weitzhandler Avatar asked Jul 07 '15 05:07

Shimmy Weitzhandler


People also ask

What is the difference between API and OData?

The AtomPub protocol is one of the best examples of REST API design. So, in a sense you are right - the OData is just another REST API and each OData implementation is a REST-ful web service. The difference is that OData is a specific protocol; REST is architecture style and design pattern.

What is OData in Web API?

The Open Data Protocol (OData) is a data access protocol for the web. OData provides a uniform way to query and manipulate data sets through CRUD operations (create, read, update, and delete). ASP.NET Web API supports both v3 and v4 of the protocol.

When should I use OData API?

OData helps you focus on your business logic while building RESTful APIs without having to worry about the various approaches to define request and response headers, status codes, HTTP methods, URL conventions, media types, payload formats, query options, etc.

Is OData an API?

OData Published as an ISO Standard OData RESTful APIs are easy to consume. The OData metadata, a machine-readable description of the data model of the APIs, enables the creation of powerful generic client proxies and tools.


1 Answers

I've found this great post by Julie Lerman, that explains Web API and OData, and that OData is like a Web API with added a WCF-like feature set.

One of the features is easy prototypes of generic CRUD controllers.
The article is more detailed and clear.

like image 101
Shimmy Weitzhandler Avatar answered Nov 18 '22 20:11

Shimmy Weitzhandler