Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF Data Service or just WCF Service?

I am trying to decide which way to go. I have a solution that needs to have a web service and a client side which is a windows phone 7 project. the WP7 project needs to communicate with the database through the WCF service.

I am a little bit confused as to which way i should choose to go, and what are the differences, advantages/disadvantages of regular WCF service file VS the WCF Data Service. Which way will be easier to go with considering my wp7 app needs to run queries on some tables on the database, nothing too fancy.

Any explanation will be welcomed. Thanks

like image 777
Michael Avatar asked Dec 21 '22 23:12

Michael


1 Answers

WCF Data Services are great if you need CRUD and flexible query capabilities - they allow you to expose underlying data (e.g. via Entity Framework) and control security with a minimum of development effort, as a RESTful API, especially to AJAX and SPA type client front ends. (Also, note that WebAPI now also offers similar capabilities).

WCF Services are more for Formal "Service" and "Operation" integration capabilities, where there is a lot more business focus, e.g. rules, processing, workflow, etc. e.g. WCF would be useful to Submit a Claim for Processing (custom / rich graph of data input and output), Trigger a Nightly batch job (void response), etc.

Also, you can combine both technologies, e.g. for a CQRS type architecture, by using Data Services for the Query, and WCF for the Command type capabilities.

like image 82
StuartLC Avatar answered Jan 09 '23 02:01

StuartLC