Microsoft recently released SP1 for .NET. While the SP brings some nice stuff it seems it also has some bugs and a few less than inspiring components
Another example for a less than stellar idea is the "ADO.NET data services" component. Before I go on to explain why I think that. I should probably mention that this isn't just a Microsoft thing as IBM also mentions similar ideas as part of their (broader and sometimes even worse) view of "Information as a Service"

So why is exposing the database through a web-service (RESTful or otherwise) is wrong? let me count the ways
  1. It circumvents the whole idea about "Services" - there's no business logic
  2. It makes for CRUD resources/services
  3. It is exposing internal database structure or data rather than a thought-out contract
  4. It encourages bypassing real services and going straight to their data
  5. It creates a blob service (the data source)
  6. It encourages minuscule demi-serices (the multiple "interfaces" of said blob) that disregard few of the fallacies of distributed computing
  7. It is just client-server in sheep's clothing
When it comes for ADO.NET data services you can add a few other problems like
  1. it isn't really RESTful - you can also "enhance" the services with operations like example 18 in "Using ADO.NET data services" : http://host/vdir/northwind.svc/CustomersByCity?city=London (though it does support caching and hypermedia )
  2. Also it doesn't really externalize a state machine it externalizes a relational model
  3. It is built on Entity Services.

 
Monday, August 18, 2008 6:42:57 PM (GMT Standard Time, UTC+00:00)
Someone left here a comment which I deleted by mistake. Here is what the guy said:
"I agree with it not being the best way to expose business logic - but for querying data from, say, an ad-hoc reporting tool using Silverlight application hitting ADO.NET Data Services in read-only mode, it's pretty slick (there are other questions to be answered there, such as security and DoS attacks, but hey, ADO.NET DS is a CTP, right?).

So my vote is if you need queryability + services, then ADO.NET Data Services in read-only mode + a custom WCF service with operations might be the way to go."

My answer to this is that I didn't say there is no scenario in the world that Data as a Service can't fit. I do think that it is a very bad idea as a recommended practice or a tool from a vendor.
I should also say that in my opinion the scenario in the comment above is not a good fit for ADO.NET data service.I would hesitate to allow "ad-hoc reporting tool" hitting a database directly in almost any circumstances

Arnon
Wednesday, August 27, 2008 2:58:20 PM (GMT Standard Time, UTC+00:00)
When asked about data as a service, I usually respond by asking if they care about their data. And if they do, I start asking how they will manage transactions. And then I ask if they are comfortable letting some external entity control a database transaction and database locks inside their database. The conversation usually doesn't get much farther.
Evan
Comments are closed.