Computer Science E-259 XML with Java, Java Servlet, and JSP

Lecture 1: Introduction 17 September 2007 David J. Malan [email protected]

1 Copyright © 2007, David J. Malan . All Rights Reserved.

The Hype In the Press

"XML, as a context-rich, data-neutral file format, is probably the most important new technology development of the last two years." Michael Vizard, InfoWorld "An idea almost as good as peanut butter and chocolate!" XML/EDI Group "'[A] spreading ooze of data' will expand as people exchange data more easily with XML." Rita Knox, Gartner Group 2 Copyright © 2007, David J. Malan . All Rights Reserved.

The Hype In the Classroom

“XML’s strength is its wide adoption and excellent tools. XML itself is not that exciting.”

“XML is very zen. If you ‘get’ XML, it’s rarely about the XML, it’s about the data and the tools. If you don’t get it, it’s all about angle brackets and buzzword-compliance.”

3 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Goals of the Course ƒ ƒ

ƒ

Cut through the hype and get to the value Focus on ƒ practicality: what you need to know to do real work ƒ applications: what are the tools and technologies necessary to put XML to use ƒ possibilities: what are some of the most common ways XML is being used in applications Emphasize understanding from the bottom up

4 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Rewards of the Course ƒ ƒ

A solid understanding of XML, the syntax, data structures, and algorithms that surround it Xperience ƒ DTD, SVG, XForms, XInclude, XLink, XML Base, XML Encryption, XML Key Management, XML Namespaces, XML Schema, XML Signature, XPath, XPointer, XQuery, XSL-FO, and XSLT ƒ SAX and DOM ƒ JAXP and TrAX ƒ JavaServer Pages and Java Servlet ƒ HTTP, SOAP, web services, WSDL ƒ FOP, Stylus Studio, Tomcat, Xalan, Xerces, XMLSpy...

5 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Agenda ƒ ƒ ƒ

ƒ

Computer Science E-259 J2EE XML ƒ What ƒ Who ƒ When ƒ How ƒ Why Computer Science E-259

6 Copyright © 2007, David J. Malan . All Rights Reserved.

J2EE API

http://java.sun.com/javaee/5/docs/api/

7 Copyright © 2007, David J. Malan . All Rights Reserved.

J2EE J2SE

http://java.sun.com/j2se/1.5.0/docs/api/

8 Copyright © 2007, David J. Malan . All Rights Reserved.

XML What ƒ ƒ ƒ

ƒ

XML is a language for creating other languages! XML lets you define schemas for tag-based languages (ergo, “markup language”) XML allows you to extend any existing language (schema) with your own tags (ergo, “eXtensible”) Examples of XML schemas ƒ financial transactions (stock transactions) ƒ business documents (purchase order, invoice) ƒ remote procedure calls (SOAP) ƒ configuration files (security, server properties)

9 Copyright © 2007, David J. Malan . All Rights Reserved.

XML Who World Wide Web Consortium (W3C) http://www.w3c.org/

10

Image from http://www.w3.org/Consortium/Process-20010719/tr, copyright © 1999 – 2005, W3C.

Copyright © 2007, David J. Malan . All Rights Reserved.

XML When ƒ

The World Wide Web Consortium (W3C) formed an XML Working Group in 1996 with these design goals 1. 2. 3. 4. 5.

XML shall be straightforwardly usable over the Internet XML shall support a wide variety of applications XML shall be compatible with SGML It shall be easy to write programs which process XML documents The number of optional features in XML is to be kept to the absolute minimum, ideally zero 6. XML documents should be human-legible and reasonably clear 7. The XML design should be prepared quickly 8. The design of XML shall be formal and concise 9. XML documents shall be easy to create 10. Terseness in XML markup is of minimal importance

11 Copyright © 2007, David J. Malan . All Rights Reserved.

XML When ƒ

XML 1.0 became a standard (W3C recommendation) on 10 February 1998 ƒ effort grew out of experience with SGML ƒ cooperation between various W3C member organizations (including Microsoft, Sun, IBM, HP, Adobe)

ƒ

XML 1.1 became a standard (W3C recommendation) on 4 February 2004 ƒ less rigid constraints on names ƒ addresses issues involving character sets

12 Copyright © 2007, David J. Malan . All Rights Reserved.

XML How attribute element

child element

start tag

end tag

value Malan David text 20050621 29.95 Harry Potter and the Order of the Phoenix J.K. Rowling

13 Copyright © 2007, David J. Malan . All Rights Reserved.

XML How Malan David J
Oxford Street 33 Cambridge MA extend structure
without breaking
existing data and
applications 20050621 ...
14 Copyright © 2007, David J. Malan . All Rights Reserved.

XML Why: Content v. Presentation

http://www.blockbuster.com/

