Web Services the Microsoft Way
With .NET, Microsoft offers perhaps the most comprehensive Web services product announced so far. But what is it really, and what might be its impact on your enterprise?
- By Andy Patrizio
Microsoft Corp. likes to give itself a good reinvention every now and then, and one thing that can be said about its .NET strategy is this—it's a major reinvention of the company. Everything Microsoft ships, from its Internet Explorer browser to all of its servers, will eventually be designed for .NET.
Microsoft .NET is a strategy on Microsoft's part to change its software—and software written for Microsoft platforms—to support Internet standards like XML, Simple Object Access Protocol (SOAP) and Web Services Description Language (WSDL).
The strategy of .NET is to provide users with access to their data and the applications they use "anywhere, any time and on any device," as noted on Microsoft's updated corporate mission statement. The whole point of .NET is client independence. That's because Microsoft has become very mindful of the mobile revolution, in which a large percentage of devices aren't powered by -Microsoft software.
The extensive use of XML in Microsoft's Web services is because of .NET's very loosely coupled architecture. For Web -services to work, they have to be loosely coupled and asynchronous, because synchronous communication as it was done in the old client/server days would mean locking up the client waiting for a response, something that can't be done over the Internet.
"Loosely coupled" or asynchronous systems are those in which one end of a transaction doesn't wait for a response from the other end. For example, database queries are often written as synchronous transactions, meaning that you must wait for data to come back from a query before the -application is released. Until it gets a response, it freezes. E-mail clients are a good example of an asynchronous application, since they sit in the background idle until their scheduled check for new mail.
Another notable element of .NET is that it doesn't require users to toss out their existing infrastructure, even if it's non--Microsoft. For Microsoft shops, which probably have heavy investments in COM, Visual Basic and Visual C++, Microsoft's upgraded tool suite—called Visual Studio.Net—will allow developers to put an XML wrapper around existing Windows objects. That means they'll be able to use .NET services without having to rewrite objects entirely.
| Fundamentals of .NET |
Microsoft's .NET strategy consists of three elements: the .NET platform, Microsoft .NET products and services, and third-party .NET services. The platform is built on the .NET Framework, an API layer that runs on top of Microsoft operating systems where applications are executed.
At the core of the .NET framework is the Common Language Runtime (CLR), a set of class libraries that execute the application. The CLR is not just a runtime but also executes the code, maintains security and integrity of applications, and handles application deployment and dependencies between the components. There is an irony here. Microsoft has talked about porting the CLR to other platforms, or at least publishing the interfaces so that other people can write their own CLRs for different platforms. If this happens, then .NET developers will be able to write one application for a multitude of platforms, giving .NET the cross-platform capabilities Java has been striving for.
The security system is far more fine-grained than its previous iterations, where it was an all or nothing security model. Applications either could do anything on a system or nothing. The new security model allows applications to request a set of permissions to perform its functions. Then the runtime matches what the application is actually trying to do with that requested set of permissions. If they don't match, the CLR immediately fails the application as either bugged or infected with a virus.
By checking its own dependencies, an application can determine if all of the components it needs are installed on the system. If a dependency isn't fulfilled, the CLR can fetch those required classes from a secure source, pull them down and -install them. The DLL Hell so many administrators have had to deal with is eliminated this way.
Another annoyance from the Windows era that goes away is the Registry, which alone could make .NET worth the installation. Microsoft has a concept called "no-touch deployment," which means there is no need to register components in the system, since applications are self-describing and can find their own components.
The Runtime also serves as the universal execution engine for developers' code. Unlike other runtimes that are tied to their own language or platform, the Common Language Runtime will be able to execute programs written in any language. That's because programmers write applications against the CLR rather than the Win32 API.
The CLR interface will be published; so in theory, it will be possible to write your own CLR environment for non-Windows platforms. Microsoft has teased back and forth as to whether it will release the CLR as open source, or do its own ports to other platforms, but nothing is concrete.
The Runtime offers cross-language inheritance, cross-language debugging and cross-language error handling. In theory, since it hasn't been done yet, a component written in COBOL can inherit from a PERL application and vice-versa. This is done by wrapping XML parsers around the existing objects, so the object talks to the wrapper, converts the data to XML and sends it out to the recipient object, which also has an XML wrapper.
Vendors Working Together
Preserving existing investments was an important concern for Microsoft because no customer wants to throw out what it's built and retrain its employees on a whole new system. "Everyone in the industry is feeling the same sort of pain," says Barry Goffe, group manager for .NET enterprise solutions at Microsoft. "That [prompted] the leading platform vendors to get together and define a new set of Internet standards and protocols to help solve some of the integration protocols."
The new protocols had to work through firewalls on the Internet, use XML and remain independent of the application language, vendor and platform. SOAP, WSDL and Universal Description, Discovery and Integration (UDDI) protocol were the result of that dilemma, preserving existing infrastructure while moving forward. Goffe says .NET is Microsoft's implementation of those standards in its products.
".NET is how we evolve every one of our existing products and create a whole new generation of products that are infused with Web services technology," he says. "Today, if you want to take advantage of Web services, it takes a fair amount of hand-coding. You have to do a lot of extra work to take advantage of the standards. It could be made a lot simpler."
"Fundamentally, there are problems that have to be solved that require a more integrated approach than currently exist to reach the next level of automation," says Rob Enderle, vice president with The Giga Information Group, in Santa Clara, Calif. "Systems need to work together seamlessly. Things need to move to an area where [software isn't] hardware-dependent."
"Certainly .NET will make integration easier because it's a comprehensive set for companies to deploy so many emerging technologies," says Enderle. "It provides for an integration of standards above even what the standards bodies are working on, and Microsoft has shown a great competency to maintain standards."
| C#—The Best of Java and C++ Worlds? |
C# (pronounced C-Sharp) is a new programming language Microsoft has developed for .NET that's considered its response to Sun's Java. C# is designed for loosely coupled environments like .NET. Traditional distributed-object models like COM, DCOM, CORBA and EJB are tightly coupled, and thus don't work very well (if at all) through a firewall. C# works through firewalls and supports asynchronous communication between two applications, so long as they both speak SOAP and XML.
C# can also be used to write .NET applications or be used to wrap older applications so they interact with a .NET environment, which is ironic given Microsoft's history with Java. When Java first hit, Microsoft embarked on its usual strategy: First it ignored Java, then it derided it, then adopted it and tried to make Java its own.
It did this with J/Direct, an API that allowed Java programs to call the Win32 API, and by adding Windows-specific features to its Java Virtual Machine. Microsoft had always insisted Java code wasn't cross platform, and now it was determined to prove it by making its Java implementation a Windows-only solution.
Sun sued; after some litigation, Microsoft ended up on the outside looking in. It could not modify its JVM the way it wanted, and its Visual J++ Java tool was abandoned and never updated beyond version 1.1. Microsoft has gotten its own shot at Sun by removing the Java Virtual Machine from Windows XP. Windows 98 and Windows 2000 both come with a JVM, but XP won't have one, at least from Microsoft. However, you can always download one from Sun and install it yourself if the need arises.
Three years after the Java license descended into a legal battle, Microsoft comes out with C#, which was built on the C and C++ languages. It has added features to support XML and SOAP but without some of the features, such as multiple inheritance, that make C++ such a pain. It also includes "garbage collection," so the programmer doesn't have to deal with memory management and automatic initialization of the variables, two more C++ shortcomings.
C# will be a part of the Visual Studio.Net toolsuite. The second beta of Visual Studio.Net is out, although C# isn't part of it yet. Microsoft has given no firm release date on the tool suite.
Tools Still Primitive
Tools definitely need an upgrade to support these new standards. Trying to write XML code now is a primitive task, says Mark Sundt, vice president and CTO of Haystack Toy Co., a toymaker in St. Louis, Mo. "The tools are still at a very primitive stage," he says. Haystack has been writing some XML-based applications, but has to code against the Document Object Model, which is something like writing in assembler when you'd rather write in C, he says. "The new Visual Studio.Net makes it a much simpler task to write services on the Web."
XML data exchanges have long promised this sort of data exchange for the masses, giving any size firm the power that only the largest companies enjoyed with Electronic Data Interchange (EDI). Although still popular with large vendors who have spent many years and lots of money implementing it, EDI was a nightmare technologically. Every connection had to be manually encoded and the exchange format meticulously agreed upon beforehand. The hardware cost millions and was only used by the very largest corporations. [See "From Chaos to Cooperation, on page 52"—Ed.]
Using the beta .NET tools, Haystack was able to put XML wrappers around its existing server applications to perform XML data exchanges with Overstock.com, a site that specializes in handling overstock inventory.
In the past, that sort of data exchange would have involved writing a whole custom application for that particular vendor. Instead, Haystack used the XML mapping tool to map the source XML from Overstock.com with its own applications. "No way we could have done that even two years ago," says Sundt. "It would have taken us months to develop [a custom data exchange application]. Now, after just a few weeks we're just pumping XML in and pumping XML out."
That kind of integration is also useful to a major news organization like MSNBC, the joint venture news outlet between NBC and Microsoft. Half of that site's total traffic comes from a news distribution model that has the site pumping out news to affiliates. An NBC affiliate in a local market often runs stories that are provided by the MSNBC site.
However, that requires building a news feed that's unique for each customer. When another affiliate comes on board, a whole new feed has to be built because each network is different. "We've built this arcane patchwork of code on the back end to feed out and take in news and distribute the news, and that doesn't scale," says Steve White, CTO for MSNBC, in Redmond, Wash.
MSNBC can now create an XML parser for sending and receiving data for all of its affiliates, with no concern as to what's on the other end in terms of hardware and software, so long as they use an XML parser. "This really blows out the old exchange model," says White. "Everyone understands how the data is formatted, so I write one set of code for everyone to get the data."
This kind of across-the-board strategy raises more than a few red flags. Already, Microsoft competitors are complaining to the government again about anti-competitive worries, although the current administration is nowhere near as receptive as the last. Microsoft says customers don't need to worry about vendor lock since it's all built on open protocols.
"We're talking about Web services. It's not owned by Microsoft, it's owned by the W3C," says Goffe. ".NET can connect to Sun software and to IBM software or to BEA software. Integration is the value proposition, and it's not integration from Microsoft product to Microsoft product, it's integration to any asset that exists."
The Importance of BizTalk 2000
All of Microsoft's products will be updated to support .NET, but the most important product in this strategy is the BizTalk 2000 server. BizTalk is Microsoft's integration engine for e-business applications. It provides graphical tools to enable developers to create relationships between XML schemas, in order to perform smooth data transformations between applications.
BizTalk has three functions. It handles enterprise application integration for data exchange between two applications; it -provides business-to-business integration, allowing developers to create an infrastructure to link between corporate systems; and third, it performs what's called Business Orchestration, which allows companies to automate their processes and manage them dynamically.
While Enderle says going to .NET will tie you to Microsoft "top, bottom and sideways" and make it hard to extract should you change your mind, it's also the most comprehensive Web services product announced so far. "Nobody else has the breadth Microsoft has," he says. "Anyone trying to compete with Microsoft would have to merge or become a lot bigger, even IBM. WebSphere is the closest thing to .NET and it's not as comprehensive."
So Microsoft can say it has the most comprehensive offering and a one-stop shop for customers looking to deploy XML-based transaction systems. There's an upside to getting everything from one vendor, says Enderle. "The more consolidated the product, the more responsibility the vendor takes," he says.
"If you have a problem, there's a pretty good chance you can get someone [at Microsoft] to take the blame. That's why best-of-breed approaches haven't worked. If it breaks, they can turn around and point right back at you for the problem. Even if they don't, your management will. Arguing that two vendors must cooperate [to make their products work together] makes you look inept."
As Microsoft likes to point out, there's no .NET package to buy. It will be rolled into all of its products going forward, including all servers and operating systems. Visual Studio was given an upgrade last year to support .NET, including the addition of a beta of the CLR so programmers can become familiar with it.
All of Microsoft's servers will eventually support .NET. This includes SQL Server 2000, BizTalk Server 2000, Commerce Server 2000, Application Center 2000, Host Integration Server 2000, Internet Security and Acceleration Server 2000, and Exchange Server 2000.
Windows XP is a relatively minor update of the Microsoft platform compared to Windows 2000, although it's designed as the replacement to the rickety Windows 9x codebase as well, which is in dire need of a complete upgrade. Greater support for .NET will come with "Blackcomb," the codename for the next operating system after .NET. Blackcomb is due in late 2002 or early 2003.
As Windows XP, Hailstorm, Blackcomb and Microsoft's many server products begin to ship with .NET, anyone watching Web services will want to be closely monitoring Redmond's moves.