79
Architecture of Present and Future Web Technologies Jay Sissom Indiana University [email protected] Version 2.0 So Many Tools, So Little Time

Architecture of Present and Future Web Technologies Jay Sissom Indiana University [email protected] Version 2.0 So Many Tools, So Little Time

Embed Size (px)

Citation preview

Page 1: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Architecture of Present and Future Web Technologies

Jay SissomIndiana [email protected]

Version 2.0

So Many Tools, So Little Time

Page 2: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Agenda

Basics Example application Tool overview DHTML/XML Summary

•Perl/CGI•Perl Apache Module•PHP 3•Cold Fusion•Active Server Pages•VB Webclasses•Java Server Pages•Java Servlets•Enhydra Java App Server

•Perl/CGI•Perl Apache Module•PHP 3•Cold Fusion•Active Server Pages•VB Webclasses•Java Server Pages•Java Servlets•Enhydra Java App Server

Page 3: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Disclaimers and Fine Print

Jay likes compiled languages much better than interpreted

Jay likes strongly typed languages Jay has LOTS of opinions What’s right for Jay might not be right

for you Examples don’t contain all the error

checking they should!

Page 4: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Web Transaction

Client Server

http://webdev.indiana.edu/cgi-bin/AcctBal webdev.indiana.edu

Page 5: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Web Transaction

Server

Connect to webdev.indiana.edu

Hello client, how may I serve you?

GET /cgi-bin/AcctBal

I’m going to run this program

/www/cgi-bin/AcctBal, then send you it’s output

Thanks, Bye!

Bye!

Client

http://webdev.indiana.edu/cgi-bin/AcctBal webdev.indiana.edu

Page 6: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Example program

IU departmental surplus auction site Modeled after eBayTM

Page 7: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Perl/CGI

CGI – Common Gateway Interface – the original dynamic web content interface

Perl – Interpreted language that excels at text processing

Page 8: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Perl

One of the most used web programming languages

Interpreted language Weakly typed Basic object oriented features Available on almost any Unix and Windows 9x,

NT, 2000 Open Source

Page 9: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Perl Pros

Free! Fairly quick development Tons of add-in modules Lots of documentation Has some object oriented features Has a database abstraction layer (DBI)

Page 10: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Perl/CGI Cons

JAY WARNING: Interpreted, Weakly typed CGI has lots of overhead

Page 11: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Perl/CGI Resources

http://www.perl.com/ - A bunch of Perl resources

http://www.cpan.org/ - Perl Modules http://www.perl.org/ - More Perl stuff

Page 12: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Perl Apache Web Module

An add-on to the Apache web server Lets you write web server modules in Perl Perl modules are loaded/compiled when the

web server loads Modules are reloaded when code changes (in

some cases) Open Source

Page 13: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Perl Web Module Pros

Free! Fairly easy to learn Code loaded and compiled once Tons of add-in modules/databases Lots of documentations Has a database abstraction layer (DBI)

Page 14: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Perl Web Module Cons

JAY WARNING: Interpreted, Weakly typed You are tied to Apache Difficult to develop/debug

Page 15: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Perl Web Module Resources

http://perl.apache.org/ - Get software/docs http://perl.apache.org/guide/ - Usage guide http://perl.apache.org/faq/ - FAQ http://perl.apache.org/dist/cgi_to_mod_perl.html

– Changing program from CGI – Mod Perl

Page 16: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

PHP

Hypertext Preprocessor Embeds code within HTML pages Supports many OS’s/Web Servers Open Source

Page 17: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

PHP Pros

Free! Easy to learn Easy development Some basic object oriented features Supports many modules/databases

Page 18: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

PHP Cons

Interpreted/Weakly typed language No database abstraction layer

Page 19: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

PHP Templates

<?php // code include “whatever.template”; ?>

<?php // code include “whatever.template”; ?>

<HEAD><TITLE><?php echo $title; ?>…

<HEAD><TITLE><?php echo $title; ?>…

whatever.template

Page 20: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

PHP Resources

http://www.php.net/ - PHP offical source http://www.phpbuilder.com/ - Example code

Page 21: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Cold Fusion

Interpreted HTML preprocessor Code is embedded in HTML pages Specialized tags contain code Works on NT/Solaris/Linux Commercial Product

Page 22: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Cold Fusion Pros

Commercial Support is available A popular web development tool Has OLEDB and native database drivers in

addition to ODBC

Page 23: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Cold Fusion Cons

Interpreted language Weakly typed language No OO features

Page 24: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Cold Fusion Resources

