| ★ wanayoo — archive 1999 http://www.java.sun.com/features/2000/06/xml.j1.html | Nouvelle recherche | Portail wanayoo |
![]() |
|
||||
|
There's a lot of fresh opportunity for JavaTM technology developers with Sun's new XML tools and initiatives. Here's an update. by Jon Byous June 7, 2000 -- If you're an experienced Java technology developer, you probably know that XML and Java technologies are highly complementary, and capable of fueling a new crop of Web applications in e-commerce and enterprise systems integration. If you're just beginning to explore Java and XML technologies, you might conclude they were designed for each other from the ground up. XML is a widely accepted means of creating portable data, and the Java programming language delivers the goods to any platform through its portable code abilities. XML, portable data -- Java technology, portable code. A perfect match. But their complementary nature is just the beginning. There are some critical steps between generating and delivering data across platforms and between businesses. That's where tools and initiatives such as JavaTM API for XML Parsing (JAXP), Java API for XML Messaging (JAXM), XML for electronic business (ebXML), XML stylesheet tranformations (XSLT), and XML data binding come into play. The good news is that there is a lot of momentum behind the XML "movement," and Sun is just one of many players in the push to get XML into mainstream use. Organizations such as the W3C, the Organization for the Advancement of Structured Information Standards (OASIS), and XML.org are dedicated to the effort, and it's paying off. Sun's View of XMLSun's overall goals for XML are straightforward:
"In today's dot-com world, customers want to build applications with the assurance of both data and business logic interoperability within a heterogeneous environment" says George Paolini, vice president, Java Community Development, Sun Microsystems. "The Java 2 platform and XML provide the open, standards-based technologies to help ensure this interoperability without locking developers into proprietary environments." J2EETM technology will be a critical resource for developers in the dot-com economy. "We are committed to providing tight XML integration in the Java platform, and J2EE technology is a great example," says James Duncan Davidson, Sun's JAXP specification lead for Sun's Java Platform Group. "Furthermore, our primary goal is to support XML as a standard messaging format, particularly for business-to-business e-commerce." The XML Paradox: Messages vs. DocumentsThere seem to be two viewpoints on XML that divide developers. One side sees XML as a data-exchange format for machine-to-machine data. The other side sees XML as a document format for human-visible documents. "We believe they are actually complementary ideas," says Davidson. "When humans are directly interacting with the data, the 'document' view is probably more important. The document-centric view is important for browsers and editors. But when programs are swapping data, for example, PeopleSoft talking to SAP, the 'message' view is more relevant." Davidson explains that the document part is simple. "We support the W3C DOM API, which is designed from the ground up to be used by browsers and editors, as well as other tools that support documents. However, the really interesting space is on the messaging side with new developments, such as ebXML -- XML for electronic business."
Adopting Open Standards: Full Speed AheadSun is following the lead of W3C and others to promote open standards and support new, evolving standards in accordance with customer demand. "Some people mistakenly think Sun is competing with W3C, and that's definitely not the case," says Davidson. "Sun has active representatives in several key W3C XML Working Groups and participates in other standards consortia, such as OASIS." Following are some of the results of those efforts. The JavaTM API for XML Parsing (JAXP) Optional Package is Here The first step for Java technology developers exploring the potential of XML is to adopt Sun's Java API for XML Parsing Optional Package. It lets you quickly build Java technology-based applications powered by XML for a wide variety of tasks, including e-commerce, enterprise application integration, and Web publishing. In short, it's a time-saver. JAXP Optional Package enables the developer to read, manipulate, and generate XML documents through pure Java APIs. JAXP technology is seamlessly integrated with the Java 2 platform, and it offers a standard way for a Java platform-based application to plug in any JAXP technology-conformant parser. Of course, JAXP technology is fully conformant to XML standards from the W3C and the XML community. "Our goal," says Davidson, "is to endorse and pick up industry-standard specifications wherever possible. There's no need to reinvent the wheel at every turn." JAXP technology endorses the W3C DOM Level 1 specification and the open community's SAX 1.0 specification. Work is also ongoing to make Xerces, Apache's open source XML Parser, compliant with the JAXP Optional Package. XML Data Binding Is Coming For developers, XML data binding will greatly simplify XML coding. An expert group of industry leaders is currently working within the Java Community Process program to define an XML data-binding facility for the Java 2 platform. Code-named "Adelard," this technology will help developers create and maintain high-performance XML-enabled applications faster and with less effort than before. XML-based data binding establishes a two-way mapping between XML documents and program objects. It achieves this by compiling an XML DTD, or schema, into a set of Java classes that handle all the messy details of parsing, formatting, and validity checking. Thus, if you have a DTD or schema, you don't have to write any of this tedious code yourself. It all adds up to faster, better, cheaper development and processing. "XML data binding will make it possible for developers who know little about XML to write XML-enabled applications," notes Mark Reinhold, senior staff engineer at Sun and architect of the Adelard project. "At the same time it will allow sophisticated developers to customize the derived Java classes, for example by allowing them to specify that the value of a particular attribute is to be converted to an integer or a floating-point number rather than left as a plain string. While it won't replace general-purpose APIs like SAX and DOM, we see it as ideal for data-oriented applications of XML, which typically already rely upon a DTD or schema for validation purposes." Transport XML with Java API for XML Messaging (JAXM) Next in line will be the Java API for XML Messaging 1.0 specification. Sun has submitted a Java Specification Request (JSR) to the Java Community ProcessSM program for this specification to describe Java APIs designed specifically for the exchange of XML-based business documents, such as invoices, purchase orders, and order confirmations. JAXM technology is an essential part of the answer to a big question: How can businesses engage in short-lived commercial transactions, on an opportunistic basis, while at the same time leveraging the economics of the Web? "JAXM technology will let developers transport XML and non-XML business messages across disparate infrastructures -- HTTP, SMTP, and FTP protocols -- asynchronously with reliability and security," says Nicholas Kassem, a Sun senior staff engineer. As such, JAXM technology will define standard Java APIs that allow simple access from the Java platform to open XML messaging standards, such as the emerging ebXML Transport Routing and Packaging specification that is being developed with OASIS and many other companies. And Then There's ebXML Electronic business XML (ebXML) is a collaborative initiative supported by the United Nations body for Trade Facilitation and Electronic Business (UN/CEFACT), OASIS, and 120 industry participants. Soon ebXML will enable XML to be used in a consistent way for exchanging electronic business data, especially between separate enterprises. Evolving DOM/SAX and XSLT Currently, for parsing the industry is using DOM 1/SAX 1 as standards. But according to Sun's Davidson, that also will change. Sun plans to form an expert group for the next version of JAXP technology, which will support DOM Level 2 and SAX 2.0 -- and possibly XML stylesheet tranformations (XSLT) -- in the fall 2000 time frame. "XSLT will let you apply a stylesheet to an XML document to display the document in your particular style format," says Davidson. "We also see XSLT as 'translation glue' for business-to-business communications. Every business has its own XML markup structure for data, and that can be a problem. But XSLT can translate between the documents, solving the problem with simplicity." Getting Ahead of the Curve with J2EETM and XML TechnologiesXML's extreme versatility and enormous momentum have helped to make it the portable-data format of choice for program-independent and platform independent-data. Similarly, Java technology's extreme versatility and enormous momentum have helped to make it the portable code of choice for program-independent and platform-independent application logic. Together, they're the obvious choice to power the coming wave of business-to-business transactions, as well as applications, throughout the enterprise. That's why most XML tools are written in the Java programming language. But for J2EE technology developers in particular, XML, serving as a ubiquitous message interchange format, greatly increases the interoperability between J2EE technology-based applications and other systems. The result is that a J2EE technology-based server can talk to any other server anywhere, anytime, in any language. Combined with an array of new, time-saving XML tools, this interoperability gives you a head start in what may prove to be the biggest market this planet has ever seen.
See Also
Java API for XML Parsing (JAXP) 1.0
JAXP specification
ebXML Initiative
Proposed API for XML Messaging 1.0 Specification
The Apache Software Foundation
Apache XML Project (including Xerces) About the Author Jon Byous has been writing about technology -- from chips to mainframes -- for twenty years, working for Sun, Cisco, Oracle, Netscape, Quantum, and dozens of smaller tech firms. Jon has written over 25 articles about Java technology, a passion of his, for Sun's Java technology web site.
|
|
|
[ This page was updated: 15-Jun-00 ] |
||
|
|
||
|
Products & APIs -
Developer Connection -
Docs & Training -
Support Community Discussion - Industry News - Solutions Marketplace - Case Studies |
||
|
|
||
| Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World | ||
|
|
||
|