10
1 1 XML for Java Developers G22.3033-002 Session 1 - Main Theme Markup Language Technologies (Part I) Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences 2 Agenda n XML Generics n Course Logistics, Structure and Objectives n History of Meta-Markup Languages n XML Applications: Markup Languages n XML Information Modeling Applications n XML-Based Architectures n XML and Java n XML Development Tools n Summary n Class Project n Readings n Assignment #1a 3 XML Generics n XML means eXtensible Markup Language n XML expresses the structure of information (i.e., document content) separately from its presentation n XSL style sheets are used to convert documents to a presentation format that can be processed by a target presentation device (e.g., HTML in the case of legacy browsers) n Document Type Definitions (DTDs) or XML schemas are used to describe and validate content

g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

1

1

XML for Java Developers G22.3033-002

Session 1 - Main ThemeMarkup Language Technologies (Part I)

Dr. Jean-Claude Franchitti

New York UniversityComputer Science Department

Courant Institute of Mathematical Sciences

2

Agendan XML Generics

n Course Logistics, Structure and Objectives

n History of Meta-Markup Languages

n XML Applications: Markup Languages

n XML Information Modeling Applications

n XML-Based Architectures

n XML and Java

n XML Development Tools

n Summary

n Class Project

n Readings

n Assignment #1a

3

XML Generics

n XML means eXtensible Markup Languagen XML expresses the structure of information (i.e.,

document content) separately from its presentationn XSL style sheets are used to convert documents to a

presentation format that can be processed by a target presentation device (e.g., HTML in the case of legacy browsers)

n Document Type Definitions (DTDs) or XML schemas are used to describe and validate content

Page 2: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

2

4

Course Logistics

n Course Web Siten http://cs.nyu.edu/courses/summer01/G22.3033 -

002/index.htm

n http://www.nyu.edu/classes/jcf/g22.3033-002/

n Password: xmljava

n Review syllabus

n Textbooksn XML Development with Java 2

n Professional Java XML

n XML and Java, Developing Web Applications

5

Knowledge Required

n Know how to ftp files, send e-mail, and load URLs into a Web browser

n Reasonable knowledge of HTMLn Be able to write a basic HTML page including

links, images, and text using a text editorn Be able to place a page on a web servern Advanced Java programming experience

6

Knowledge Not Required

n SGMLn Programming in Perl, or any language other than

Javan Cascading Style Sheets and other HTML

advanced features

Page 3: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

3

7

Other Useful Knowledge

n Web server configuration and the HTTP protocoln JavaScriptn C programmingn Database theory (normalization rules)n SGML (basic knowledge)n Some knowledge of international character sets

8

History of Meta-Markup Languages

