Showing posts with label SOAP. Show all posts
Showing posts with label SOAP. Show all posts

Saturday, November 01, 2008

SQL Data Services (SDS) Test Harness Updated to the Windows Azure Services Platform

The original Windows form test harness for SQL Server Data Services (SSDS) from my “Test-Drive SQL Server Data Services” cover article for the July 2008 issue of Visual Studio Magazine has been updated to SQL Data Services (SDS) Sprint #5, which now runs on the Windows Azure Services Platform.

Update 11/1/2008: Users with SSDS accounts now have have access to SDS authorities, but SSDS containers won’t be migrated to SDS until mid-November. See the SQL Data Services (SDS) Update announcement in the recently renamed SQL Data Services (SDS) - Getting Started forum.

Here’s a screen capture of the new SDSNwindEntitiesAzure.sln project in the process of uploading Northwind Orders entities to the oakleaf authority’s Northwind container using the SOAP protocol:

And here’s the same capture proceeding with the REST protocol with the Orders template:

The following project modifications were required to upgrade from Sprint #3 running on SSDS to Sprint #5 running on Windows Azure:

  1. The time to log in and list authorities, containers, and entities with the SOAP protocol has dropped by 50% (~20 secs. to ~10 secs.), but this still appears rather slow to me.
  2. Time to upload the entire Nothwind sample database (without bitmapped images) is 455 sec. with the SOAP protocol and 964 secs. with the REST wire format. The discrepancy between REST and SOAP upload times is greater than with SSDS Sprint #3.
  3. Only minor changes were required to the source code to support the move from https://data.beta.mssds.com/v1/ to https://data.database.windows.net/v1/.
  4. The SitkaClient service client must be recreated from the new location rather than updated. You’ll find substantial additions to App.config and Web.config files to support Azure’s .NET Services.
  5. You must specify the endpoint Name in using (SitkaSoapServiceClient proxy = new SitkaSoapServiceClient("BasicAuthEndpoint")) statements because there are now multiple client endpoints defined in App.config.
  6. REST code required no significant changes for the move to Azure.

Here’s the Azure Services Platform Management Console displaying a few Order entities:

You can download the C# source code from SkyDrive by clicking here. Mark the Use Folder Names check box to expand the files to a \SDSNwindEntitiesAzure folder and subfolders. The source code’s Readme file includes operating instructions.

Tuesday, July 29, 2008

LINQ and Entity Framework Posts for 7/28/2008+

Note: This post is updated daily or more frequently, depending on the availability of new articles.

“Generate Web Sites Automatically” Cover Story About ASP.NET Dynamic Data for Visual Studio Magazine

My “Generate Web Sites Automatically” cover story for the August 2008 issue of Visual Studio Magazine is available from the above link or by clicking the cover image.

Visual Studio 2008 Service Pack 1's new ASP.NET Dynamic Data templates automatically generate code for DataGrid, ListView, DetailsView, and FormView display and editing controls on dynamic pages derived from a master page and CSS stylesheet. Dynamic Data leverages AJAX to smooth page transitions and delivers scaffolding for codeless, key-based page routing with Entity Framework or LINQ to SQL object/relational mapping tools.

Read more about it in my “Generate Web Sites Automatically” Cover Story About ASP.NET Dynamic Data for Visual Studio Magazine post of July 29, 2008

“A Vote for Transparency” Guest Opinion for Visual Studio Magazine’s August 2008 Issue

My “Guest Opinion: A Vote for Transparency” about Entity Framework’s overdue move to more transparency in its design process for the August 2008 issue of Visual Studio Magazine is available from the above link or by clicking the cover image.

My take is that the Data Programmability group’s Entity Framework team could have saved themselves considerable grief, consternation, and bad press if they had initiated the Entity Data Model and Entity Framework project with the Astoria Team’s approach.

Read more about it in my “A Vote for Transparency” Guest Opinion for Visual Studio Magazine’s August 2008 Issue post of July 29, 2008.

Lazy Loading With The LazyList

LINQ to SQL log to debug window, file, memory or multiple writers

Overloading Entity Framework Methods: More GetObjectStateEntries

Implementing IExpandProvider for NHibernate.LINQ

Handy Visual Studio Add-In to View Office 2007 Files