http://www.allaire.com/ - Allaire Corp http://www.houseoffusion.com/ - Cold Fusion

articles/information http://www.cfscripts.com/ - Scripts http://www.defusion.com/ - More stuff http://www.cfmcentral.com/ - More stuff

Page 25: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Active Server Pages

HTML preprocessor Interpreted language Code embedded within HTML pages NT/W2K only (3rd party package for Unix) Only OO features come from COM

Page 26: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Active Server Pages Pros

Free (comes with NT Option Pack or W2K) Quick development Extremely popular Pretty good development tools

Page 27: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Active Server Pages Cons

Pretty much limited to IIS on NT or W2K COM objects must be developed in different

language Very Weakly typed and Interpreted Only supports ODBC & OLEDB database

interfaces

Page 28: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Active Server Pages Resources

http://www.asptoday.com/ - Articles about ASP http://msdn.microsoft.com/ - MS docs http://www.develop.com/ - #1 MS technology

training company

Page 29: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

VB Webclasses

Web application development tool in Visual Basic

Comes in the Professional & Enterprise versions of VB

Compiled code that use HTML templates Only runs on IIS under NT or W2K

Page 30: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

VB Webclasses Pros

HTML and logic are separate (kinda) Logic is compiled! Language is strongly typed (if you like) Programmers write code, graphics designers

write HTML

Page 31: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

VB Webclasses Cons

Microsoft might drop the feature in a future version

There are still bugs in the VB feature Not enough separation between HTML and

logic

Webclasses & Visual Studio SP3+ don’t work well with

Windows 2000!*

Webclasses & Visual Studio SP3+ don’t work well with

Windows 2000!*

Page 32: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Webclasses & Win 2000

Knowledgebase Q255502 Knowledgebase Q259725 Knowledgebase Q234317

Page 33: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

VB Webclasses Resources

http://msdn.microsoft.com/ http://www.asplists.com/asplists/faqvbwebclass

es.asp - FAQ

http://www.desertware.com/vbuniverse/webclass.htm - Resources

Page 34: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Java Server Pages

Free! (Sometimes) The Java version of ASP & PHP Java code embedded within HTML Code is compiled and saved on first use Available on many OS/Web Servers Java is very object oriented

Page 35: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Java Server Pages Pros

Code is portable Very Strongly typed language Code is compiled once It’s not very difficult to port ASP to JSP

Page 36: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Java Server Pages Cons

Code and HTML are in the same file Java has a pretty steep learning curve

Page 37: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Java Server Pages Resources

http://www.serverpages.com/Java_Server_Pages http://java.sun.com/products/jsp/

Page 38: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Java Servlets

Free! (usually) Java Server API Code is compiled and saved on first use Available on many OS/Web Servers Java is very object oriented

Page 39: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Java Servlets Pros

API is pretty simple Code must be compiled before using Pretty portable The Servlet API can be overridden to provide

additional functionality

Page 40: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Java Servlets Cons

Sometimes a web server reset is required to load changed classes

Unless you use a third party package, HTML is in with the logic

Check out www.webmacro.orgCheck out www.webmacro.org

Page 41: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Java Servlet Resources

http://java.sun.com/ http://www.servletcentral.com/ - Online

magazine http://www.servlets.com/ http://www.webmacro.org/ - Separate HTML

from code

Page 42: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Enhydra App Server

Free! (pay version available) Java based with source code Proprietary web development model Automatic data mapping with optional business

logic layer Supports Servlets/Java Server Pages Supports EJB in Enterprise edition Available for many OS’s

Page 43: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Enhydra App Server

Page 44: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Enhydra Enterprise App Server

Page 45: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Enhydra App Server Pros

Very scalable even across OS’s Has built in data/object mapping Proprietary interface separates HTML from code Proprietary interface is based on WC3 DOM Also supports Java Servlets and JavaServer

Pages Can integrate with Jbuilder & Oracle Developer EJB support in Enterprise edition

Page 46: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Enhydra App Server Cons

Huge learning curve Proprietary UI development is difficult No commercial support yet Very little documentation Integrates with Jbuilder through Kelp add-on

Use JSP or Servlets with their Data

Objects and Business Objects!

Use JSP or Servlets with their Data

Objects and Business Objects!

Page 47: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Enhydra App Server Resources

http://www.enhydra.org/ http://www.lutris.com/

Page 48: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Enterprise Java Beans

A method for building business logic EJB Servers provide support for

– Transactions– Security– Database Connectivity

Deploy EJB’s on any compatible server without changing code*

* Assuming you didn’t use any proprietary features of a server.

Page 49: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Enterprise Java Beans