n SGML (see http://www.w3c.org)n Complex and expensive

n HTMLn Tim Berners-Lee (Cern), 1990n Simple replacement to SGML

n Lacked the flexibility and adaptability of XML

n W3C XML working groupn Jon Bosak (Sun), 1996n SGML strengths + HTML simplicity

9

History of Meta-Markup Languages(continued)

n XML 1.0 Specificationn Tim Bray

n Language simple enough for programmers to implement

n Language not limited to English

n Documents easy for search engine

n CML, Jumbo, MathMLn XLL (1997), CDF (1997), XSL (1997), MSXSL

(1998), XML-Data, Mozilla, etc.

Page 4: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

4

10

Why XML?n Domain specific markup languagen Common data format

n Simple, pure Unicode text

n Well-documentedn Data interchange

n Open Financial Exchange (OFX)

n XML non copyrighted

n Support of portable structured text data as most electronic information is text-based

11

Related Technologiesn JavaSoft’s Java API for XML parsing (JAXP)n Java bindings to SAX, and DOM APIsn HTMLn CSS, CSS2, and CSS3n XSL

n well formed XML documentsn URLs and URIs

n resource v.s. locationn Linking (XLL)n Unicode

12

Applications of XML:Markup Languages

n XML helps define sets of rules for forming semantic tags that break documents into parts

n XML is a Metamarkup languagen Not a markup language restricted to a fixed set of tagsn Can make up tags as you go along

n XML Tags can be documented in a DTDn i.e., a domain specific syntax and vocabulary (e.g., CML,

MathML, etc.)

Page 5: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

5

13

HTML Example

<dt>Java<dd>by Sun MicroSystem<ul><li>Publisher: O’Reilly<li>ISBN: 0-777-88888-9<li>Pages: 900</ul><P>The complete documentation.<P>

14

XML Corresponding Structure

<book><title>Java</title><author>Sun Microsystems</author><publisher>O’Reilly</publisher><isbn>0-777-88888-9</isbn><pages>900</pages><blurb>The complete documentation</blurb>

</book>

15

XML Enables Semantic/Structured Markup Languages

n XML describes a document’s structure and meaning

n XML does not describe the formatting of the elements

n Formatting is added through style sheetsn XML document only contains tags describing the

content (not the appearance) of the document

Page 6: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

6

16

XML Information Modeling Applications(Focus on Complex Structured Document Specification)

n Custom and Industry specific Markup Languages with own syntax and vocabulary

n CML (Chemical Markup Language)n MathML (Mathematical Markup Language)n CML (Channel Definition Format)n Classic Literaturen SMIL (Synchronized Multimedia Integration

Languagen OSD (Open Software Description)

17

XML-Based Architectures

n Presentation-Oriented Publishing Frameworksn XML-Based Application Serversn Message-Oriented Middleware Frameworksn Web Services Frameworks

n Peer to Peer (P2P) Computingn XML-Based eServices Protocols and Architectures

18

XML POP Frameworks(Focus on Content Management and Publishing)

n Requirements:n XML parsern XSL processorn Document repositoryn Collection of document DTDs or scheman Collection of XSL style sheets

n Parsing & processing can be client or server-basedn Samples server-side XML technology:

n Perl & CGI ( http://www.perl.com/CPAN)n Java servlets (http://www.alphaworks.ibm.com , www.apache.org)n ASPs (http://www.beyondhtml.com/rocket)

Page 7: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

7

19

XML POP Packaged Solutions

n Enterprise Information Portal (EIP) toolkitsn e.g., DataChannel’s XML framework

n Structured content management and retrieval systemsn e.g.,

n Vignette’s StoryServern Gauss Interprise’s VIP’XML -Gateway

n Poet’s Content Management Suiten Chrystal Software’s Astoria

20

XML MOM Applicationsn Component-based modeling

n e.g., XML Metadata Interchange (XMI)n Enterprise Application Integrationn Business-to-Customer (B2C) Applications

n e.g., e-Commercen Business-to-Business (B2B) Applications

n e.g., n WebMethodsn Bluestone’s XML-Server,

n eXcelon 2.0n XMLSolutions’ ExeterXML server

21

Java-enabled XML Technologiesn XML provides a universal syntax for Java semantics

(behavior)n Portable, reusable data descriptions in XMLn Portable Java code that makes the data behave in

various waysn XML standard extension

n Basic plumbing that translates XML into Javan parser, namespace support in the parser, simple API for

XML (SAX), and document object model (DOM)

n XML data binding standard extension

Page 8: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

8

22

XML and Java Standardsn XML includes is a family of technologies

n XSL, XML Schema, XML Query, XPath, XPointer, XLink, DOM, RDF, CSS, XSL, XHTML, XML Signature, MathML, SMIL, SVG, etc.

n Review the current state of the XML standards at http://www.w3c.org/XML

n Review the current state of Java Technology and XML (JAXP) standards at http://java.sun.com/XML

n Review the Java binding to DOM 2.0 at http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/java-binding.zip

23

XML Development Tools

n Read and write XML documentsn XML Editors

n e.g., Wattle Software’s XMLWriter, SoftQuad’s Xmetal, Vervet Logic’s XML Pro, eXcelon Stylus, XML Spy

n XML well-formedness and/or validation Processorsn e.g., IBM’s XML4J, Apache’s XercesJ, Oracle Parser, Java Project

X processor, James Clark’s Expat parser, Microsoft MSXML

n XML Browsersn e.g., IE5

24

Summary

n XML is a metamarkup languagen XML tags describe the structure and semantics of

a document’s content (not the format of the content)

n XML addresses SGML’s complexity and HTML’s inadequacies

n Applications of XML for information modeling exist in various domains (chemistry, math, multimedia, etc.)

Page 9: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

9

25

Summary (continued)

n XML supports MOM and POP applicationsn XML supports the Web Services Infrastructuren XML and Java complements each othern Java-enabled XML technology is available in the

market todayn Standards for integrating XML and Java are being

developed

26

Class Project

n Project Descriptionn The project will focus on “multi-channel online community

platforms”, and will consist of providing custom XML-based services to support the various aspects of a chosen eBusiness application

implemented on such platforms (e.g., “community -based shopping”). Examples of useful services to support these platforms may include synchronized multimedia presentation viewing, and “offline” chatcapabilities. A sample specification of an online community platform

for a virtual university eBusiness application will be provided for illustration purpose.

27

Readingsn Readings

n XML Development with Java 2: Chapter 1

n Professional Java XML: Chapter 1

n XML and Java: Chapter 1, Appendix C

n Handouts posted on the course web site

n Explore brief review of XML at XML in 10 points

n Read article at XMLJ2EE

n Review XML 1.0 (Second edition), Namespaces, and the

XML activity statement at W3C

n Project Frameworks Setup (ongoing)n Apache’s Web Server, TomCat, and Cocoon

n Apache’s Xerces, Xalan

Page 10: g22 3033 002 c11.prn...n Enterprise Application Integration n Business-to-Customer (B2C) Applications n e.g., e-Commerce n Business-to-Business (B2B) Applications n e.g., nWebMethods

10

28

Assignment

n Assignment #1a:n Explore the textbooks’ CDs, and the textbook references

to XML tools

n Install and experiment with XML editors. Settle on a tool

you feel comfortable using, and come up with a small

XML application that demonstrates the use of that tool.

Write a short report that uses your sample application to

document your findings and recommendations with

respect to selection criteria in support of XML editors

29

Next Session:Markup Language Technologies (Part II)

n Current state of the XML standardn Advanced XML applicationsn XML style Specification Languages