Steve Naughton Completes His Dynamic Data and Field Templates  Series with an AutoCompleteFilter Web Service

Steve’s An Advanced FieldTemplate post of July 29, 2008 is the final episode of his three-part Dynamic Data and Field Templates Series. In part 3:

[W]e are going to use the AutoCompleteFilter web service from Dynamic Data Futures example to make an AutoCompleteText_Edit FieldTemplate. What this will do is look up values in the column that we are editing for matches i.e. if we had a column for category names and we typed in con we may get list like Condiments, Confections, Containers etc.

The first two parts are:

  1. The Anatomy of a FieldTemplate.
  2. Your First FieldTemplate.

Michael Arrington: Yahoo, Intel and HP Hype Vaporware in the Cloud

TechCrunch’s Mike Arrington posts Cloud Computing Test Bed: Live Notes From The Conference Call, a blow-by-blow account of a July 29, 2008 conference call announcing participation by Yahoo, Intel and HP in “a globally distributed, Internet-scale testing environment designed to encourage research on the software, data center management and hardware issues associated with cloud computing at a larger scale than ever before.”

My comment to the post is:

This is simply hype to prevent the real players, Amazon, Google and Microsoft (and potentially IBM) from monopolizing the PR chips. IBM’s Blue Cloud “initiative” started with similar blather from the flacks and, as far as I can determine, went nowhere.

Mike’s later HP, Yahoo, Intel Launch Cloud Computing Test Bed post the same day has more agitprop about the six erstwhile “centers of excellence.”

GigaOm’s Stacey Higginbotham’s HP, Yahoo and Intel Create Compute Cloud post of the same date has additional background on the project, which will restrict “access to academics and research institutions trying to build out services and work within the clouds.”

The test bed project has the same odor as IBM’s Blue Cloud project that IBM announced last year. Here’s my recent take on Blue Cloud from my All’s Quiet on the SQL Server Data Services Front post of June 17, 2008:

Backstory: IBM’s November 15, 2007 announcement of its Blue Cloud distributed computing initiative generated 754,000 hits for the past year with a Google search on ibm “blue cloud”. Only 39,300 hits occurred in the past three months, which indicates quickly diminishing interest as Big Blue failed to expose its purported service to actual users.

A possible reason for the reduced press coverage is the company’s schizophrenic view of cloud computing, as reported by RedMonk’s Michael Coté in the “IBM and cloud computing” topic of his May 27, 2008 IBM Tivoli Pulse: Tivoli product updates and cloud confusion article for SearchDataCenter.com. Meanwhile, Amazon and Google maintain their headlock on what cloud mindshare there exists among developers.

According to a subsequent IBM press release, IBM opens Africa’s first “cloud computing” center, second cloud center in China, IBM currently has three “cloud computing centers” in Dublin, Beijing, and Johannesburg.

That’s a lot of computing horsepower for a customer list limited to “Wuxi City of China, Sogeti, the Local Professional Services Division of Capgemini, the Vietnamese government institutions and universities, and iTricity, a computing host service company based in the Netherlands.” It’s surprising that IBM couldn’t come up with a more inspiring customer list.

Jamie Thompson Posts a SQL Server Data Services Console Application on Codeplex

Jamie’s SSDS demo code now on Codeplex post of July 29, 2008 contains a link to the source code for a simple .NET console project that creates an authority and container, and then adds a entity to the container.

Mike Taulty Posts Four More ADO.NET Data Services Screencasts

So far, Mike hasn’t gotten around to posting about these four Screencasts added to his Channel 9 collection on July 29, 2008:

  • ADO.NET Data Services (VS08 Sp1 B1), Optimistic Concurrency: With Data Services, it's most likely that you'd use an optimistic locking strategy for the underlying data and the framework has built-in support which we take a look at here.
  • ADO.NET Data Services (VS08 Sp1 B1), Batching: We can cut down the number of HTTP round-trips that we make from client to service by using the batching feature of Data Services. A service exposes a $batch endpoint that we can send multiple "CRUD" operations to in a single HTTP request.
  • ADO.NET Data Services (VS08 Sp1 B1), Service Operations: Service operations provide a way in which we can add to the core functionality of Data Services in order to expose your own arbitrary functionality by writing server-side functions that can still be invoked (with parameters) via the URI. Here, we take a quick look at how we can do this.
  • ADO.NET Data Services (VS08 Sp1 B1), Query Interceptors: Query interceptors (and change interceptors) allow us to plug code into the dispatch mechanism server side in order to run some of your own code as part of returning a result set or modifying data. Here, we take a quick look.

