Writing Web ServicesThe Developers' Challenge
In the second installment of this series, we'll show you how to write both a simple and complex Web service in Java. As you'll see, the work involved is not great. It requires some familiarity with the prerequisite standards, which are not terribly difficult to understand. It is certainly easier to write Web services than to learn a new programming language. And with the advent of new tools from leading vendors, writing Web services may soon be downright easy.
The major players are poised to make an impact in this way are Microsoft with its .NET initiative, Sun (with its SunONE package), IBM (with its new Eclipse tools), and Oracle. A raft of other vendors are trying to elbow their way in as well: notably, BEA, Sybase, and IONA. Meanwhile, pure-play Web services companies such as CapeClear, have been unveiling impressive tools. Let's try to put some order into this market.
A year and a half ago, when Microsoft announced C#, developers scoffed. Six months ago, when Microsoft first pulled the covers back on J#, developers jeered. No one is scoffing or jeering now.
|
|
Microsoft .NET
For the uninitiated, .NET is a set of technologies that form Microsoft's computing platform of the future. It includes recent releases of existing technologies (for example, future releases of the Windows operating system will be part of the .NET family; SQL Server 2000 is already considered part of .NET) as well as some completely new technologies. The most interesting of the latter is the .NET common language runtime (CLR), which allows all languages to share a common execution environment on Windows. Complementary technologies include the Passport identification and authentication mechanism, ADO.NET to provide database access, and ASP.NET to improve and accelerate Web interaction. These technologies are designed to work as natively as possible with XML.
When viewed as a whole, .NET is Microsoft's attempt to put together a comprehensive execution environment with everything a company would need to implement Web services on Windows with the minimum of effort. In this regard, one could say that but for the Windows attachment, .NET is Microsoft's response to the Java enterprise solution, J2EE.
This view is furthered by the development tools Microsoft shipped in February as Visual Studio .NET (VS.NET). This huge product (the zipped file weighs in at 1.8GB and expands to more than 24,000 files) is an update to Visual Studio 6 that directly supports the new languages Microsoft is promoting for developing Web services: C#, which is a new language that looks a lot like Java; J#, an even closer implementation of Java syntax and libraries; and VB.NET a substantially modified update to Visual Basic.
A year and a half ago, when Microsoft announced C#, developers scoffed. Six months ago, when Microsoft first pulled the covers back on J#, developers jeered. No one is scoffing or jeering now. Over the last few months it has become apparent that Microsoft has done a remarkable job developing new products and getting them standardized.
Consider that Microsofta company known for imposing its own standards and disregarding those of othersdeveloped SOAP, which the Web services community adopted voluntarily, not to say eagerly. Microsoft also won ECMA certification for its C#. Alan Zeichick of SD Times correctly described this as "clearing a low hurdle," but that hurdle was too high for Java. It's clear that Microsoft recognizes that some of the old hardball business tactics won't work with the Web and IT communities as it did on the desktops. As such, the company is working much more cooperatively (and thus, wisely) than ever before. Whether this is a real conversion or a temporary expedient remains unclear.
What is clear is that the technology is impressive. Early users of C# like the language: it's C++ and Java without a lot of the baggage, andsurpriseit runs fast. J# enables developers to run Java programs natively on Windows without excessive difficulty. Only the VB crowd will face serious obstacles to porting their code. It's not a far-fetched theory to say that Microsoft views Visual Basic developers as solidly Microsoft-committed and are therefore unlikely to leave the fold in great numbers over porting difficulties. This is the most sensible explanation for why the company has been least responsive to their needs.
Microsoft has publicly staked its future on XML, so delivery of high-quality .NET products is key to its success. The first generation of products looks good. In fact, Microsoft has made creating Web services about as simple as possible: see the sidebar "Writing a Web Service in .NET."
SunONE
At the time this article was commissioned, it was outlined as a .NET vs. Sun ONE comparison, because the editorslike the Java communityexpected a serious well-articulated response from Sun to .NET. ONEthe Open Net Environmentyou will recall, was unveiled in February 2001 as Sun's Web services strategy. At that time, analysts dismissed it as a bunch of old products being repositioned. Most of them expected that as the .NET release drew nearer, Sun would formulate its usual well-articulated vision to counter Microsoft's marketing machine.
To the disappointment of many, Sun announced only some XML interfaces to Java and little else. No overarching vision, no clever sound bites. Nothing. As can be seen from the companion interview with Marge Breya , the vice-president in charge of Sun ONE , there is still no vision beyond promoting Solaris, the iPlanet application server, and the Liberty Alliance.
While many magazines have reacted with surprise at Sun's lack of formulated response (Information Week ran this as its cover story recently; even consumer publications such as the Economist weighed in), Sun has several factors on its side. Most of all, it has time. .NET has only just started shipping and even though it shows promise, Microsoft generally takes several product releases to get its technology right. The current security issues with Microsoft Passport are consistent with this history.
In addition, there is no way to tell how interested developers will be in using C# or J#. On both counts, Sun has a huge lead with Java: Java works well and developers like it. Sun's problem is to hang on to Java sites, so that they don't become Java and .NET hybrids. And to do this, the company must soon start painting a vision that developers and IT shops can support.
Other Major Players
Sun's ability to shape an interesting Web services story for Java normally would depend on the participation of other key players in the Java community. However, two key players have no particular desire to help Sun out of its predicament. These are IBM and Oracleboth companies have tools that compete with Sun's iPlanet server. IBM was actually the first major vendor to have Web services ready to demo, doing so in the first half of 2001. Since then, it has filled out its product line considerably, and has done it with the help of the open-source community. Read our sidebar "IBM's Open-Source Approach to Building Web Services."
Oracle is trying to elbow its way into the fray. The company believes its database expertise, its application server, and longstanding commitment to Java give it the credentials to be a major player in Web services. Such a role, though, seems unlikely. In its current incarnation, Oracle's app server is barely a year old; its Java tools, arguably, have only recently become interesting; and the link between Web services and databases presents no problem that Oracle is uniquely qualified to solve. Consequently, Oracle's role will be secondary; it won't be on the vanguard of Web services. Read our sidebar "Oracle's Businesslike Take on Web Services Development."
Pure-play Web Services Vendors
In terms of software development, the pure-play Web services companies actually are among the most interesting. For example, Cape Clear is a company with impressive development tools, whose CapeStudio product handles pretty much any task necessary for the conversion of code to Web services including XML and WSDL generation, UDDI creation, and SOAP-XML interoperability. The company's CapeConnect product enables Java, C++, C#, COM, and CORBA objects to talk to each other through Web services without difficulty.
Other companies with products in this space include Avinon and Bowstreet, both of whom have products for converting business processes into Web services.