15 Copyright © 2007, David J. Malan . All Rights Reserved.

XML Why: Application Integration

Databases

New App

Legacy

ERP, Accounting, HR

16 Copyright © 2007, David J. Malan . All Rights Reserved.

XML Why: Application Integration

Databases

New App

Legacy



ERP, Accounting, HR

Enterprise Data Dictionary

17 Copyright © 2007, David J. Malan . All Rights Reserved.

XML Why: Application Integration

Databases

Databases

App

App

App

App

App

App The Internet

ERP, Accounting, HR

ERP, Accounting, HR

18 Copyright © 2007, David J. Malan . All Rights Reserved.

XML Why: Platform-Independent Services ƒ

ƒ ƒ

In the past, functionality was exposed to remote clients via various remote object standards ƒ COM/DCOM ƒ CORBA ƒ Java RMI Using these remote objects required a significant investment in a platform Web Services provide a new way to expose functionality ƒ use XML and XML data types for transport ƒ work with any platform ƒ provide a bridge to existing business services

19 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Prerequisites ƒ

Comfort with Java and HTML or XHTML is assumed.

20 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Expectations ƒ ƒ ƒ

Attend or watch all lectures Complete four assigned projects Design and implement a final project

21 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Grades ƒ ƒ ƒ ƒ ƒ

Project 1 Project 2 Project 3 Project 4 Final Project

22 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Lectures ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ ƒ

Lecture Lecture Lecture Lecture Lecture Lecture Lecture Lecture Lecture Lecture Lecture Lecture Lecture Lecture

1: Introduction 2: XML 1.1 and SAX 2.0.2 3: DOM Level 3 4: XPath 1.0 (and 2.0) and XSLT 1.0 (and 2.0) 5: XPath 1.0 (and 2.0) and XSLT 1.0 (and 2.0), Continued 6: Namespaces in XML 1.1 (Second Edition), SVG 1.1, and XSL (XSL-FO) 1.0 7: HTTP 1.1, JavaServer Pages 2.1, and Java Servlet 2.5 8: XQuery 1.0 and DTD 9: XML Schema (Second Edition) 10: XML Schema (Second Edition), Continued 11: Web Services, SOAP 1.2, and WSDL 1.1 12: Web Services, SOAP 1.2, and WSDL 1.1, Continued 13: Ajax 14: Conclusion

23 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Projects ƒ ƒ ƒ ƒ

Project Project Project Project

1: 2: 3: 4:

My First XML Parser XTube Wahoo! Scamazon.com

24 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Final Project ƒ ƒ ƒ ƒ

Pre-Proposal Proposal Status Report Implementation and Documentation

25 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Exams ƒ ƒ

No Midterm No Final Exam

26 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Books ƒ ƒ ƒ ƒ

Core Servlets and JavaServer Pages, Vol. 1: Core Technologies, Second Edition Essential XML Quick Reference XML Pocket Consultant XSLT Programmer’s Reference, Second Edition

27 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 nice.fas.harvard.edu

28 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Website

http://www.fas.harvard.edu/~cscie259/

29 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Staff

[email protected]

30 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Listserv

[email protected]

31 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Academic Honesty

With the exception of the final project, on which some collaboration is allowed, all work that you do toward fulfillment of this course’s expectations must be your own. Viewing or copying another individual’s work (even if published in a world-accessible directory) or lifting material from a book, magazine, website, or other source—even in part—and presenting said matter as your own constitutes academic dishonesty, as does showing or giving your work, even in part, to another student. Similarly is dual submission academic dishonesty: you may not submit the same or similar work both to this class and to another. Moreover, submission of any work that you intend to use outside of the course (e.g., at work) must be approved by the staff. All forms of cheating will be dealt with harshly. You are welcome to discuss the course’s material with others in order to better understand it. You are also welcome to discuss projects’ setups with others in order to resolve technical difficulties. But you may not discuss projects’ content with other students beyond superficial details. If in doubt as to the appropriateness of some discussion, contact the staff. 32 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 Brownie Points

33 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 XML with Java, Java Servlet, and JSP

Lecture 1: Introduction 17 September 2007 David J. Malan [email protected]

34 Copyright © 2007, David J. Malan . All Rights Reserved.

Computer Science E-259 - Fas Harvard

Cut through the hype and get to the value. ▫ Focus on. ▫ practicality: what you need to know to do real work. ▫ applications: what are the tools and technologies.

122KB Sizes 0 Downloads 175 Views

Recommend Documents

Computer Science E-259 - Fas Harvard
Apr 13, 2005 - 1. Copyright © 2007, David J. Malan . All Rights Reserved. Computer Science E-259. XML with Java. Lecture 11:.