Here are the fist five from the “Mike Taulty Posts Five ADO.NET Data Services Screencasts” topic of LINQ and Entity Framework Posts for 7/24/2008+:

Danny Simmons on dnrTV: Entity Framework Screencast Part 2

In show 118 of July 28, 2008, Dan Simmons on The Entity Framework Part 2, Danny “demonstrates using the Entity Framework with ASP.NET applications and web services” in a 55:10 screencast that covers the following topics:

  • Danny starts by moving the Northwind.edmx files and a partial entity class to a separate assembly with a reference from an ASP.NET Web Application which uses the EntityDataSource as a data source to bind a GridViewControl.
  • He continues at 14:00 with an ASP.NET Dynamic Data Web application, explains issues with disconnected operation at 19:00 and does a disconnected demo at 13:00.
  • Creating a Web services app with ADO.NET Data Services (Astoria) starts at 26:00.
  • Creating a WCF Service Application starts at 45:45 with GetOrderById() and UpdateOrder() operations.

The earlier Dan Simmons on The Entity Framework Part 1 of July 14, 2008 was an introduction to the Entity Framework.

Amazon SimpleDB Update Adds New and Improves Features

The Amazon Web Services Blog’s New features come to Amazon SimpleDB post of July 28, 2008 discusses SimpleDB’s new-found sort capability and does-not-start-with operator and points to a page with the following list of new features:

  • Query Sort: Amazon SimpleDB now supports the sorting of query result sets on a single attribute.
  • Query “does-not-start-with” operator: Amazon SimpleDB now provides the new comparison operator “does-not-start-with.”  For example,  [‘title’ does-not-start-with ‘Old’].
  • Increased number of predicates in query expressions: Amazon SimpleDB increases the number of predicates allowed in query expressions from 5 to 10.
  • Increased number of comparisons per predicate in query expressions: Amazon SimpleDB increases the number of comparisons per predicate allowed in query expressions from 5 to 10.
  • XML-restricted character handling: Amazon SimpleDB now automatically Base64 encodes strings that contain XML-restricted characters. This ensures responses with restricted characters are successfully returned.

Mike Taulty and Mike Ormond Post 52 Silverlight Screencasts: Eight with Data or LINQ Overtones

The “Two Mikes” have been busy capturing content for a series of 52 (as of July 29, 2008) screencasts for download from the Screencasts for Silverlight 2 list. Here are the eight that are most relevant to his blog topics:

Three New Tech-Talk Interviews from Tech*Ed 2008 Developers

Three new Tech-Talks of peripheral interest to developers using LINQ and Entity Framework or related technologies posted July 28 and 29, 2008 are:

  • REST and SOAP…Battle Royal or Peas in a Pod?: Ron Jacobs discusses REST and SOAP with Bob Familiar: the differences, the similarities, and how Windows Communication Foundation supports these distributed networking protocols.
  • Introducing Velocity: a Distributed Caching Platform: Join us as we present project "Velocity," an explicit application cache that provides increased performance, scale and availability. With Anil Nori, Muralidhar Krishnaprasad, Subramanian Muralidhar, and Nithya Sampathkumar.
  • The Road to Oslo: The Microsoft Services and Modeling Platform: Microsoft's "Oslo" project aims at creating a unified platform for model-based, service-oriented applications. This new approach will affect the next versions of several products and technologies, including the Microsoft .NET Framework, Microsoft Visual Studio, Microsoft BizTalk Server, Microsoft System Center, and more. Although many details of "Oslo" won't be public until later in 2008, this session provides an overview of what Microsoft has revealed so far. Along with a description of the problems it addresses, the session includes a look at several new "Oslo" technologies, including a general-purpose modeling language, role-specific modeling tools, a shared model repository, and a distributed service bus. With David Chappell and Ron Jacobs.

Sunday, July 27, 2008

Updated SQL Server Data Services (SSDS) Test Harness: Northwind REST and SOAP Uploads