Used for very high-end applications Supported in many servers such as:

– Enhydra Enterprise Server– JRUN– Bea Weblogic– Gemstone/J– Persistence PowerTier for EJB– IBM Websphere– Jboss Open Source Server (www.jboss.org)– And others….

Page 50: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Current/Future tools

DHTML XML

– Server side– Client side

SOAP

Page 51: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

DHTML

Dynamic HTML Composed of

– HTML 4.0– Cascading Style Sheets (optional)– A scripting language– Document Object Model

Page 52: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

HTML 4.0

Standardized by W3C Organization Added <script> and <noscript> tags Added support for an event model Depreciated tags such as <font>

Page 53: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Cascading Style Sheets (CSS)

Allow increased flexibility in page layout Allows developer to separate form and content Level 1 supported in NS 4+ and IE 4+ NS & IE support different values for the

visibility attribute making cross-browser development more fun for us!

Page 54: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Scripting Languages

Netscape developed JavaScript Microsoft reverse engineered it and called it J-

Script The ECMA standardized it and calls it

ECMAScript-262 Microsoft also supports VBScript You can add PerlScript if you like Warning code may be different in NS & IE and will

need to be tested/debugged in both

Page 55: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Document Object Model

Standardized by the W3C Allows access to parts of a web page

programmatically by a scripting language <DIV> and <SPAN> tags are very important!

Page 56: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Uses for Dynamic HTML

Make web pages look nicer Allow developer to better use screen real

estate Provide client side logic such as form validation

Page 57: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Dynamic HTML Examples

Mouse overs Transitions Pop up menus Drag and drop Form validation

Page 58: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Dynamic HTML Resources

Dynamic HTML by Jeff Rule (Addison Wesley) http://www.ruleweb.com/ http://www.webreference.com/ http://www.htmlguru.com/

Page 59: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

XML

Extensible Markup Language Specification developed by the W3C A simplified version of SGML Markup meta-language – a language for

describing markup languages W3C is now working on rewriting HTML using

XML

Page 60: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

XML and data

HTML is great for describing how things should look:<strong>New York</strong>– But what is this???

XML is a way to put structured data in a text file

No presentation info – just data We can give our data meaning

Page 61: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Well-formed XML

<?xml version=‘1.0’?>

<Student>

<StudentID>999-88-7777</StudentID>

<Name>Bill Smith</Name>

<Email>[email protected]</Email>

<Transfer/>

</Student>

<?xml version=‘1.0’?>

<Student>

<StudentID>999-88-7777</StudentID>

<Name>Bill Smith</Name>

<Email>[email protected]</Email>

<Transfer/>

</Student>

Page 62: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Sharing XML

Problem: if everyone makes up their own tags, how will we ever agree on what the data means?

Answer: we need some rules We need a way to define our tags, plus any

relationships between them People who share this set of rules can exchange data

in a meaningful way This would be valid XML

Page 63: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

DTD

Document Type Definition

