530 likes | 681 Views
Real Problems Real Solutions Real XML AIIM Briefing Tom Cozzolino, Tim Vattima Answerthink. Today’s Agenda. What is XML? What are the target areas for XML? How has XML been used in Real Solutions? What is on the horizon for XML? Wrap-Up. Today’s Agenda. What is XML?
E N D
Real ProblemsReal SolutionsReal XMLAIIM BriefingTom Cozzolino, Tim VattimaAnswerthink
Today’s Agenda • What is XML? • What are the target areas for XML? • How has XML been used in Real Solutions? • What is on the horizon for XML? • Wrap-Up
Today’s Agenda • What is XML? • What are the target areas for XML? • How has XML been used in Real Solutions? • What is on the horizon for XML? • Wrap-Up
What is XML? • Brief History • What it is (and what it isn’t) • Key Components • XML and the Web • XML and Applications
What is XML? - Brief History • Based on Standard Generalized Markup Language (SGML), but omits obscure features • Developed by World Wide Web Consortium (W3C), originally as “Web SGML” • First spec completed November ‘96 • Created to help the extremes of HTML and SGML
What is XML? - (and what it isn’t) • XML is “an extremely simple dialect of SGML.. with the goal to enable generic SGML to be served, received, and processed on the Web in the way that is now possible with HTML” (source: XML specification) • It is not a programming language or a protocol but a “structured text format”
What is XML? Sample Document <?xml version =“1.0”?> <product barcode=“3456789A7”> <manufacturer>Sony</manufacturer> <name>DVD-5000-5</name> <quantity>75</quantity> <color>black</color> <description>5-Disc DVD Changer</description> </product>
What is XML? (source: xml.darmstadt.gmd.de)
What is XML? - Components: Document Type Descriptor (DTD) • A Formal statement regarding what a “valid document” may contain • Lists all elements, attributes, and entities used and associated contexts • Documents that do not conform to the DTD are invalid • Human Readable ... <!ELEMENT first_name (#PCDATA)> <!ELEMENT last_name (#PCDATA)> <!ELEMENT profession (#PCDATA)> <!ELEMENT name (first_name, last_name)> <!ELEMENT person (name, profession*)> ... Source: O’Reilly
What is XML? - Components: Parsers • Check documents for “well-formedness” (i.e., are all tags closed, etc.?) • Checks for “validity” (i.e., does it conform to the DTD?) • Parsers exist or under development for most platforms (W2K, Unix, PDA, Phone)
XML and the Web: Namespaces • A namespace “is a collection of element and attribute names identified by a URI reference” (source: XML FAQ) • Namespaces are necessary to allow “software modules..to be able to recognize the tags and attributes which they are designed to process, even in the face of ‘collisions’ occurring when markup intended for some other software package uses the same element type or attribute name” (source: W3C.org)
XML and the Web: Namespaces (cont’d) <?xml version="1.0"?><!-- both namespace prefixes are available throughout --><bk:book xmlns:bk='urn:loc.gov:books'xmlns:isbn='urn:ISBN:0-395-36341-6'><bk:title>Cheaper by the Dozen</bk:title><isbn:number>1568491379</isbn:number></bk:book> Source: http://www.w3.org/TR/REC-xml-names/
What is XML? - Components: Internationalization • XML Documents contain Unicode Text (supports about 50,000 characters) • All XML documents should have an encoding declaration: <?xml Version=“1.0” encoding=“KOI8-R”?> • xml:lang attribute can specify the language of a specific element
XML and the Web: Options • XHTML - Retrofit HTML Documents to be XML-compliant (i.e., <p> with </p>, etc.) • XML files + Cascading Style Sheets (CSS) - combines content (XML) with display (CSS) to produce HTML for browsers • XML files + Extensible Stylesheet Language (XSL) Transformation (XSLT) - very important!
XML and the Web: XLINK, XPOINTER • XLINK: HREF on steroids: bi-directional, actionable, “arcs” are supported <FOOTNOTE xmlns:xlink="http://www.w3.org/XML/XLink/0.9" xlink:type="simple" xlink:href="footnote7.xml">7 </FOOTNOTE> <STORE xlink:type=“locator” xlink:href=“http://www.amazon.com/bookinfo? theisbn=0192343451” xlink:label=“buy”>Amazon</STORE> • XPOINTER: Links portions of documents xpointer(/people/person/name/first_name/text())
XML and Applications: SAX, DOM • Two Alternatives to store/parse XML documents in memory: • DOM - Document Object Model - read the entire XML object into memory before operating on it (better for random access) • SAX - Simple API for XML - process the XML object on <tag> </tag> basis (better for large documents)
XML and Applications: RDF • Resource Description Framework (RDF) consistently and unambiguously describes products, services, and content for non-human consumers Source: http://www.ukoln.ac.uk/metadata/resources/rdf/examples/2/
XML and Applications: RDF (cont’d) <rdf:RDF xmlns:rdf="http://www.w3.org/TR/WD-rdf-syntax#" xmlns:dc="http://purl.org/dc/elements/1.0/" xmlns:dcq="http://purl.org/dc/qualifiers/1.0/"> <rdf:Description about="http://www.ariadne.ac.uk/"> <dc:Title>Ariadne - The Web Version</dc:Title> <dc:Subject> journal; magazine; elib; electronic libraries; digital libraries; networking; Web; IT; higher education </dc:Subject> <dc:Description> A Web magazine of Internet issues for librarians and information specialists </dc:Description> ... </rdf:RDF> Source: http://www.ukoln.ac.uk/metadata/resources/rdf/examples/2/
Today’s Agenda • What is XML? • What are the target areas for XML? • How has XML been used in Real Solutions? • What is on the horizon for XML? • Wrap-Up
B2B Pressures • Say Goodbye to EDI • EDI is batch - XML+B2B is near real-time • EDI is point-to-point - adding partners is difficult and tedious • Uses the inexpensive Internet • No costly WAN connections • XML-B2B uses simple protocols like HTTP(S) • Leverage Vertical Industry Standards • Finance/Banking uses ebXML or SOAP to allow real-time query/update for customers and partners • Information Services such as News, Weather, and Investment services use XML and SOAP to provide open B2B services to customers
Leveraging Investments in Legacy Systems • Streamlines Internal Processes by allowing Modern and Legacy Systems to coexist through a common interface to information • Flexible • XML can be easily changed to add / delete / change new business functions • Combining with XSLT typically means little or no reprogramming of old code • Self-Describing Data • XML contains not only the data but the metadata, so data definitions are always up to date
Delivering to Multiple Channels • Presentation Tier can support (m)any clients • Browsers - HTML • Phones - WML • Voice Processing - VoiceXML • PDA - HTML • XSLT transforms XML to appropriate client response, saving considerable effort and maintenance
XSLT • eXtensible Stylesheet Language (XSL) • Language for expressing style sheets • Like CSS, XSL is a file that describes how to display an XML document ... <scene> <FX>General Road Building noises.</FX> <speech speaker="Prosser"> Come off it Mr Dent, you can't win you know. There's no point in lying down in the path of progress. </speech> <speech speaker="Arthur"> I've gone off the idea of progress. It's overrated </speech> ... ... <xsl:template match="FX"> <fo:block font-weight="bold"> <xsl:apply-templates/> </fo:block> </xsl:templates> ... <xsl:template match="speech[@speaker="Arthur"]"> <fo:block background-color="blue"> <xsl:value-of select="@speaker">: <xsl:apply-templates/> </fo:block> </xsl:template> ... XML XSL XSLT HTML Source: http://www.w3.org/Style/XSL/WhatIsXSL.html
Dealing with Heterogeneous Environments UNIX Windows .NET JVM XML Mainframe Midrange JVM JVM • Support for multiple operating systems and component models • Supported on Windows / UNIX / Midrange / Mainframe • XML Messages easily passed via Message Oriented Middleware • SOAP, ebXML
Easing Application Development • Time Savings • Human-Readable tools automate Application building (ANT Build Tool) • XSLT can Promote Pattern-based automatic Code Generation:
Easing Application Development (cont’d) • Flexible Design • Java API for XML Binding (JAXB) for marshalling and unmarshalling XML and Java objects <order id=1225678> <date>12/15/2001</date> <customer id=00067></customer> <lineitems> <lineitem id=1 qty=4> <product id=145></product> </lineitem> <lineitem id=2 qty=2> <product id=201></product> </lineitem> <lineitem id=3 qty=10> <product id=357></product> </lineitem> </lineitems> </order> DTD J A X B Order Id:1225678 date:12/15/2001 custId:00067 lineitems:ArrayList
Easing Application Development (cont’d) • Flexible Design • Naming and Directory Services for location-transparent design (Universal Description, Discovery and Integration Services - UDDI) • Configuration Management, Application Properties • XML and SQL Databases: <root xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <Suffolk> <sql:query>SELECT name FROM tgr361030c WHERE fips != 0 FOR XML AUTO </sql:query></Suffolk> <root>
Today’s Agenda • What is XML? • What are the target areas for XML? • How has XML been used in Real Solutions? • What is on the horizon for XML? • Wrap-Up
How has XML been used in Real Solutions? • Freight Company: Expanding into the Dot Com World • Wireless Infrastructure Provider: Supporting Multiple Wireless Devices with the same content • Pharmaceutical Company: Publishing Internet-based subscriptions from multiple sources • Telco: Increasing Operating Efficiencies by adding multiple sales channels and partners
Freight Handling Company: Expanding into the Dot Com World • $375MM Freight Handler • How do non-Brick-and-Mortar Companies handle timely warehousing and fulfillment? • Customers demanding a “Glass Pipeline” to track end-to-end Logistics • Business Problem: Existing warehousing software solutions cannot easily handle multiple independent companies in the same warehouse
Freight Handling Company: Technical Solution • Use well-known Messaging infrastructure to provide highly-available connectivity between the new Order Management System and the Legacy Transaction processing system • Define XML-based message structure as the “payload” for messages between the disparate systems • Tools Used: IBM MQ Series and Microsoft Message Queue (MSMQ)
Freight Handling Company: Benefits of using XML • Enabled the developers to focus on the design of Order Management System, not point-to-point communications • Legacy: Led to a flexible, open architecture for integrating with the legacy transaction processing system (easy to add / modify transactions) • Heterogeneous: Common XML denominator allowed straightforward integration of IBM and Microsoft Technologies
Wireless Infrastructure Provider: Supporting Multiple Wireless Devices with the same content • Startup Company funded by Major device, Telco, and Financial Services Investors • Provides Infrastructure to link Multiple channels with information through the use of barcodes • Business Problem: Provide fast linkages between a large array of channels and back-end services, including: • Database, LDAP • Messaging • Voice Processing • Data Import and Export
Wireless Infrastructure Provider:Technical Solution • All responses to client are formulated as XML • XSLT is used to transform the XML response to the appropriate content for the target client • As new client-types become available, all that is needed is a new XSLT template for that client type – no rewriting of code
Wireless Infrastructure Provider:Technical Solution (cont’d) • Integration with many types of servers • Message-Oriented Middleware server queues XML messages among many services providing a fault tolerant, guaranteed delivery mechanism for messages • Each service is attached to a particular message queue to process the incoming XML
Wireless Infrastructure Provider:Technical Solution (cont’d) • A Custom Data Migration Service allows import and export of a client’s product list for maintenance and batch loading • Due to potentially large datasets, SAX is used to provide complete control over XML generation and parsing • Tools Used: Castor, SAX, XSLT, ANT, BEA Weblogic, Tibco
Wireless Infrastructure Provider: Benefits of using XML • Application Development: Cost savings • Code generation • XML templates for many similar Java Objects are run through an XSLT transformer to produce ready-to-compile java source files • ANT – Application Build Tool • Castor allowed XML to be used to marshall and unmarshall to and from Java objects - no additional coding was necessary beyond the objects’ DTD • > 100 hrs. of work saved • Heterogeneous: XML allows non-proprietary messaging across a variety of services • Flexible Design • Pluggable architecture
Pharmaceutical: Publishing Internet-based subscriptions from multiple sources • $14BN+ Annual Revenue • Grow top-line revenue by providing subscription-based information to Research Communities over the Internet • Business Problem: Create a uniform approach to handling various content styles and formats to be searched and browsed using a single taxonomy • Transform XML to HTML for presentation • Target: 90K documents loaded per month
Pharmaceutical: Technical Solution • Use XSLT to convert various content styles to common internal XML format • Use Industrial-strength RDBMS for indexing and retrieval of data stored in internal format • Tools Used: Oracle DB and Parser, XSLT, BEA WebLogic
Pharmaceutical: Benefits of using XML • Heterogeneous: Transforming all content to a standard XML format greatly simplified the loading, indexing and presentation of data from multiple sources • Development: Strategy allowed developers / architects to focus on the taxonomy browsing capabilities of the application
Telco: Increasing Operating Efficiencies by adding multiple sales channels and partners • $5+BN Revenue, 15+MM Subscribers Worldwide • High Investment in Legacy Systems • Requires seamless Integration among many services: Authorized Resellers (including LightBridge - Credit Check, Payment Plus - Deposit Settlement, External Billing, others) • Business Problem: Reduce operational friction between external partners and Company, provide lower delivery time for new customer services
Telco: Technical Solution (Authorized Resellers - 200K Transactions per month) • Commerce XML (cXML) DTD used to communicate to BrightPoint • Purchase Order sent as XML with response containing shipping information • cXML allows Company to use standards-compliant fulfillment vendors with no changes in its interfacing systems • Credit Check request sent to LightBridge via XML • LightBridge processes request and sends XML response with a credit rating in real time • Tools Used: Java-based XML Parsers, SOAP, iPlanet Application Server
Telco: Benefits of using XML on the project • B2B: SOAP / Web Services reduces the amount of knowledge trading partners need about each other’s technologies • Development: Loosely-coupled interfaces are more scalable and provide guaranteed delivery of transactions • Development: Using SOAP over HTTP sidesteps messy architectural / security constraints
Today’s Agenda • What is XML? • What are the target areas for XML? • How has XML been used in Real Solutions? • What is on the horizon for XML? • Wrap-Up
What is on the horizon for XML? Web Services • Allows dynamic Program-to-Program “Assembly” of Services • Leverages Public and Private Universal Description, Discovery and Integration Services (UDDI) • Huge amount of Industry Emphasis (IBM, Microsoft, BEA, Sun) • Standards Efforts (ebXML, others) coalescing around Web Services • Bottom Line: 6 mos. - 18 mos.
Web Services Sample Architecture A Simple Approach.. (source: ibm.com) Leads to Real Integration.. (source: webservices.org)