ADAM BOSWORTH HAS led the charge toward XML Web services, first as the chief architect of XML at Microsoft, then as the co-founder of CrossGain, and now as vice president of engineering at BEA Systems. In an interview with InfoWorld Test Center Director Steve Gillmor, Bosworth goes behind the scenes to describe the asynchronous and loosely coupled architecture of BEA’s Cajun Web services development tool. InfoWorld: What makes Cajun Web services easy to build? Is it the UI? Bosworth: We’ve built a framework for describing a Web service. The framework takes care of all the plumbing. The users think about the business logic that they write in response to each message, but not how the plumbing actually works. It makes it possible to provide both a UI that makes it very clear what’s going on in the Web services and a source-level view, so that in no way are you locked into the UI. You can always describe what you want without ever using the UI, [which] becomes an assistant and a convenient tool but not a requirement. Secondly, it’s a model for deployment, [which is] one of the things that can be hard in the Java world. There are some exceptions; deploying JSPs [JavaServer Pages] has been very easy. We made deploying Web services as easy as deploying JSP. Third, [it] is an automatic test harness; you can shake out your Web services so other people can understand how your Web service works and test out their interactions with it. InfoWorld: How do you expose the framework to the programmer? Bosworth: The effective thing that makes this easy is an idea which is increasingly common in the Java community — what we call server-side controls, [which are] very much like controls in half a dozen products out there in the PC world, from PowerBuilder to VB [Visual Basic]. But we show that there’s a way to use these controls that makes the entire programming model much easier for the programmer. No. 1, they have automatic integration with the IDE [integrated development environment] so the user doesn’t have to learn as much. They can automatically pick things out of a palette, set properties or controls. No. 2, the controls have a model for events. … They call you when an interesting event has occurred in the server — a timing event or a change to some critical resource. But they also call you when something asynchronous is occurring that you need to know about, [for example], someone has responded to your Web service or sent you back a message. You don’t [have to] think about the plumbing because the control has given you an event model for it and you simply write the appropriate event for the control. Lastly, controls can make APIs a lot simpler because a control can be specialized to the job that it’s doing. And it can provide a programming model that’s much simpler in terms of the properties and methods than the complete programming model and the entire API might require. So we make it very easy, for example, to queue messages by providing a very small and simple API compared to the complete JMS [Java Message Service] API that [developers] might otherwise have to learn. We basically let the user take advantage of the core capabilities of the J2EE platform, but not necessarily have to learn as much of the API set to do it. InfoWorld: So, it’s similar to VB’s ease of use as compared to C++? Bosworth: It’s very analogous to what VB did, [to] what PowerBuilder did with its data windows and other controls, or [to] what other people have done since, such as Delphi. Controls definitely hide from you a whole level of systems programming that you would otherwise have to take advantage of. InfoWorld: How does Cajun compare with Visual Studio? Bosworth: There are some [similarities] and there are some differences. [Microsoft’s Visual Studio] modifies the language itself. There are keywords that show up in the language that [Microsoft] uses to hide the plumbing. We chose to leave Java as Java and used a different technique for how we added semantics to hide the plumbing. And the way we did it, to be honest, is more open-ended and a little more democratic than the approach of a company that owns a language being able to add keywords to a language. The way that we show how you move from a simple synchronous service to a complex asynchronous service is just very different than anything we’ve seen from .Net. And the way that we show how you do loose coupling is very different than anything we’ve seen coming out of .Net as well, or [from] any other competitor for that matter. InfoWorld: What is your approach to loose coupling? Bosworth: We’ve built a standards model for annotating Java. The annotations describe the characteristics for any given method that’s going to be public as a Web service, for example, whether it [will] be invoked asynchronously or not. But it’s also used to describe the expected XML contract and the mapping into or from Java. We take the incoming message, which we assume to be an XML message, and we let the users describe as an annotation how they want that XML message [to be] mapped into the Java data structures that are their internal business. [The data structures] are not a part of the public contract; they’re part of the implementation of the application. That mapping language was very carefully designed for two things. First, it was designed for corporate developers. The general precept of any product is that simple things should be easy and hard things should be possible. In the case of corporate developers, it’s been our experience that simple things should be declarative but hard things should be procedural. Corporate developers have no trouble dealing with code; they do have trouble dealing with very rich, abstract languages. Accordingly we’ve built a very simple and intuitive mapping model. … And we get a bunch of other benefits out of the mapping model, such as we can automatically compute the schema of the messages so we can publish the WSDL [Web Services Description Language] of the Web service just from the description of the map. But at the same time we’ve added a procedural extensibility model for these maps. Any time the map can’t describe something complex that you want to do, you can easily and effortlessly procedurally extend the map to describe what you need to do as you map the XML. InfoWorld: A common scenario to get scalability and take advantage of J2EE’s strengths uses EJB [Enterprise JavaBeans] and JMS as the synchronous channel, with Web services adding asynchronous functionality. Are you focusing on the asynchronous side? Bosworth: We [are] focused on both. We support the synchronous capability; it comes for free and we do it very well. But we believe that most business-to-business Web services are going to need at least some degree of communication to be asynchronous. I talked to one customer that had [its] suppliers coming in already and adding goods to be sold; they want to send back notifications when the goods get sold or [about] the status of the goods. They don’t have a good model today that lets the sender automatically correlate these messages coming back with the request. Also, they have customers coming in with queries, which are expensive. They don’t want to do them [in] real time, they want to do them in the background and send back the response when they get a chance. And once again they’re looking for that asynchronous pattern. What we did was say, “Great, you can write the same service — parts will be synchronous, parts will be asynchronous — and we’ll support both in the same framework.” So we have a seamless ramp from synchronous to asynchronous, and that’s very different than most of the other choices that are out there. InfoWorld: Is the framework built on standards? Bosworth: Yes, because at the end of the day everything ends up being standard EJB or servlets and classes, depending on what the users told us they need to do semantically. We’re also discussing with Sun working together on JSR [Java Specification Requests] to make the higher level thing a standard as well. InfoWorld: Is this going to be in the J2EE 1.4 timeframe? Bosworth: I don’t think either we or Sun know yet. InfoWorld: There’s been a lot of discussion in the vendor community about providing a simpler development layer that might ship earlier than 1.4. Will BEA lead the J2EE vendors in this space? Bosworth: I see BEA adding a lot of contribution to this space. “Leading” is a very strong term, but certainly I see us playing a major role in helping the Java community get to this place. InfoWorld: In your Microsoft days, you got buy-in from people that mattered inside the company by opening up the process with XML to other vendors and then coming back to Microsoft and saying, “Well, everybody is supporting it now, so we need to also.” Will you go back to Microsoft now in the role of a competitor and try to get their cooperation with some of these standards? Bosworth: Yes. I believe Microsoft is an important player in this space and it’s incumbent on us to work with them. InfoWorld: Are they amenable to talking with you about this? Bosworth: I can’t comment on that. Software Development