Web Services and Data Binding?

What does it mean to bind to a web service? It's not hard to think of taking the result of a web service and binding it as input to some set of controls, but what about changes to that data? Should data from web services be read-only, requiring an explicit call to add, remove or update or should their be some standard WS-CRUD standard? What do you nice folks do?


9 comments on this post

John:


I'm not nice... which is why I'm not afraid to tell you that your model is missing a layer of abstraction, and that absraction is known as a document.

...hey, what do you know? I *am* nice. :)


Monday, Oct 17, 2005, 5:25 PM


JoeW:


I agree, a service returns data that gets applied to your document. You bind to your model - not your returned data.

Monday, Oct 17, 2005, 6:35 PM


Dave:


I try to return XmlDocument from all of my services and then de-serialize it into a bindable collection class.

On a side note, .NET 1.1 ASMX does this funny thing when you use XmlDocument as the return type. In the Reference.cs (or .vb) it writes out XmlNode and I always have to go in and change it to XmlDocument.

I don't see how you would bind to a web service though. There may be something that could be added onto WCF to make binding available, but that would be a separate API, no?

Tuesday, Oct 18, 2005, 6:44 AM


JasonCoder:


IMO this would be something that would greatly benefit some orgs. On several projects the teams look at the returned document as thier objects. It's always very frustrating. Usually degrades into cooking up datatables and shoving the document data into those and then binding. Unelegant comes to mind.

Tuesday, Oct 18, 2005, 8:19 AM


Matt Duffield:


I have designed a set of WebServices that handle our core needs for our company. I have ProcessDataRequest, ProcessSecurityRequest, ProcessLoggingRequest, etc. All of these services take in only an XmlDocument using a SOA or contract approach. This way, I can use schemas to define certain parameters and allow them to passed in a via Xml. For example, <Root><DataRequest ApplicationName='Core' Environment='DEV' StoredProcedure='GetCustomers'/></Root>. This is just a simple example but by doing this, it allows me to create a central framework and have to framework define interfaces and do all of the heavy lifting. I then allow other applications that plug-in to the framework to use these core services. My ProcessDataRequest service returns both an XmlDocument and a DataSet. I bind to either but I use a proxy that is generated by my business objects that populate and generate the DataRequest nodes. This makes the work of handling the Data Access Layer very nice since my developers do not need to maintain connection strings in their plug-ins nor do they have to write any of the data access code for generating or binding the objects returned by the services. I let my framework handle this by using some code generation and business objects. I am also taking advantage of the RAD features available by .NET 2.0 pertaining to binding to custom business objects. If you would like more information, I am currently working on an article concerning this architecture.

Tuesday, Oct 18, 2005, 7:01 PM


Mike:


Isn't this a little along the lines of what WS-Transfer was trying to do?

Wednesday, Oct 19, 2005, 2:44 AM


Ian:


*shakes head at the disturbing lack of interoperability in the above examples*

Wednesday, Oct 19, 2005, 8:43 AM


Andy Z:


My initial, knee jerk, reaction is: "Why would you want to do that?" By establishing a WS-CRUD standard we would just be furthering the misconception that web services are no more than RPC back-ends for our applications instead of stand alone autonomous services.

Thursday, Oct 27, 2005, 1:01 PM


John Wood:


Binding to a 'loosely coupled' web service just doesn't sound right. But saying that...

Personally I think we need a spec for "web queries", that is a specialization of a web service that allows you to provide where-clause expressions, some form of output translation (in XQuery?), establish a notification or polling strategy, and possibly allow for crud edits a la in-place-editing. I agree that it's a requirement because it's such a common scenario that needs a simple solution. Trying to implement this using what we have today will be like putting a square peg into a round hole.

Tuesday, Nov 8, 2005, 7:41 PM





comment on this post

HTML tags will be escaped.

Powered By ASP.NET

Hosted by SecureWebs

Microsoft

Mensa

IEEE


Best CD Rates
moving companies
addiction treatment
sunglasses
Kratom
How To Lose Weight Fast
cocktail dresses
Credit Card Balance Transfer
Add URL
Stock Trading
Health Insurance Quotes
Promotional Merchandise
Jet Privé
loans for bad credit