WCF, Web Services, or ADO.NET Data Services: What Should I Use?

For a project, I have to implement a connection between a database hosted on a web server and several clients on the Internet. After reading a little and watching some introductory videos about possible (Microsoft) technologies, I realized that I seem to have (at least) three options:

1) Windows Communication Foundation (WCF)
2) ASP.NET Web Services
3) ADO.NET Data Services

Since I am not familiar with any of these three technologies, I need to study (I hope only), one of them is in depth - and the question is: which?

Or, to be more precise: which one is performed for the next task?

Data must be downloaded from the client to the server / database, and some other data must also be downloaded. On the client side, this will not happen interactively by the user who works in the browser, but rather as an automatic process on the client that will run periodically (every 2 hours, for example).

a) On the web server side will be:

  • SQL Server Database
  • .NET Framework 3.5 SP1
  • A class library representing the database structure and modeled using the ADO.NET Entity Framework
  • (ASP.NET web application that will present the data in the database in the browser: here I put it in brackets because this web application does not really matter, since the above data will not be launched through the graphical browser interface.)

b) The client side is less understood and should be more flexible. Here I have to distinguish between two requirements:

i) Priority One (in terms of the time I have available for development):

  • The client part is under my control, this means: I have a Windows OS on the client, I can install the .NET Framework, and I can decide to create a Windows service, a console application, a Windows Forms application or something else. And I have knowledge and access to the class library mentioned above.

ii) Lower priority, but should be a future option:

  • I need to expose any description of the interface, which allows other developers to create their own applications for loading / downloading data.
  • Clients for which other developers can work can work with any OS (Windows, UNIX, MacOS, etc.). They should also be as free as possible in order to choose their preferred programming language.

Due to the last moment, forcing developers to use the .NET Framework on the client side, not an option. Client-side communication should be any “standard” technology available from various platforms and languages. I read terms like "SOAP", "REST", or "AtomPub" during my little research, and they seem to be some kind of standard protocol or communication technology (and not Microsoft's patented invention). But I’m not sure and don’t know which technology is “updated”, the “best future”, the most common and famous, is the most powerful or easiest to use (from the point of view of other possible developers! Therefore, the question is what should I support so that most client-side developers are satisfied).

Last question: safety matters! Data upload / download should be limited to designated persons. You cannot use or explore the interface without the appropriate credentials.

What technology is best to use now? (1), (2) or (3)? And why would you recommend it?

Thank you in advance for any advice!

+6
web-services wcf wcf-data-services
source share
1 answer

Well no. (2) Old-style ASP.NET web services are on their way — it's old, no longer being developed — it has been replaced by WCF.

Thus, this leaves options 1 (direct WCF) and 3 (ADO.NET Data Services - recently renamed WCF data services).

Both use WCF as the underlying technology - therefore, learning and knowing WCF is mandatory in both cases.

With direct WCF (option 1) you have more options - you can host, host your service in IIS, use different protocols and bindings, etc. But the choice comes with difficulty - you need to learn and know all this - at least to some extent. Your client should be able to speak SOAP with you - almost any language (.NET, of course, Java, Ruby, PHP - you name it) can speak SOAP anyway.

If you are mainly interested in exposing data from databases to external clients, I think WCF Data Services is really a good choice. It is based on REST, so you can access the WCF data service using a browser and just see what happens. It is powerful enough and even offers LINQ client-side support - you formulate a LINQ request and this translates to your corresponding REST call in your data service.

With the help of WCF data services, your client does not need anything but an HTTP stack, even the iPhone has this :-) But with the .NET client, everything is, of course, more pleasant and convenient and efficient.

I would say first check the WCF data service and see if it meets your needs, and if not, dig deeper into WCF. Also check out the WCF data service at a glance for input.

UPDATE:

Mark, I understand you correctly that WCF on the server fulfills this requirement? And ADO.NET data (WCF) services too?

That's right. WCF (plain or with Data Services) on the server side does NOT dictate the client in any way, form or form. You can connect your iPhone to the WCF data service if you really like it :-) WCF was designed from the ground up to be very interoperable - in fact, it is one platform that implements the industry itself WS- * standards for cross-platform communications.

+10
source share

All Articles