For Microsoft, the .NET Framework 3.5 and Visual Studio 2008 are the latest updates to platforms that have been evolving for the last five years. Dino Chiesa, the director of the .NET Platform in the Connected Systems Division at Microsoft recently filled us in on some of the enhancements to expect.
The biggest changes are improvements to Windows Communication Foundation (WCF), support for Language Integrated Query (LINQ), and improved designer support.
WCF, REST and SOAP: Tasty alphabet soup
First released in November 2006 with the .NET Framework 3.0, the WCF programming framework improves the ability to use a single framework that can automatically be configured to communicate via Representational State Transfer (REST) and HTTP Query, and will update the SOAP capabilities to be in compliance with the latest WS* specifications.
Chiesa said Microsoft is seeing a greater interest in the use of HTTP Query and REST style service architectures as an alternative to SOAP style requests and what people used to think of as strictly Web services.
Although the basic WCF capabilities were built into .NET 3.0, the REST capabilities are in the template for the first time in .Net 3.5. Chiesa said, "We think this is going to provide a nice productivity boost for people that have to build services in that style."
Requests that come into a service built into WCF are often specified as a Uniform Resource Identifier (URI). In REST there is a requirement to parse the URI, and historically, a programmer might rely on string parsing by splitting the statement with slashes and examining each piece. WCF provides an automated URI parsing and extraction mechanism. In the application code, these names are automatically filled in by whatever was specified in the URI.
SOAP, or Simple Object Access Protocol, is a message format for services and a foundational specification that describes how to package a message that might be transmitted from one point to another. WS* extends the basic SOAP attributes with additional qualities like security, which can provide a digital signature on the content of a SOAP envelope. It allows the receiver to verify the message has not been changed in transit.
Because of SOAP's extensible protocol capabilities, programmers can take advantage of the more advanced services. REST, in contrast, lacks built-in security, although transport security like HTTPS can be used -- and that, too, is a bit of a shortcoming since HTTPS only works between two endpoints that are directly connected. (With WS-Security a programmer can apply message security even if they don't have point-to-point connectivity.)
None of this, though, need be of concern to the Windows Communication Foundation architect. Even with a variety of delivery options, the programming model remains the same. Thus it is possible to write a WCF application that can support both SOAP and REST protocols.
"In other platforms, if you are building a REST style service, there is a particular programming framework you use for that. If you are using SOAP there is a different programming framework, and a different one for binary optimised communication," Chiesa said. "WCF is differentiated from that because there is one programming model for all programming capabilities. You can learn it once and use it for different requirements."
Another Windows Communication Foundation improvement is a smoother incorporation of service-oriented modelling. Many architects want more than just request-response systems, Chiesa said; they want a more conversational style, or, to put it technically, a state-machine workflow.
Thus Microsoft opted to support workflows within WCF for the .NET Framework 3.5. "It's a really nice, easy way to build distributed systems that fit into a SOA [implementation]," Chiesa said.
LINQ it up
The second big enhancement for the .NET Framework 3.5 is support for Language Integrated Query (LINQ). It provides an extension to the Visual Basic and C# languages to add query capabilities.
Previously, developers constructed a string and send it to the database server with a query embedded in it. If they formatted the string wrong, nothing happened. Plus, due to what Chiesa described as "an accident of history," queries to objects, to database and to XML documents are all done differently.
"We thought that might not be the most efficient way to embed data," Chiesa said. "Now, when developers want to extract data, they can use LINQ and the IntelliSense in the tools on the query. They can get compile time syntax checking on that query. It is a much more productive way to deal with data retrieval on the query."
Chiesa said LINQ is something Microsoft does not see in other programming frameworks. "It is going to require less coding and the syntax is much cleaner and more flexible," he said. "It is a more natural way for a developer and how they think about data."
LINQ is not just for databases. A developer can use the same query syntax for data in a collection or an array in memory. The query is a general purpose facility that generalises the way developers write queries and store data. They need not learn XPath or XML and perform brute force queries. They can use a single query framework.
Better design in Visual Studio
The other major upgrade is the designer support in Visual Studio itself. (Visual Studio, remember, is the IDE through which programmers access the CLR and other important features of the .NET Framework. The IDE and the framework are not one and the same.)
"All of the tools introduced last year and in .NET 3.5 are now built into the developer tools," Chiesa said. This includes WCF and the rest of the .NET Framework 3.0 libraries, ASP.NET AJAX and Visual Studio Tools for Office. As a result, he added, "It is going to be much easier to design the visual layout" of an application.
In addition, Visual Studio 2008 contains designers for services, support for LINQ capabilities and additional support for testing service hosts, Chiesa said.