<!-- ELEM NAME CONTENT MODEL --><!ELEMENT weather (city+) ><!ELEMENT city (name, report) ><!ELEMENT name (#PCDATA) ><!ELEMENT report (high, low, precip?) ><!ELEMENT high (#PCDATA) ><!ELEMENT low (#PCDATA) ><!ELEMENT precip EMPTY ><!ATTLIST precip day_total CDATA # REQUIRED

type (rain | snow) “rain”force (light | heavy) #IMPLIED >

<!-- ELEM NAME CONTENT MODEL --><!ELEMENT weather (city+) ><!ELEMENT city (name, report) ><!ELEMENT name (#PCDATA) ><!ELEMENT report (high, low, precip?) ><!ELEMENT high (#PCDATA) ><!ELEMENT low (#PCDATA) ><!ELEMENT precip EMPTY ><!ATTLIST precip day_total CDATA # REQUIRED

type (rain | snow) “rain”force (light | heavy) #IMPLIED >

<weather> <city> <name>Bloomington</name> <report> <high>76</high> <low>46</low> <precip day_total=“0” type=“rain” force=“light”/> </report> </city></weather>

<weather> <city> <name>Bloomington</name> <report> <high>76</high> <low>46</low> <precip day_total=“0” type=“rain” force=“light”/> </report> </city></weather>

Page 64: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Schemas

Schemas provide the same functionality as DTDs, but in an XML format:

<?xml version="1.0" ?>

- <!-- Generated by XML Authority. Conforms to XML Data subset for IE 5

--> -<Schema name="SIF" xmlns="urn:schemas-microsoft-com:xml-data" - xmlns:dt="urn:schemas-microsoft-com:datatypes">

- <ElementType name="K12Framework" content="eltOnly" order="one">

<element type="K12Register" />

</ElementType>

- <ElementType name="K12Register" content="eltOnly" order="seq">

<element type="Header" />

<element type="Source" />

</ElementType>

<?xml version="1.0" ?>

- <!-- Generated by XML Authority. Conforms to XML Data subset for IE 5

--> -<Schema name="SIF" xmlns="urn:schemas-microsoft-com:xml-data" - xmlns:dt="urn:schemas-microsoft-com:datatypes">

- <ElementType name="K12Framework" content="eltOnly" order="one">

<element type="K12Register" />

</ElementType>

- <ElementType name="K12Register" content="eltOnly" order="seq">

<element type="Header" />

<element type="Source" />

</ElementType>

Page 65: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Schema initiatives

There are lots of schemas already out there Most are industry specific No need to reinvent the wheel Check out www.biztalk.org

Page 66: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Name Collisions

What if somebody else is already using our tags???

We need a way to allow people to define unique tags and attributes and have them coexist in the same document

Namespaces solve this problem

Page 67: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Namespaces

<x xmlns:edi='http://ecommerce.org/schema'><!-- the 'price' element's namespace is http://ecommerce.org/schema -->  <edi:price units='Euro'>32.18</edi:price>

</x>

<x xmlns:edi='http://ecommerce.org/schema'><!-- the 'price' element's namespace is http://ecommerce.org/schema -->  <edi:price units='Euro'>32.18</edi:price>

</x>

Page 68: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

XML Implementations

Parsers– Perl Parser based on expat found on CPAN– Xerces for for Java, Perl, C++ xml.apache.org– MSXML built into IE 5

Page 69: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Client Applications for XML

Pass datasets to a browser. Browser script can manipulate data (IE 4&5 only)

Client applications can retrieve XML data from a web server for processing

Page 70: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Server Applications for XML

Data can be stored in XML and combined with XSL on the server to create HTML to be sent to a browser

XML can be passed between applications

Page 71: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

XML Resources

http://msdn.microsoft.com/xml http://xml.apache.org/ http://www.xml.com/ http://www.xmlmag.com/ http://www.ibm.com/xml

Page 72: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

SOAP

Simple Object Access Protocol XML/HTTP based protocol for accessing

services in a platform-independent manner Implementations exist in COM, ASP, Java, Perl

and maybe other languages

Page 73: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Reasons for SOAP

Cross-Platform connectivity Cross-Language connectivity Object access through firewalls

Page 74: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

SOAP Request

POST /StockQuote HTTP/1.1Host: www.stockquoteserver.comContent-Type: text/xml; charset="utf-8" Content-Length: nnnn SOAPAction: "Some-URI"

<SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-URI"> <symbol>DIS</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

POST /StockQuote HTTP/1.1Host: www.stockquoteserver.comContent-Type: text/xml; charset="utf-8" Content-Length: nnnn SOAPAction: "Some-URI"

<SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:GetLastTradePrice xmlns:m="Some-URI"> <symbol>DIS</symbol> </m:GetLastTradePrice> </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 75: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

SOAP Response

HTTP/1.1 200 OKContent-Type: text/xml; charset="utf-8“Content-Length: nnnn

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> <SOAP-ENV:Body> <m:GetLastTradePriceResponse xmlns:m="Some-URI"> <Price>34.5</Price> </m:GetLastTradePriceResponse> </SOAP-ENV:Body></SOAP-ENV:Envelope>

HTTP/1.1 200 OKContent-Type: text/xml; charset="utf-8“Content-Length: nnnn

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> <SOAP-ENV:Body> <m:GetLastTradePriceResponse xmlns:m="Some-URI"> <Price>34.5</Price> </m:GetLastTradePriceResponse> </SOAP-ENV:Body></SOAP-ENV:Envelope>

Page 76: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

SOAP Implementations

MS Visual Studio 6 Wizard Simon Fell’s COM server Java from the Apache Group Developmentor COM, VB, Perl implementation CPAN Perl SOAP-Lite

Page 77: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

SOAP Resources

http://msdn.microsoft.com/xml http://www.develop.com/soap http://soap.weblogs.com/ http://www.zaks.demon.co.uk/com/index.html

Page 78: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Summary

There are many tools available for web development

Don’t overlook free tools! Learn DHTML and XML and use them in your

projects

Page 79: Architecture of Present and Future Web Technologies Jay Sissom Indiana University jsissom@indiana.edu Version 2.0 So Many Tools, So Little Time

Questions

??