Computer Science E-259 - Fas Harvard
“SVG is a language for describing two-dimensional graphics in XML. SVG allows ... Adapted from http://www.adobe.com/svg/basics/getstarted2.html. Viewable at ...

Computer Science E-259 - Fas Harvard
Computer Science E-259. XML with Java, Java ... Computer. Laptop. PDA. Web Server. JSP/servlet. JSP/servlet. EJB Server. EJB. EJB. DB. XML? ... Page 10 ...

Computer Science E-259 - Fas Harvard
Computer Science E-259. XML with Java. Lecture 5: XPath 1.0 (and 2.0) and XSLT ... All Rights Reserved. Computer Science E-259. Last Time. ▫ CSS Level 2.

Computer Science E-259 - Fas Harvard
Page 2 .... . . .... unidirectional hyperlinks of today's HTML, as well as.

Computer Science E-259 - Fas Harvard
All Rights Reserved. Computer Science E-259. XML with Java. Lecture 2: XML 1.1 and SAX 2.0.2. 24 September 2007. David J. Malan [email protected] ...

anchor.svg 1/1 - Fas Harvard
anchor.svg. 1/1 examples6/svg/. 1: 2:

foo.xml 1/1 - Fas Harvard
15: * characters are displayed as "\n", "\t", and "\r". 16: * explicitly, and line numbers are reported in errors. 17: *. 18: * @author Computer Science E-259. 19: **/.

books.xml 1/1 - Fas Harvard
2: . 3: DOCTYPE emails SYSTEM "emails.dtd">. 4: . 5:

README.txt 1/2 - Fas Harvard
3: Computer Science E-259. 4: 5: 6: OVERVIEW. 7: 8: In these directories are ... 13: * @author Computer Science E-259. 14: **/. 15: 16: public class TaxClient.

DiagServer.java 1/2 - Fas Harvard
DiagServer.java. 2/2 examples7/. 46: byteCount++;. 47: System.out.write(b); ... 2:

XML Schema (Second Edition) - Fas Harvard
After the release of XML 1.0, DTDs were soon recognized as insufficient. ▫ Work towards new schema standards began in early 1998. ▫ Different companies all ...

AttributeConverter1.xsl 1/2 - Fas Harvard
2/2 examples5/. 46: . 47: .... 2/2 examples5/. 44: 45: . 46: 47: . 48:  ...

XML Schema (Second Edition) - Fas Harvard
Establish a contract with trading partners. ▫ Documentation. ▫ Augmentation of instance with default values. ▫ Storage of application information ...

XPath 1.0 (and 2.0) - Fas Harvard
Computer Science E-259. This Time. ▫ CSS Level 2. ▫ XPath 1.0 (and 2.0). ▫ XSLT 1.0 (and 2.0). ▫ TrAX. ▫ Project 2 .... Displaying XML data on the Web as HTML.

Profiling a warehouse-scale computer - Harvard University
presents a detailed microarchitectural analysis of live data- center jobs, measured on more than 20,000 .... Continuous profiling We collect performance-related data from the many live datacenter workloads using ..... base with a well-defined feature

Profiling a warehouse-scale computer - Harvard University
Google to increasingly invest effort in automated, compiler- ... services that spend virtually all their time paying tax, and ...... Transactions of Computer. Systems ...

Horario FAS Docente.pdf
TALLER DE LENGUA. Y COMUNICACIÓN I. Código 0103011. Agustín Prado. SEMINARIO DE. PENSAMIENTO LÓGICO. MATEMÁTICO. Código 0207010.

Horario FAS Docente.pdf
Rosa Chavarría. DISEÑO DE. VESTUARIO. Código 0306051. Aurora Ayala. METODOLOGÍA DE. LA DANZA III. Código 0308053. Manuel Stagnaro. KINESIOLOGÍA II. Código 0317052. Moises Del Castillo. PSICOLOGÍA. GENERAL. Código 0201050. Doris Ramírez. HOR

The Future of Computer Science - Cornell Computer Science
(Cornell University, Ithaca NY 14853, USA). Abstract ... Where should I go to college? ... search engine will provide a list of automobiles ranked according to the preferences, .... Rather, members of a community, such as a computer science.

Computer Science E-259 Lectures - Computer Science E-259: XML ...
Sep 17, 2007 - most important new technology development of the last two years." Michael Vizard ... applications: what are the tools and technologies necessary to put ... XML. When. ▫ The World Wide Web Consortium (W3C) formed an XML.

Computer Science E-259
Jan 7, 2008 - Yahoo! UI Library http://developer.yahoo.com/yui/ ..... how to program in JavaScript and PHP, how to configure. Apache and MySQL, how to ...

Computer Science E-259
Nov 19, 2007 - labeling the information content of diverse data sources .... .... ELEMENT article (url, headline_text, source, media_type, cluster,.