Bindings, Platforms, and Innovation
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
Tracking change and innovation in the enterprise software development community
Posted by Hartmut Wilms on Apr 30, 2008 02:04 PM
The .NET Framework 3.5 introduces REST-style WCF services. In addition to developing and hosting RESTful services there are several options for consuming these services.
WCF offers support for REST via "web" bindings and the Web Programming Model that allow for publishing RESTful services, which return plain XML, JSON encoding, or syndication feeds. There are many resources on the web that explain how to write such services, but very few on how to consume REST services with the .NET Framework.
In his article on "Consuming Services Using Silverlight 2.0" Simon Evan points out that there is no support for auto proxy generation as is the case for SOAP Web services:
Other services (such as REST) are a little harder to consume, and the one thing that did surprise me was that there is no support for the auto proxy generation used by ASP.net AJAX against the WebHttpBinding. You have to construct a Uri string manually and call the service either by using the WebClient class in the case of HTTP GET resuests (REST), or by using the HttpWebRequest class for other HTTP verbs. If the service uses JSON encoding, parsing the response can be achieved in one of two ways: either through WCF's DataContractJSONSerializer (similar in concept to the XmlSerializer), or by using LinqToJSON ...
Json.NET (LinqToJSON) is available on Codeplex. XML data can as easily be parsed and consumed with LINQ to XML, which is part of .NET Framework 3.5.
Pedram Rezaei explains how to develop a consumer for the "ListInteresting operation from Flickr". At first he takes a three step approach as outlined by Simon Evan:
Although this is a viable approach, Pedram criticizes that
We are not using the unified programming model offered by WCF and the URL is hacked together using string concatenation. The response is also manually deserialized into an object. With WCF and the WebHttpBinding we can automate most of this.
He then takes a "WCF approach", which consists of the following steps:
Have a look at the details in Pedram's article. Mihailo Lalevic uses the same approach for developing a consumer for the eBay API and provides a WPF sample application (source code) as an attachment to his article.
Would you enroll in an India Forex Group i.e http://www.indiaforex.com Groups?
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.
This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.
This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.
This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.
After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.
IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.
Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.
No comments
Watch Thread Reply