The SSDSNwindEntitiesCS.sln sample project for my “Test-Drive SQL Server Data Services” cover article for the July 2008 issue of Visual Studio Magazine has been updated to SSDS Sprint 3, adds a couple of features, and has a few start-up bugs excised.

New Features:

  • The program attempts to create an authority if you haven’t added one.
  • A splash screen opens during the initial query for ACE container and entity object because the process is very slow with a moderate number of objects.

Updates:

  • The new 'application/x-ssds+xml' MIME type replaces ‘application/xml’.
  • The containerUri = response.Headers[HttpResponseHeader.Location]; instruction which now returns null has been replaced with concatenated constants as the containerUri value. This eliminates a problem when creating new containers with REST operations.

Download: You can download the SSDSNwindEntitiesCS project here (114-KB vs0807rj.zip file at the Visual Studio Magazine site.)

From the project’s ReadMeSSDS.txt File:

Note: This project is designed for use with v1 (Sprint #3) of the beta versions. It has been updated for Sprint #3 and uses the new 'application/x-ssds+xml' mime type for REST operations. A number of minor improvements, changes, and bug-fixes have been added.

This code might require VS 2008 SP1 Beta 1 and will be updated for later SSDS/SP1 versions, if breaking changes occur.

This project will install in a \SSDSNwindEntitiesCS folder by default.

TIP: If you have a problem with the default SOAP protocol and have verified your UserName, Password, and AuthorityId, refresh the Service Reference. Alternatively, mark the Use REST check box to use the REST protocol temporarily.

Instructions:

  1. This project requires the user to have a beta account for SQL Server Data Services (SSDS), which you can obtain by registering at http://www.microsoft.com/sql/dataservices/default.mspx, and an instance of the Northwind sample database attached to SQL Server 2005+ [Express].
  2. It's recommended that you set your userId, AuthorityId, and, optionally, password as the Text value of the three corresponding text boxes.
  3. To create and populate a Northwind container with all sample tables with the SOAP protocol, run the project and click the Create and Load Entities button (see Figure 1.)
  4. To do the same with the REST protocol, mark the Use REST check box (see Figure 2.).
  5. If you want to substitute Guids for alphanumeric Ids, mark the Use Guid for Id check box. SSDS will sort the entities in random (Guid string) order.
  6. If you want to base64Encode and upload the Employees and Categories tables' image fields, mark the base64Binary-Encode images check box.
  7. To create and populate a container for each table, mark the Container per Entity check box.
  8. Clicking Bail Out terminates upload operations.
  9. Clicking Get Orders retrieves (GETs) 83 orders having Brazil as the ShipCountry value.
  10. Clicking Update Orders toggles the presence of a datetime Timestamp property.
  11. Clicking Delete Orders (SOAP only) deletes the Brazilian orders and offers the option to replace them after deletion.
  12. After creating containers, when you close and restart the program a message box opens to let you decide what to do (see Figure 3.)

Figure 1. It’s not practical to display the SOAP message for adding entities in the text box, so the program lists the property values. You can view SOAP messages by enabling message logging with the WCF Service Configuration Editor.

Figure 2: When you select the REST wire protocol the entire POST template appears in the text box.

Figure 3. The text box displays containers and entities (indented) by name in alphabetic Id order. When you reopen the project a message box lets you choose to keep the existing containers intact (Yes), delete and recreate empty containers as required (No), or delete the existing containers (Cancel).

Performance Data: Uploading tables generates CSV-formatted test data in the ...\bin\Debug folder (see Figure 4). Exiting the program saves the data. Notice that the SOAP protocol executes considerably faster than the REST wire format.

Figure 4. The auto-generated log file for all entities uploaded by the SOAP and REST protocols with total elapsed time rows added for both protocols over a DSL connection tested at 2,583 bps download, 431 bps upload to Seattle, WA.

The project has minimal error trapping so you can more easily determine where the problem occurred.

Friday, May 04, 2007

LINQ to SQL:Entity Framework::REST:SOAP?

There's a current controversy regarding the need for—and desirability of—two object/relational mapping (O/RM) tools in ADO.NET vNext: LINQ to SQL and the ADO.NET Entity Framework and its components. Based primarily on blog posts and comments, the debate appears to center on the following contentions:

  1. Entity Framework's three XML mapping files and Object Services layer are overly complex for the needs of the vast majority of .NET developers.
  2. Entity Framework is over-reaching by attempting to extend the Entity Data Model to "Replication, Reporting Services, BI, Integration Services, etc.", and remoting as well as lighter-weight incubator applications such as "Project Astoria" and, especially, "Project Jasper."
  3. LINQ to SQL satisfies the needs of the vast majority of .NET developers.
  4. Entity Framework doesn't provide "Persistence Ignorance"; that is, the persistence layer is limited to relational databases and isn't transparent to the object layer. The current version is targeted on database-to-model implementation rather than the model-to-database approach preferred by domain-driven modeling proponents.
  5. Table per concrete object and table per type inheritance models and many-to-many relationships can be added to LINQ to SQL post-Orcas.
  6. Entity Framework and LINQ to Entities reduce Microsoft resources devoted to LINQ to SQL, including opening the LINQ to SQL provider model to other database vendors and delivering a once-promised provider SDK.
  7. LINQ to SQL wasn't invented by the ADO.NET Team, who developed the Entity Framework in parallel with LINQ to SQL (then DLinq). When the ADO.NET folks got control of LINQ to SQL, they hobbled it with an artificial SQL Server-only limitation.

The preceding contentions closely parallel those in the REST vs. SOAP Web services controversy that's continued since SOAP was Dave Winer's XMLRPC, but began in earnest in mid-2002. Here are some of the common points raised:

  1. The SOAP and WSDL specifications are overly complex for almost everyone's needs.
  2. SOAP has spawned Web Services (WS*) specifications to support security (WS-Security, WS-SecurityPolicy, WS-SecureConversation, WS-Trust, WS-Federation), messaging (WS-Addressing, WS-Enumeration, WS-Eventing, WS-Transfer, WS-ReliableMessaging), and transactions (WS-Coordination, WS-BusinessActivity, and WS-AtomicTransaction). The WS* specifications are almost impossible to read, understand, and/or implement.
  3. REST doesn't support security, messaging, or transactions and most network admins don't permit invoking HTTP's PUT and DELETE verbs.
  4. REST satisfies the needs of the vast majority of programmers, content providers, and users.
  5. REST can be upgraded with extensions to conventional URI syntax, such as those proposed for Microsoft's "Project Astoria" incubator project.
  6. SOAP requires frameworks and/or toolkits, such as Web servers, application servers, Windows Communication Framework, Visual Studio, and/or Eclipse, which developers might need to purchase. Even if open-source, developers must devote substantial time and effort to master them.
  7. SOAP and the WS* specifications were subsumed by Microsoft, IBM and, to a lesser extent, BEA and other vendors, who sell servers, SOAP toolkits, frameworks, development environments, security certificates, and/or consulting service. Intraoperability (and some interoperability) issues lead to vendor lock-in.

Discussions re LINQ to SQL vs. Entity Framework

Paul Wilson, the developer of the commercial (US$50) Wilson ORMapper, said on April 29, 2007 Great News: Only One O/RM Shipping in Orcas:

I almost can't believe the great news that came from MS today. That's right, the ADO.NET Entity Framework has been delayed ! I bet most of you think I'm being sarcastic, but I am serious. I've got at least three reasons why this is good news to me.

First, this gives Linq to Sql a better opportunity to thrive. Linq to Sql is the "simpler" OR/M that's looking good enough for the vast majority of cases, while ADO.NET EF is far more complex -- and yet most gurus only wanted to talk about the EF.

Next, since ADO.NET EF is so complicated, it absolutely must have a great designer ship concurrently, which was not the plan. MS has apparently accepted this feedback since this is at least the publicly given rationale for the delay in shipping the EF.

Finally, and this one may not pan out, but it is my own hope that ADO.NET EF is being re-aligned somewhat with Linq to Sql. These two O/RMs are similar enough to share at least some code, and I believe that some of the MS guys have hinted at this too.

So I'm happy that at first there will be one O/RM -- Linq to Sql. The gurus may be disappointed, but the vast majority of MS devs will be new to O/RMs anyhow, and Linq to Sql will be good enough. Very much like my simple WilsonORMapper has been so widely used.

Ian Cooper's convincing April 29, 2007 LINQ to Entities and Occam's Razor post says, in part:

[T]he decision not to support querying to relational stores other than Microsoft SQL Server from LINQ to SQL seems to be deliberately crippling that product for no good reason. The provider model should be exposed and other implementations encouraged. Isn't that the value of LINQ? This feels like an internal turf war over who provides the standard data access layer to .NET developers. As a customer I am not interested in your internal disputes but in solving my customer's problems with your tools. LINQ To SQL should be capable for simple mapping scenarios across backend types and the provider model should be opened up for that. Do not force us to swallow the whole LINQ To Entities pill, just to get support for multiple backends. This is not a reasonable decision.

Similarly I would hope that later releases of LINQ to SQL could be enhanced to support many-to-many associations and table per concrete classes inheritance strategies. Why force an upgrade to LINQ To Entities to obtain these feature sets which are common to many ORMs which do not have an additional abstraction layer? I do not see any technical reason for the Entity Framework being a requirement for these to work. NHibernate and Wilson for example, already provide these capabilities on the existing ADO.NET framework.

Experience with many MS developers suggest that if you give an 'upgrade path' to LINQ to Entities you will implicitly degrade LINQ to SQL as being a toy. It is not; unless you make it so.

Kevin Hoffman compares LINQ to Entities with LINQ to SQL in this August 17, 2007 LINQ to Entities vs. LINQ to SQL - What should I use and when? post, which waxes enthusiastic about the Entity Framework, its conceptual data model, and LINQ to Entities:

LINQ to Entities allows me to write C# LINQ queries that run against a conceptual data model. This is huge. I cannot stress enough to you how unbelievably forward-thinking and useful it is to be able to run queries against a conceptual object model as opposed to a database schema. The issue that a lot of folks have is in trying to decide if they need to use the Entity Framework or if they are fine with plain-vanilla LINQ to SQL (formerly called DLINQ).

Kevin complains about the inability to use foreign key fields as discriminator columns in ADO.NET Entity Framework - Entity Inheritance Woes of October 10, 2006, and the initial delay to the release of the EDM Designer in Microsoft finally shows off their EDM designer... but it won't ship with Orcas?!? (March 28, 2007) and Who ships a modeling tool without a visual designer? Microsoft (April 24, 2007).

Julie Lerman also compares the two technologies in LINQ to SQL vs. Entity Framework (April 4, 2007).

Entity Framework and LINQ to SQL Background

"Project Jasper" demonstrates the resource hit for implementing the Entity Data Model (EDM) dynamically. In Sam Drucker and Shyam Pather's DEV18 - Rapidly Building Data Driven Web Pages with Dynamic ADO.NET MIX07 video it took about 30 seconds (19:17 to 19:47) to initialize and cache the DynamicContext object, which represents the EDM, for a short list of blog entries. (Jasper's DynamicContext object corresponds to LINQ to SQL's DataContext object.)

Danny Simmons' May 3, 2007 Where’s the model? Is it the code or something else? post takes on Jeffrey Palermo's concern with substituting the Entity Data Model (defined by its XML files) for the domain model (defined by its code). Danny says:

We do talk about the EDM for an application as "the model", but that's just a verbal short-hand for "data model", which I believe is a critical distinction. We are explicitly NOT trying to define behavior in the EDM. The code is the right way to define that. We are, however, trying to define enough about the structure and constraints on the data that we can provide a rich set of services in a general fashion that still honor those constraints. ...

Once we start generating code from the EDM, things definitely become blurred a bit, but the explicit goal of the generated code is not to replace your object model—it's to save you some typing of repetitive things when you are building that object model. Further, the intent is that we would not require this generated code—you can always build your model completely on your own and just align the EDM with the shape of that model so that you can take advantage of the EDM-enabled services we provide (right now that means persistence/query, but eventually that means other things like reporting, replication, remoting, etc.).

For more about the EDM Designer delivery delay see Déjà Vu All Over Again: Entity Framework Cut from Orcas.

Discussions re REST vs. SOAP

Mike Champion's May 1, 2007 Reporting for duty on WS-Deathstar post, which announced that he's moving from the "core XML team in SQL Data Programmability ... to a position in the Connected Systems Division's Interoperability unit." His responsibilities there "include representing Microsoft on the W3C, helping with web services standards partnerships, and generally helping the world understand the method behind the apparent WS-Madness, or at least the subset of it that Microsoft endorses."

In his LINQ to XML swansong, Mike says:

I've always been annoyed by the zealotry manifested in the "SOAP vs REST" debate. The overhyped WS marketing and the RESTifarian pushback in 2001-2002 or so had the effect of people "flipping the bozo bit" on each other wholesale. We're just now seeing some exploration of the sensible middle position -- the native Web technologies are powerful and deserve first class support in the services-oriented tools and specs, and at least some of the WS technologies are useful on the Web as well as the enterprise, especially in the realm of identity and security. People on the WS side are finally understanding the the potential of the SOAP GET binding, and maybe the REST folks are starting to understand the oft-maligned WS-Transfer ("HTTP over SOAP over HTTP") is not quite so pointless in a multi-hop, multi-protocol world.

Update 5/24/2007: Jon Udell reviews the recently published RESTful Web Services by Leonard Richardson and Sam Ruby, who also are subjects of Jon's interview for a forthcoming IT Conversations show. Jon quotes the authors:

“We’re writing a book,” the authors say in their web introduction, “to codify the folklore, define what’s been left undefined, and try to move past the theological arguments.”

According to Jon, the book proposes use of Resource-Oriented Architecture (ROA) for Web services, wherein:

  • Data are organized as sets of resources
  • Resources are addressable
  • An application presents a broad surface area of addressable resources
  • Representations of resources are densely interconnected,

when the "security protocols and complex coordinated workflows" provided by Service-Oriented Architecture (SOA), such as SOAP and implementation of the WS* specifications aren't required.

Tim Ewald's April 26, 2007 I finally get REST. Wow. post details his decision to substitute REST for SOAP says, inter alia:

It's depressing to think that SOAP started just about 10 years ago and that now that everything is said and done, we built RPC again. I know SOAP is really an XML messaging protocol, you can do oneway async stuff, etc, etc, but let's face it. The tools make the technology and the tools (and the examples and the advice you get) point at RPC. And we know what the problems with RPC are. If you want to build something that is genuinely loosely-coupled, RPC is a pretty hard path to take.

That realization would have gotten me down if not for the fact that something else jazzed me up an hour or so later. I was in the process of considering the alternatives when I finally understood REST. And wow, it was eye-opening. REST is often positioned as CRUD operations against entities identified by URIs. Then it is dismissed as to simplistic to be useful. You can't build with just CRUD, the reasoning goes, just think about why we write sprocs. I've been down that path any number of times and always ended up in the same place. But I had it all wrong.

Tim was a staunch SOAP Web services proponent/evangelist and wrote MSDN's "House of Web Services" column while a Microsoft employee.

Don Box, one of the initial contributors to SOAP 1.0 and a power behind WCF, makes these recommendations for choosing SOAP, REST with POX (plain old XML), or both in his February 17, 2006 Pragmatics post:

  1. If you want a great experience for .NET/Java devs, you’ll typically publish schemas (through WSDL) and support SOAP.
  2. If you want a great experience for LAMP folks, you’ll support POX messages and will provide a non-XSD description of your formats.
  3. If you want to reach both audiences, you’ll do both #1 and #2.
  4. If you want to reach both audiences before your competition does, you'll avoid indulging in religious debates and ship something.

Don and Steve Maine presented DEV03 - Navigating the Programmable Web at MIX07. Here's the description from the MIX07 sessions page:

Abstract: RSS. ATOM. JSON. POX. REST. WS-*. What are all these terms, and how do they impact the daily life of a developer trying to navigate today's programmable Web? Join us as we explore how to consume and create Web services using a variety of different formats and protocols. Using popular services (Flickr, GData, and Amazon S3) as case studies, we look at what it takes to program against these services using the Microsoft platform today and how that will change in the future.

It's clear that the SOAP folks understand the need for RESTful Web services. Following are some highlights from the session's slides:

  • It's the URI, Stupid! Query, Structured Expression, or Opaque Identifier. Orcas provides System.UriTemplate to support URI template syntax.
  • GET is more Important than you think. Most of the world is GET; the rest is relative chaos. Orcas adds GET support to WCF, as well POST, PUT, and DELETE.
  • WebHttpClient is a speculative feature, "which we hope will show up in an interesting vehicle very soon."
  • Formats Matter: POX (Plain Old XML), JSON (JavaScript Object Notation), RSS/ATOM, and SOAP.
  • RSS/ATOM constrain POX by adding list structure.
  • SOAP constrains POX by adding a header processing model.
  • WCF's WebGet/WebInvoke in Orcas support XML, JSON, or opaque binary formats (e.g., JPEG, PNG); WCF 1.0 supported POX and SOAP.
  • WCF's SyndicationFeed/SyndicationItem provide a programming model for RSS/ATOM that integrates with the .NET serialization stack.
  • Astoria is built on top of the technology presented in the session.
  • "We could have put a SOAP wrapper on any of these services, but we didn't. We wanted reach."

The initial Astoria CTP doesn't support RSS/ATOM formats. Obviously, a later CTP should.

James Governor's February 15, 2005 SOAP is boring, wake up Big Vendors or get niched post, says:

Yesterday my partner Stephen issued a wake up call for middleware and tools vendors - give developers what they want, not what you think they should have.

    • I have yet to hear any vendor - not one - talk to me about how they help developers design, implement and consume RESTian web services.

I take my hat off to Robert McMillan at Network World for writing this story two years ago…

One big question is why haven’t IBM and Microsoft responded? The obvious answer is vested interest. When you have “bet the company” on a technology stack its kind of a drag to have to respond to something else. Its interesting that in a week when the bug guys, including Gartner, have trumpeted the arrival of UDDI 3.0, the world is quietly getting on with more interesting projects. ...

Whats a web service? Still a great question. But anyone that defines a Web Service using SOAP in the definition is missing out on where the action is. Distinctions between enterprise and “consumer” are breaking down. REST is evidently where that convergence is being played out, not WS-I.

Governor's challenge to IBM and Microsoft raised a flurry of responses. For example, Dare Obasanjo wrote his Understanding the Place of POX, SOAP and WS-* in Building XML Web Services the same day. Be sure to read the comments and responses by Stephen O'Grady, James Governor, XML Team, Brain.Save, and, especialy, Mike Taulty.

Amit Asaravala delivers a reasoned argument for RESTful Web services in his October 21, 2002 Giving SOAP a REST post on DevX:

Many developers will be surprised to learn that SOAP isn't the only game in town for Web services interfacing. REST offers a perfectly good solution for the majority of implementations, with greater flexibility and lower overhead. Developers need to stop reaching immediately for SOAP and start choosing the right technology for the application.

Joel Spolsky says in his April 25, 2002 Joel on Software post about "Soap Backlash":

The real problem with SOAP is that it's a completely inadequate remoting system. It doesn't have events (which makes it useless for large classes of applications). It doesn't support references (ditto). It has about 10 years to go before it gets to where CORBA and DCOM were 10 years ago. And we're supposed to be all excited about this because we can sneak through the firewall. Gee, I wonder what the firewall vendors are working on these days? As soon as they're done, we're even further back than we started.

REST and SOAP Background

Roy T. Fielding, whom Jon Udell calls "the primary architect of HTTP" and who's a co-founder of the Apache Software Foundation, is credited with the definition of the Representational State Transfer (REST) architectural style in his University of California Irvine doctoral dissertation, Architectural Styles and the Design of Network-based Software Architectures (2000). Listen to Jon's August 25, 2006 podcast, A conversation with Roy Fielding about HTTP, REST, WebDAV, JSR 170, and Waka.

"Project Astoria," introduced at MIX07 as an incubator project by Pablo Castro in his XD006 - Accessing Data Services in the Cloud session, appears to me to be Microsoft's first semi-official foray into RESTful Web services.

My January 31, 2003 "Soap Extension Soup" article for XML & Web Services Online discussed the flurry of WS* specifications foisted on the Web services development community in 2002H2. It took the moribund Web Services Interoperability Organization (ws-i.org) three years to come up with their Basic Security Profile 1.0 recommendation. (OASIS published the Web Services Security v1.0 spec in March 2004.) I was overly optimistic in saying:

If OASIS produces a final WS-Security spec by the end of 2003, WS-I could easily take another year to produce a WS-Security 1.0 profile, test tools, and PKI-based sample applications. [Emphasis added]

Conclusion: Entity Framework clearly has the potential to become another SOAP. Hopefully, Microsoft's ADO.NET team will avoid that trap.