Introduction to Web Technologies for Effective Dissemination of Information 13 November 2000 SIGAda - PowerPoint PPT Presentation

1 / 133
About This Presentation
Title:

Introduction to Web Technologies for Effective Dissemination of Information 13 November 2000 SIGAda

Description:

(Currie Colket ~ 90 minutes) ... Creating Anchors/Targets. Creating Relative Links ... Anchors and text highlighting tags only. 13 November 2000. SIGAda WWW 26 ... – PowerPoint PPT presentation

Number of Views:159
Avg rating:3.0/5.0
Slides: 134
Provided by: Col57
Learn more at: http://www.sigada.org
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Web Technologies for Effective Dissemination of Information 13 November 2000 SIGAda


1
Introduction to Web Technologies for Effective
Dissemination of Information13 November
2000SIGAda 2000
SIGAda Home Page ? http//www.acm.org/sigada
Mr. Currie Colket SIGAda Vice Chair for Meetings
and Conferences Phone (703) 883-7381 Email
colket_at_mitre.org colket_at_acm.org Dr. John
McCormick SIGAda Secretary Phone (319) 273-2618
Email mccormic_at_cs.uni.edu SIGAda_Secretary_at_acm.
org Mr. David A. Wheeler Institute for Defense
Analyses Phone (703) 845-6662 Email
dwheeler_at_ida.org dwheeler_at_dwheeler.com Mr.
Clyde Roby Institute for Defense Analyses Phone
(703) 845-6666 Email roby_at_ida.org
2
Motivation
  • This tutorial is designed for the SIGAda
    volunteer interested in using WWW technologies to
    promote Local activities and Working Group
    activities. At the end of this tutorial, you will
    be able to
  • Use simple web-authoring tools
  • Develop your own Home Page
  • Tailor it to effectively communicate to your
    audience
  • Establish Home Page on ACM host
  • Use simple web-posting tools
  • Use simple web-verification tools
  • Establish maillists for your activity

3
Overview
  • Introduction to WWW and SIGAda Home Page as
    Notional Example
  • (John McCormick 20 minutes)
  • Introduction to HTML and use of Netscape
    Composer
  • (Currie Colket 90 minutes)
  • Effective Design Strategies Appropriate to
    Disseminating Information
  • (Clyde Roby 30 minutes)
  • Tools to Manage Development of Web Pages
  • (Clyde Roby 40 minutes)
  • Introduction to Ada CGI (David A. Wheeler 90
    minutes)
  • Using ACM WWW and Maillist Facilities
  • (John McCormick 60 minutes)
  • Introduction to XML (Currie Colket 30
    minutes)

Start 830 Break 1000 Lunch 1200 Back
130 Break 300 End 500
4
Introduction to SIGAda Home Pageas Notional
Example
John McCormick SIGAda Secretary
5
SIGAda Home Page - 1
6
SIGAda Home Page - 2
7
SIGAda Home Page - 3
8
SIGAda Home Page - 4
9
SIGAda Home Page - 5
10
SIGAda Home Page - 6
11
SIGAda Home Page - 7
12
Introduction to HTML and use of Netscape
Composer
Currie Colket MITRE SIGAda Vice Chair for
Meetings and Conferences
13
Introduction to HTML
  • HTML Basics
  • Fonts Colors Bold Italics
  • Creating Lists
  • Creating Links to URLs
  • Creating Anchors/Targets
  • Creating Relative Links
  • Creating Mailto Links
  • Incorporating Images
  • Putting Code On-line
  • Forms
  • Using the HTML ltHeadgt
  • Netscape Composer (a WYSIWYG)
  • Creating Tables

14
Motivation for Knowing HTML
  • Many WYSIWYG Tools- Why Learn HTML?
  • Output of tools is not always portable
  • Some use advanced features of HTML
  • Some use non-standard extensions of HTML
  • Some tools generate XML instead of HTML
  • Browsers typically omit information not
    understood
  • Many browsers cant handle XML
  • Tools can not always support desired goals
  • Occasionally cleanup of HTML code is required
  • Porting from one tool to another
  • Eliminate garbage automatically generated
  • Strengthens understanding of WWW capabilities
  • Understanding HTML is good foundation for XML

15
What is HTML
  • Lingua franca for publishing hypertext on the
    World Wide Web
  • Non-proprietary format based upon SGML
  • Created and processed by a wide range of tools
  • from simple plain text editors to
    sophisticated WYSIWYG authoring tools
  • Uses tags such as lth1gt and lt/h1gt to structure
    text for Presentation
  • Browsers attempt to produce page even when
    there are errors
  • Produced by W3C as recommendation voted on by
    Consortium members
  • http//www.w3.org/MarkUp/
  • Status Version 4.01 is current recommendation,
    replacing Version 3.2
  • Support for Style Sheets - Control color, font,
    and layout
  • Internationalization Features - text right to
    left (Hebrew Arabic)
  • Accessibility Features - Braille and speech
    synthesizers
  • Tables and Forms - many new features
  • Scripting and Multimedia - many new features
  • 3 Flavors of HTML
  • Transitional - take some advantage of 4.0, but
    primarily support 3.2
  • Strict - use style sheets, i.e., free of tags
    associated with layout
  • Frameset - used to partition browser into one
    or more frames

16
HTML Basics
  • HTML HyperText Markup Language is Semantic
    Markup
  • physical indent 1.0, Use 24-Point Roman
    Font, Print Hello
  • semantic ltH1gtHellolt/H1gt uses markup
    tags
  • Physical is WYSIWYG HTML will differ on each
    system
  • Designed to be extensible, in fact, still
    evolving
  • Uses HyperText Transport Protocol (HTTP)
  • Tag names are case insensitive
  • HTML Program Structure
  • Some Tags have attributes
  • Text is continuous
  • regardless of spaces/CR
  • Most Tags in pairs solo
  • ltPgt Paragraph Break
  • ltBrgt Line Break
  • ltHRgt Horizontal Rule

ltBODY BACKGROUNDmy_file.jpg T
EXT"000000" LINK"0000ff"
VLINK"ff0000" BGCOLOR"ffffef"gt
ltHTMLgt ltHEADgt ltTitlegt lt!--Non-visible
stuff here--gt lt/heaDgt ltBodygt lt!--Visible
stuff here--gt lt/BODYgt lt/HTMLgt
17
Fonts Colors Bold Italics
ltH1gt Highlighting HTML lt/H1gt Characters can be
highlighted using ltBgtBoldfacedlt/Bgt, ltBIGgtBig
and ltBIGgtBiggerlt/BIGgtlt/BIGgt text, ltIgtItalicized
textlt/Igt, ltSgtStrike-through Textlt/Sgt, ltSMALLgt
Small and ltSMALLgt Smaller lt/SMALLgt lt/SMALLgt
text, with ltSUBgtSubscriptslt/SUBgt and
ltSUPgtSuperscriptslt/SUPgt, with ltTTgtTypewriter
fontlt/TTgt and even ltUgt underlining for emphasis.
lt/Ugt ltPgtThere is also a concept of Logical
Highlighting using ltSTRONGgtStrongly
Emphasizedlt/STRONGgt Text, ltCODEgtComputer
Codelt/CODEgt Text, ltKBDgtKeyboard Characterlt/KBDgt
Text, ltSAMPgtLiteral Characterlt/SAMPgt
Text, ltDFNgtDefining Instancelt/DFNgt Text,
ltEMgtEmphasizedlt/EMgt Text, ltVARgtVariablelt/VARgt
Text, ltSTRIKEgtStrike-outlt/STRIKEgt Text.
ltPgtltCENTERgtltFONT COLOR"009900"gt ltFONT
SIZE4gtSIGAdalt/FONTgtlt/FONTgt ltBRgtltFONT
COLOR"FF0000"gt ltFONT SIZE3gt WWW
Tutoriallt/FONTgtlt/FONTgt ltFONT COLOR"BLUE"gt ltFONT
SIZE2gt ltPgt Sunday, 730 - 1130
PMlt/FONTgtlt/FONTgtlt/CENTERgt
18
Creating Lists
ltH1gt List Example lt/H1gt ltPgtThe 3 most important
things in real estate are Ordered
Lists ltOLgt ltLigt Location, ltLigt Location, and
lt/Ligt ltLigt Location (It should be noted that all
lists will wrap around with the correct
indentation desired for the screen. lt/OLgt The
most important things in talking about software
are UnOrdered Lists ltULgt ltLigt Using Bullets
Correctly ltLigt Using Plenty of Bullets, and ltLigt
Using Subordinate Bullets When Necessary ltOL
TYPE"a"gt ltLigt With Letters ltLigt Again
with Letters ltOL TYPE"i"gt
ltLigt With Small Roman Numerals lt/OLgt
ltOL TYPE"I"gt ltLigt With Large Roman
Numeralslt/OLgt ltOL TYPE"1"gt
ltLigt With Numbers lt/OLgt ltOL TYPE"1"
START"7"gt ltLigt Even With Numbers Out
of Sequence lt/OLgt lt/OLgtlt/ULgt
19
Creating Links to URLs - 1
ltH1gt Link Example lt/H1gt ltPgtThe following URLs
contain useful information on using
html ltOLgt ltLIgt ltA HREF"http//www.w3.org/MarkUp/
"gtW3C HTML Home Pagelt/Agt -
ltIgthttp//www.w3.org/MarkUp/lt/Igt ltLIgt ltA
HREF"http//www.w3.org/MarkUp/Activity.html"gtW3C
User Interface Domainlt/Agt -
ltIgthttp//www.w3.org/MarkUp/Activity.htmllt/Igt ltLIgt
ltA HREF"http//www.cc.ukans.edu/acs/docs/other/
HTML_quick.shtml"gtHTML Quick Referencelt/Agt -
ltIgthttp//www.cc.ukans.edu/acs/docs/other/
HTML_quick.shtmllt/Igt ltLIgt ltA HREF"http//werbach.
com/barebones/"gtThe Bare Bones Guide to HTMLlt/Agt
- ltIgthttp//werbach.com/barebones/lt/Igt
ltLIgt ltA HREF"http//www.ncsa.uiuc.edu/SDG/Softwa
re/Mosaic/Docs/d2-htmlinfo.html"gt Creating
HTML Documentslt/Agt -
ltIgthttp//www.ncsa.uiuc.edu/SDG/Software/Mosaic/Do
cs/d2-htmlinfo.htmllt/Igt ltLIgt ltA
HREF"http//www.eclipse.net/derek/"gtHTML Primers
and Tutorialslt/Agt -
ltIgthttp//www.eclipse.net/derek/lt/Igt ltLIgt ltA
HREF"http//www.bbsinc.com/symbol.html"gt
ISO Latin 1 Character Entities and HTML Escape
Sequence Tablelt/Agt -
ltIgthttp//www.bbsinc.com/symbol.htmllt/Igt ltLIgt ltA
HREF"http//www.willcam.com/cmat/html/crossref.ht
ml"gtCompact Index of HTML Tagslt/Agt -
ltIgthttp//www.willcam.com/cmat/html/crossref.htmllt
/Igt ltLIgt ltA HREF"http//www.ncsa.uiuc.edu/SDG/Sof
tware/Mosaic/Docs/d2-tech.html"gt HTML, URL,
and HTTP Technical Information and
Specificationslt/Agt -
ltIgthttp//www.ncsa.uiuc.edu/SDG/Software/Mosaic/Do
cs/d2-tech.htmllt/Igt ltLIgt ltA HREF
http//dir.yahoo.com/Computers_and_Internet/Inform
ation_and_Documentation/Data_Formats/HTML/"gt
Yahoo HTML Search Nodelt/Agt -
ltIgthttp//dir.yahoo.com/Computers_and_Internet/Inf
ormation_and_Documentation/Data_Formats/HTML/lt/Igt
lt/OLgt
20
Creating Links to URLs - 2
21
Creating Anchors/Targets
ltHTMLgt ltHEADgt ltTITLEgtAnchors/Targets
Examplelt/TITLEgt lt/HEADgt ltBODYgt ltH1gtAnchors/Target
s Examplelt/H1gt ltPgtNavigation ltA
HREF"Email"gtEmail Addresseslt/Agt ltA
HREF"News"gtNewslt/Agt ltA HREF"Weather"gtWeathe
rlt/Agt ltBrgtlt/Pgt ltH2gtltA NAME"Email"gtEmail
Addresseslt/H2gt ltULgt ltLIgtltA HREF"email.html"gt
Pelot Email Addresseslt/Agt lt/LIgt ltLIgtltA
HREF"email.htmlColket"gt Colket Email
Addresseslt/Agt ltIMG SRC"gif/updated.gif"
WIDTH46 HEIGHT11gtlt/LIgt ltLIgtltA
HREF"email.htmlColcord"gt Colcord Email
Addresseslt/Agt lt/LIgt lt/ULgt ltH2gtltA
NAME"News"gtNewslt/H2gt News stuff ltH2gtltA
NAME"Weather"gtWeatherlt/H2gt Weather Stuff lt/HTMLgt
22
Creating Relative Links
ltH1gtltA NAME"Top"gtRelative Link
Examplelt/H1gt ltPgtNavigation ltA
HREF"http//www.colket.org/"gt To
www.colket.orglt/Agt ltA HREF"file///c/www/inde
x.html"gt To C Drivelt/Agt ltBrgt lt/Pgt Technology
Resources ltA HREF"acronyms.html"gtAcronymslt/Agt
ltA HREF"Ada.html"gtAdalt/Agt ltA
HREF"confere.htmlConferences_Future"gt
Conferenceslt/Agt ltA HREF"html.html"gtHTMLlt/Agt
ltA HREF"internet.html"gtInternetlt/Agt ltA
HREF"java.htmlInternet"gtJavalt/Agt ltA
HREF"OO.htmlOO"gtOOlt/Agt ltA HREF"Reuse.html"gtR
euselt/Agt ltA HREF"email.html"gtEmail
Addresseslt/Agt ltBrgt

Useful for Program Development File on local
system has same relative name as file on remote
system Switch from one system to other with
simple click
23
Creating Mailto Links
ltHTMLgt ltHEADgt ltTITLEgtMailto Example
lt/TITLEgt lt/HEADgt ltBODYgt ltH1gt Mailto Example
lt/H1gt Please email comments on this course to ltA
HREF"mailto quotCurrie Colketquot
ltcolket_at_acm.orggt, quotBrad
Balfourquot ltbbalfour_at_acm.orggt,
quotClyde Robyquot ltroby_at_ida.orggt
, quotJohn McCormickquot
ltmccormick_at_nova.cs.uni.edugt"
TITLE"Comments on Course"gt Currie, Brad,
Clyde, and Johnlt/Agt ltPgtltADDRESSgtCurrie Colket
ltA HREF"mailtocolket_at_acm.org"gt
(colket_at_acm.org)lt/Agt lt/ADDRESSgt lt/BODYgt lt/HTMLgt
quotCurrie Colketquot ltcolket_at_acm.orggt
is equivalent to Currie Colket
ltcolket_at_acm.orggt
24
Incorporating Images
ltH1gt Image Example lt/H1gt ltPgt ASIS is an
interface between an Ada environment as defined
by ISO/IEC 86521995 (the Ada Reference Manual)
ltIMG Alignbottom SRC"gif/new.gif"gt and any
tool requiring information from this
environment, as shown below ltIMG
SRC"gif/updated.gif" WIDTH46
HEIGHT11gt ltCentergt ltIMG SRC"gif/asis.gif"
ALT"ASIS as interface to Ada compilation
environment" WIDTH488 HEIGHT306gtltBRgt ltBgtASIS
as interface to Ada compilation
environmentlt/Bgt lt/Centergt
Bad Form
Good Form
Better Form
  • Above image made in PowerPoint by
  • Creating image cutting it from page
  • Using Page Setup, selecting landscape, 3x5
  • Pasting image onto page aligning it to center
  • Saving as gif (or jpeg)
  • Obtaining size using Photo Editor Resize
    function

Size is important allows for building page sans
images ALT for browsers without graphics or
browsers turned off
25
Putting Code On-line
ltH1gt Code Example lt/H1gt ltPgt EXAMPLE
Loop iteration scheme ltpregt List
constant Asis.Element_List -- 3.7
ltIgtltASIS function returning a listgtlt/Igt
An_Element Asis.Element
-- 3.6 begin for I in List'Range
loop An_Element List (I)
ltSTRONGgtProcess (An_Element)
lt/STRONGgtend loop lt/pregt
  • Use ltPREgt for large blocks of code
  • For Preformatted text
  • Characters in fixed width
  • Preserves space characters, CR
  • Allows for character emphasis
  • Anchors and text highlighting tags only

26
Forms - 1
ltH1gt Form Example lt/H1gt ltFORM ACTION"mailtocolke
t_at_acm.org" METHOD"POST"gt ltBgtLast Name
lt/BgtltINPUT TYPE"TEXT" MAXLENGTH"255"
NAME"Lastname"gt ltBgtFirst Name lt/BgtltINPUT
TYPE"TEXT" MAXLENGTH"255" NAME"Firstname"gtltBrgt
ltBgtAddress Line 1 lt/BgtltINPUT TYPE"TEXT"
MAXLENGTH"255" SIZE"50" NAME"Address1"gtltBrgt ltBgt
Address Line 2 lt/BgtltINPUT TYPE"TEXT"
MAXLENGTH"255" SIZE"50" NAME"Address2"gtltBrgt ltBgt
City lt/BgtltINPUT TYPE"TEXT" MAXLENGTH"40"
NAME"City"gt ltBgtState lt/BgtltSELECT NAME"State"
gt ltOPTION SELECTEDgt DC ltOPTIONgt MD
ltOPTIONgt VA lt/SELECTgt ltBgtZip lt/BgtltINPUT
TYPE"TEXT" MAXLENGTH"15" NAME"Zip"gt ltPgtltBgtArea
Code lt/BgtltINPUT TYPE"TEXT" MAXLENGTH"3"
SIZE"3" NAME"Area_Code"gt ltBgtPhone lt/BgtltINPUT
TYPE"TEXT" MAXLENGTH"15" NAME"Phone"gt ltBgtE-mail
lt/BgtltINPUT TYPE"TEXT" MAXLENGTH"80" SIZE"30"
NAME"Email"gt ltPgtltBgtVolunteer Interestslt/Bgt
ltINPUT TYPE"checkbox" NAME"Interests"
VALUE"Program" CHECKEDgtProgram ltINPUT
TYPE"checkbox" NAME"Interests"
VALUE"Publicity"gtPublicity ltINPUT
TYPE"checkbox" NAME"Interests"
VALUE"Local"gtLocal Arrangements
ltSMALLgtltEMgt(Multiple items can be
selected.)lt/EMgtlt/SMALLgt ltPgtltBgtAda Awareness
Initiative lt/Bgt ltINPUT TYPE"radio"
NAME"Ada_awareness" VALUE"Yes" CHECKED gt Yes
ltINPUT TYPE"radio" NAME"Ada_awareness"
VALUE"No" gt No ltINPUT TYPE"radio"
NAME"Ada_awareness" VALUE"Maybe"gt Maybe
ltSMALLgtltEMgt(Only one item can be
selected.)lt/EMgtlt/SMALLgtltBrgt ltCENTERgtltTEXTAREA
COLS60 ROWS4 WRAP"on" NAME"Special_Notes"gt
Enter any special comments you might have here.
lt/TEXTAREAgtlt/CENTERgt ltPgt ltINPUT TYPE"submit"
NAME"sub" VALUE"Send Form"gt ltINPUT
TYPE"reset" VALUE"Reset Form"gt lt/FORMgt
Action
Text Input
Text Options
Checkboxes
Radios
Text Areas
Submit/Reset
27
Forms - 2
28
Forms - 3
  • ltFORM ACTION"mailtocolket_at_acm.org"
    METHOD"POST"gt
  • Email Subject Form posted from Mozilla
  • LastnameColketFirstnameCurrie
  • Address19906DaleRidgeCourt
  • Address2CityViennaStateVAZip22181-5348
  • Area_Code703Phone883-7381
  • Emailcolket40acm.org
  • InterestsProgramAda_awarenessYes
  • Special_NotesThisisademonstrationofpostin
    gforms.
  • Noticehowthetextautomaticallywraps
  • aroundastheinformationistyped.0D0Asub
    SendForm
  • lt FORM ACTION "https//swww.acm.org/signup.cgi"
    method"post"gt
  • Use Ada95 bindings to CGI to automatically
    process form.
  • Automatically confirm submission of form
  • Automatically update database
  • Perform other analysis of submitted information

Netscape returns as attachment Type
application/x-www-form-urlencoded Others return
in different formats.
David Wheeler will address Ada95 Bindings to CGI
29
Using the HTML ltHeadgt
  • TITLE (Only required ltHEADgt Element)
  • Used as name for Bookmarks (those gt60 are
    blank)
  • Used to label display window or text screen
  • Used by browsers as quick index mechanism
  • Example ltTITLEgt ACM SIGAda Home Page
    lt/TITLEgt
  • META (Optional - But highly recommended)
  • Used for Meta information not explicitly
    defined elsewhere, Examples
  • ltMETA NAMEKeywords CONTENT Ada,
    Safety-Critical, SEgt
  • ltMETA HTTP-EQUIVCreation-Date CONTENT
    17-Oct-99gt
  • BASE (Optional NOT Recommended)
  • Used for recording the base URL of the document
  • Prevents relative links from developmental
    environments
  • Recorded as URL in Bookmarks instead of actual
    URL
  • Example ltBASE HREFhttp//www.acm.org/SIGAda/in
    dex.html gt

30
Netscape Composer
31
Creating Tables
32
Effective Design Strategies Appropriate to
Disseminating Information
  • Clyde Roby
  • IDA

Note Originally developed by Brad Balfour of
Objective Interface
33
This Section Concept and Goals
  • Main Goal
  • To help understand the many ways that the WWW can
    be used to communicate information
  • Secondary Goal
  • To help new designers to effectively choose
    appropriate techniques from among the many that
    the web provides
  • Technique Descriptive rather than Prescriptive
  • Present a series of questions to be asked in
    order to decide what structure and techniques to
    use to build the web pages (web site)
  • Also will present a list of rules (both the
    commonly agreed upon and the controversial)

34
Building A Collection of Web Pages Things to
Think About
  • The Audience
  • Ways the Audience Gets Info and Gets Notified
    of Changes
  • Frequency of Browsing by Audience
  • Why Does the Audience Need Your Site
  • What Makes the Site Attractive
  • Kinds of Sites
  • Types of Information Provided
  • Organizing the Information
  • Types of Content
  • Design Tips/Rules

35
The Audience
  • Who are they?
  • What do they need?
  • What do they want?
  • How experienced are they?
  • What do they already know?
  • What do they want to find out?
  • How similar are they to the webmaster?
  • How different are they from the webmaster?
  • Are they using modern browsers on fast machines?
  • Are their graphics enabled?

36
Ways the Audience Gets Info and Gets Notified of
Changes
  • Push versus Pull Site Info
  • Push versus Pull Change Notification
  • Interrupt versus Polling
  • Most web sites are pull only and have no push
    content
  • Not even for notification of changes/updates/new
    info
  • Browsing oriented site info organization
  • Search oriented site info organization
  • Channels
  • E-mail notification plus Web-Site
  • Print Ads notification of web-site (or TV)

37
Frequency of Browsingby Audience
  • Multiple Times a Day
  • Daily
  • Weekly
  • Monthly
  • When Notified
  • Only when first found
  • Or found via a search engine
  • Or found via a link to the site from the outside
  • When ready to purchase
  • Reference Only (based on external need for info)

38
Why Does the AudienceNeed Your Site
  • Uniqueness?
  • Timeliness?
  • Loyalty?
  • Membership?
  • Who is your Competition?
  • Within SIGAda
  • Within Ada Community
  • Within ACM
  • Within the community of programming languages
  • With the software development community

39
What Makes the Site Attractive
  • Content?
  • Look and Feel?
  • Responsiveness?
  • Satisfying the Audiences need?
  • How much is too much?
  • How much is too little?
  • Issues
  • Connection Speed (everyone focuses on this)
  • Form versus Content (is it versus?)
  • Uniqueness versus Sameness
  • Freshness of content and form

40
Kinds of Sites
  • Informational
  • e.g., medicine, academia, most .org
  • News
  • e.g., CNN, MSNBC, ESPN
  • Product/Service Oriented (Sales secondary via
    ads)
  • e.g., Kelly Blue Book
  • Sales/Selling Oriented
  • e.g., catalog ordering, Ford, most product
    companies
  • Organizational - Member Oriented
  • e.g., info to members only or predominately
  • Organizational - Outreach Oriented
  • e.g., get new members to join based on info

41
Types of Information Provided(SIGAda specific)
  • Technical info
  • Copies of printed publications
  • Software (source code and/or executables)
  • Papers
  • Data on experiences/results
  • Membership info
  • Organizational infrastructure (e.g., meeting
    minutes, org. structure, motions, charter, etc)
  • Historical info (e.g., past e-mail list traffic
    archive, conference results)
  • Contact info
  • Links to other sites

42
Organizing the Information
  • Types
  • Linear
  • Hierarchy
  • Graph (DAG)
  • Random
  • Depth of Links
  • Breadth of Links
  • What is the relationship between the contents
  • What do people need to find?
  • What do they know when they want to find it?
  • Search oriented users versus Browsing users

43
Types of Content
  • Text
  • Graphics
  • Multimedia
  • Video
  • Sound
  • Stored Documents
  • Ftp
  • Served Interactively
  • (format PDF, PS, text)
  • Software
  • Source
  • Executable
  • Browsed on-line (hyperlinked)
  • Downloaded
  • Steak versus Sizzle
  • Content versus Presentation
  • Competition
  • General overall Level of Professionalism
  • Native to the browser versus needs plug-in
  • Use of JavaScript
  • Use of Java
  • Use of cgi

44
Design Tips/Rules
  • Commonly Agreed Upon
  • No blinking text
  • KISS
  • Dont overwhelm with graphics
  • Navigate with text instead of/in addition to any
    image maps (unless the navigation is truly
    graphical like a map)
  • Make the organization obvious (and help show
    users where they are at all times)
  • Keep links site up to date
  • Controversial(like Multiple Inheritance)
  • Frames
  • All sites must be fast to download
  • Whats the connection speed of your users (home
    versus work)

45
Tools to Manage Development of Web Pages
  • Clyde Roby
  • IDA
  • roby_at_ida.org

46
Goal and Concepts
  • Goal Development, Management, and Update of a
    Web Site (many web pages)
  • Development and Organization
  • Management
  • Updating the Web Site
  • Fixing the Web Site
  • Tools to do the Job
  • An Example The ASIS Web Site

47
Web Development
  • Local Development of Web Pages
  • Development of Informational Materials
  • Moving Your Web Pages to the Web Site

48
Web Management
  • Who Comes to the Web Site?
  • What do they Visit on the Web Site?
  • How Often do they Visit/Return?
  • How do they Retrieve/Use the Information?
  • Why do they Visit the Web Site?

49
Updating the Web Site
  • Local Update of Web Pages
  • Updating of Informational Materials
  • Updating Pages on the Web Site

50
Fixing the Web Site
  • Broken Links
  • Wrong Information
  • Outdated Information
  • ISP Problems
  • Notification to the Webmaster

51
WWW Tools
  • Tools to Develop the Web Site
  • Tools to Manage the Web Site
  • Tools to Update the Web Site
  • Tools to Find and Fix the Problems

52
The ASIS Web Site
  • ASIS Specification
  • ASIS Tutorial Pages
  • Information Updates
  • Technical Information
  • Vendor Product Information
  • ASIS Bibliography
  • Notification to SIGAda-ASIS members
  • Membership Updates

53
What This Means
  • Test your web site locally
  • Follow a few simple rules
  • Information on Home Page
  • Links Among Pages on Web Site
  • ALT for ALL Graphics Images
  • ltIMG SRCstuff.gif ALTDescription of
    Stuffgt
  • Use height and width in graphics
  • Information and Documents served via links Save
    As
  • Relatively Short Pages (50K Bytes Max)
  • For links greater than 50K Bytes, indicate size

54
Easy Web Site Development
  • Home Page Information
  • Table of Contents
  • Points of Contact
  • Becoming Involved
  • RELATIVE links
  • Facilitates development of Web pages
  • Avoid links with .. Or ../.. (viewed as a
    security violation)
  • Directory Structure behind the scenes
  • Internal links to main/home page and to
    sponsoring organization
  • Proof pages likely to be printed (e.g., maps,
    program)
  • Verify colors are easily readable when printed on
    black white
  • Verify likely page break does not interfere with
    content use

55
Page Creation Web Sites
  • www.microsoft.com/sitebuilder
  • members.aol.com/royalef/gifanim.htm
  • ds.dial.pipex.com/fw/animgifs.htm
  • www.barebones.com
  • www.demon.co.uk/Tangent/butwor.html
  • www.webtechs.com/html-val-svc/
  • htc.rit.edu/klephacks/markup.html
  • web.cs.bgsu.edu/morph/morphapplet.html

56
HTML Editors for Macs
  • www.yahoo.com/Computers/World_Wide_Web/HTML_Editor
    s/Macintosh
  • www.uwtc.washington.edu/Computing/WWW/Mac/Director
    y.html
  • www.awa.com/nct/software/webtools.html
  • www.vermeer.com/soft.htm

57
Mac HTML Editors
  • www.navisoft.com/register/client/MP_Trial_1.01.sit
    .hqx
  • www.navisoft.com/NS/InsertRow/navipress pre
  • ftp//bradley.bradley.edu/pub/guru/ps2html/ps2html
    -v2.html
  • dragon.acadiau.ca/giles/HTML_Editor_Documentation
    .html
  • sec-look.uiowa.edu/about/projects/arachnid-page.ht
    ml
  • ftp//ftp.cray.com/src/WWWstuff/RTF/Users_Guide.ht
    ml
  • www.ceneca.com/Ordering.html

58
General Info for Web Developers
  • the-tech.mit.edu80/KPT/Toms/index.html
  • linestone.kosone.com/people/nelsonl/nl.htm
  • www.info.net/rdralph/icons/symbols/
  • abs.apple.com/apple-internet/authoring/
  • the-tech.mit.edu/cgi-bin/KPT_bgs.pl
  • www.netscape.com/assist/net_sites/bg/backgrounds.h
    tml
  • www.issi.com/people/russ/backgrounds.html
  • www.primenet.com/piglett/textures.html
  • www.designsys.com/champ/background.html
  • www.sci.kun.nl/thalia/guide/color/faq.html
  • www.vmedia.com/archives/clipart/index.html
  • www.cuteftp.com

59
Using ACM WWW and Mailing List Facilities
  • John McCormick
  • University of Northern Iowa

60
The SIGAda Home Page
  • Is a gateway to a lot of good information for the
    Ada community
  • It is difficult for one volunteer with a full
    time job to keep all of this information up to
    date
  • Bad links sprout like mushrooms
  • Lots of old news

61
Solution - More Volunteers
  • We already have
  • Volunteers from some local SIGAda Chapters
  • Volunteers from some SIGAda working groups

62
Local SIGAda Chapters with Web Presence
  • Baltimore
  • Jersey Shore
  • Twin Cities
  • Washington, DC

63
SIGAda Working Groupswith Recent Web Presence
  • Ada as an HDL WG (forming)
  • Ada Bindings
  • ASIS
  • Commercial Ada Users
  • Education
  • Jobs page (Searching for student worker)
  • Safety and Security

64
More Help Needed in
  • Tools, bindings, and components
  • Ada news
  • Ada advocacy
  • Additional locals
  • Additional working groups

65
This Tutorial
  • Stated agenda
  • Provide volunteers (including myself) with the
    basic information necessary to effectively
    disseminate information using the world wide web.
  • My personal agenda
  • Recruit volunteers

66
ACM WWW
  • ACM hosts SIG websites
  • RS/6000 UNIX server
  • turing.acm.org
  • Moving to perl.acm.org running Red Hat Linux 6.1
  • Home directory for SIGAda is
  • /acminfo/1/sigs/sigada or
  • /usr2/info/sigs/sigada

67
Procedures for Setting up a Local or Working
Group Home Page
  • Option 1 Set up on your own machine and
    send me the URL
  • Currently used by all locals except DC
  • Not used by any Working Group
  • Option 2 Set up on ACMs Turing
  • Currently used by all active working groups

68
Setting up Pages on Turing
  • Requires an account on Turing
  • I will set up a subdirectory in which to put the
    home page
  • We use UNIX groups and permissions to control
    access to SIGAda subdirectories

69
Getting a Turing Account
  • Send me the following information
  • Name
  • Company / Institution
  • Address
  • Telephone and FAX numbers
  • e-mail address
  • ACM membership number
  • Preferred login name (8 character limit)

70
Who Can Update a Page?
  • Whoever is in the group that owns the file
  • I welcome suggestions for policy and means of
    enforcement.

71
Guidance for Organizing Files
  • Each working group and local chapter on Turing is
    rooted in their own subdirectory
  • All groups currently use a flat organization
  • There are currently 19 subdirectories in the
    SIGAda root directory

72
Suggestions for Pages
  • Link to SIGAda home page
  • Link to ACM home page
  • Page owner name with e-mail link
  • (blank if maintained by SIGAda Secretary)
  • Date last modified
  • Should we design templates?

73
Use of Private Directories with Passwords
  • ACM now provides this ability via their member
    account names
  • www.acm.org/infodir/services/access_control.html
  • Access control lists set up by ACM support
  • Based on subscription services or
  • list individual account names maintained by SIG
    Information Director

74
CGI
  • SIGAda used CGI scripts for SIGAda 2000
    Conference Registration
  • turing.acm.org did not have an Ada compiler
    available perl.acm.org does have an Ada compiler
  • SIGAda is working with ACM to have the Ada95 cgi
    interfaces available on perl.acm.org
  • ACM policy is that each SIG is on its own

75
ACM Mailing Lists
  • ACM uses Listserv software
  • Complete documentation at
  • http//www.acm.org/infodir/services/listserv/doc.h
    tml (links to)
  • http//www.lsoft.com/manuals/1.8d/index.html
  • LISTSERV List Owner's Quick Start
  • LISTSERV List Owner's Manual
  • LISTSERV General User's Guide
  • All lists _at_acm.org
  • http//www.lsoft.com/SCRIPTS/WL.EXE?XHACM.ORG

76
SIGAda Mailing Lists - 1
SIGADA-ABWG SIGADA-ANNOUNCE SIGADA-ASIS
SIGADA-ASIS-OFFICERS SIGADA-ASIS-TECH
SIGADA-AWARDS SIGADA-DC SIGADA-DC-EC
SIGADA-EC SIGADA-EDITORS SIGADA-EEC
SIGADA-LIAISONS SIGADA-LOCALS SIGADA-MEETINGS
SIGADA-MEMBERS SIGADA-OOWG SIGADA-PAST-EC
SIGADA-TALK SIGADA-WG SIGADA2000-COMMITTEE
SIGADA2001-COMMITTEE SIGADA99-COMMITTEE
Ada Bindings Working Group (63 subscribers)
Announcement List (846 subscribers) Ada
Semantic Interface Spec. Working Group (21
subscribers) ASIS Officers Mailing List (11
subscribers) ASIS Technical Discussion Group (93
subscribers) Awards Announcement List (2
subscribers) DC SIGAda Chapter Mailing List (229
subscribers) DC SIGAda Chapter Officers Mailing
List (16 subscribers) SIGAda Executive Committee
Mailing List (8 subscribers) Ada Letters Editors
(2 subscribers) SIGAda Extended Executive
Committee (no subscriber) Liaisons to Ada
Organizations Around the World (16 subscribers)
SIGAda Local Chapter Chairs (17 subscribers)
Meetings Committee (1 subscriber) Discussion
List (2 subscribers) Object Oriented Working
Group (36 subscribers) Previous Executive
Committee Mailing List (7 subscribers) Ongoing
Discussion (56 subscribers) Working Group Chairs
(22 subscribers) SIGAda 1999 COMMITTEE email
distribution list (20 subscribers) SIGAda 2000
COMMITTEE email distribution list (28
subscribers) SIGAda 2001 COMMITTEE email
distribution list (25 subscribers)
77
SIGAda Mailing Lists - 2
ADA-COMMENT Public Comments on the
International Ada Standard (1 subscriber)
ADASAGE AdaSage tool discussion
(448 subscribers) ARG
Ada Rapporteur Group of WG9 managing the Ada
issues (33
subscribers) TEAM-ADA Team Ada Ada
Advocacy Issues (83 95) (331 subscribers) WG9
ISO/IEC JTC1/SC22/WG9
(Ada) - Ada standardization topics
(62 subscribers)
78
Requesting a List
  • Send me the necessary information (detailed on
    following slides)
  • Ill arrange for ACM Support to set up the list

79
Name and Description
  • List Name
  • Prefix with SIGAda
  • Maximum of 24 characters
  • Descriptive Title
  • Prefix with ACM SIGAda
  • Maximum of 70 characters

80
Subscription Options
  • By owner Requests to subscribe are forwarded
    to the list owner for approval
  • Open Requests to subscribe are accepted anyone
    can join
  • Closed Requests to subscribe are rejected.
    List owner adds subscribers

81
Senders (who can post)
  • Public Anyone can post
  • Editors/Moderators Messages posted from
    non-editors are forwarded to moderators for
    approval
  • Owners Only list owners can post
  • Private Only list subscribers can post (this
    option can be problematic)

82
Review (who can see who subscribes)
  • Private Subscribers can review
  • Owner Only the list owner can review
  • Public Anyone can review

83
List Archive
  • No
  • Monthly
  • Weekly
  • Yearly

84
Sample List Announcement
  • Welcome To The Washington DC SIGAda Chapter
    Announcements List.
  • This list is intended to keep you informed
    of important ACM SIGAda information in the
    Washington DC area including upcoming local DC
    and Baltimore SIGAda chapter meetings, local
    software engineering conferences, and other
    professional activities.
  • You may leave this list at any time by
    sending mailtoLISTSERV_at_ACM.ORG with the
    following one line body
  • SIGNOFF SIGAda_DC
  • If you need to change your email address,
    please signoff from your old system, as above,
    and resubcribe to the maillist from your new
    system by sending mailtoLISTSERV_at_ACM.ORG with
    the following one line body
  • SUBSCRIBE SIGAda_DC
  • If you no longer have access to your old
    email address, please send mailtoSIGAda_DC_Reques
    t_at_acm.org requesting that your old address be
    removed and your new address be added.
  • If you have any questions about this list,
    please mailto SIGAda_DC_Request_at_acm.org.
  • Additional information on the SIGAda_DC
    maillist is available on the DC SIGAda Home Page
    at
  • http//www.acm.org/sigs/sigada/locals/dc/
  • You are encouraged to notify your
    colleagues about this opportunity for
    professional software information. You do not
    need to be a member of ACM to subscribe. Please
    save this message for future reference.

85
Useful Listserv Commands - 1
Send messages to LISTSERV_at_acm.org
  • To add a person (to SIGAda_DC_at_acm.org)
  • Add SIGAda_DC Colket_at_ACM.ORG Currie Colket
    pw123456
  • Quiet Add SIGAda_DC Colket_at_ACM.ORG Currie Colket
    pw123456
  • To delete a person
  • Delete SIGAda_DC Colket_at_ACM.ORG pw1234546
  • Quiet Delete SIGAda_DC Colket_at_ACM.ORG pw123456
  • To see the current list
  • Review SIGAda_DC pw123456

Warning if outgoing messages wrap at 72
characters, a CR is added and message is not
recognized by listserv
86
Useful Listserv Commands - 2
  • To add many people at a time

ADD SIGAda_DC DDInitialList IMPORT
PW123456 //InitialList DD brosgol_at_ACM.ORG
Ben Brosgol ClydeRoby_at_ACM.ORG
Clyde Roby hal.hart_at_ACM.ORG Hal
Hart bscrawford_at_AOL.COM Bard
Crawford mangold_at_ATM-COMPUTER.DE Karlotto
Mangold colket_at_COLKET.ORG Currie
Colket mccormic_at_CS.UNI.EDU John
McCormick sroliver_at_CSC.CALPOLY.EDU Ron
Oliver roby_at_IDA.ORG Clyde
Roby colket_at_MITRE.ORG Currie Colket /
No commas, etc. Use quotes
Warning if outgoing messages wrap at 72
characters, a CR is added and listserv may
process things very wrong
87
Useful Listserv Commands - 3
  • To update list header

PUT SIGAda_DC LIST PW123456 ACM DC SIGAda
email distribution list Owner colket_at_MITRE.ORG
(Currie Colket) Owner colket_at_COLKET.ORG
(Currie Colket) Owner Quiet Owner
mccormic_at_nova.cs.uni.edu (John McCormick)
NotebookYes,/home/listserv/home/notebooks/sigada_
DC,Monthly,Private Errors-To Owner
Subscription by owner Ack Yes Confidential
No Files No Notify No Mail-Via
Distribute Validate No Reply-to
Sender,Respect Review Private Send
Public Stats Normal,Private X-Tags
Yes Default-Options NoFiles,NoRepro
Added
Warning if outgoing messages wrap at 72
characters, a CR is added and message is not
recognized by listserv
88
Introduction to AdaCGI
  • David A. Wheeler
  • IDA

89
Outline
  • Intro myself, AdaCGI, CGI, Alternatives
  • Using Ada for Web Apps ( and -)
  • High-Level License, Basics
  • Using AdaCGI Minimal Example, Debugging and
    Installing
  • Special Get/Post, Cookies, Security, Recent
    Additions, Limitations
  • AdaCGI spec Long Example (Search)

90
What is AdaCGI?
  • Ada Library implementing theCommon Gateway
    Interface (CGI)
  • CGI is the most common interface for web-enabled
    programs (web apps)
  • CGI is language platform neutral
  • Permits development of cross-platform web-enabled
    Ada programs
  • http//www.dwheeler.com/adacgi

91
CGI General Concept (1 of 2)
6
Web Browser (Client)
Web Server
HTTP
(2)
3
CGI
4
Web Program/Application
(5)
92
CGI General Concept (2 of 2)
  • When CGI is used, the following occurs
  • 1. Web browser sends request to web server
  • 2. Web server determines that it must start web
    application determines which one starts it
  • 3. Web application starts, loads data sent by web
    server (primarily as keys and their values keys
    can duplicate)
  • 4. Web application responds (via stdout), with a
    header (saying what its replying) followed by
    data
  • 5. Web application exits (quits) once done
  • 6. Web server passes this data on to users
    browser

93
CGI Alternatives
  • FastCGI
  • Keeps web app alive (instead of restarting per
    request)
  • () Better performance (eliminates startup)
  • (-) More work developing app (must reset all
    state)
  • (-) Less robust (app must survive many requests)
  • Server-specific (proprietary) APIs
  • () Even better performance (eliminates startup
    IPC)
  • (-) Lock-in to a particular web server
  • (-) Even less robust (error may take down server)

94
AdaCGI Alternatives
  • Doug Smiths WebAda CGI
  • Derived from an old version of AdaCGI
  • () generic iterators, can remove keys, re-parser
  • (-) no cookies, complex use, buggy decoders,
    little doc, unmaintained
  • Weve agreed that Ill remerge his into mine (in
    time)
  • www.adasmith.com/webada/source
  • Binding to C (ugh)
  • Un-CGI
  • Converts CGI data to environment vars WWW_name
  • No cookies, multivalue keys ambiguous, slow, ugh

95
Why use Ada for Web Apps?
  • Excellent Run-Time Performance
  • better than interpreters (Perl), can be gt typical
    JVM
  • CGI low performance, so relevant iff
    compute-bound
  • Excellent compile-time checking
  • Highly readable (especially vs. Perl)
  • Increased security over C/C (bounds checking)
  • Prefer Ada
  • Have existing Ada applications

96
Weaknesses of Ada forWeb Apps
  • Wordiness (not best for short scripts)
  • Less convenient string handling
  • Regular expressions not built-in
  • Can use GNATs library, but fewer capabilities
    and cant optimize like Perl
  • Fewer web-app-specific and related support
    libraries
  • Often, must separately install Ada library

97
AdaCGI License
  • AdaCGI is free, free software, open source
  • Open Source License LGPL 2 clauses
  • GNAT clause dont need to distribute separate
    object files
  • Web users must be able to get and redistribute
    your version of the AdaCGI library
  • Can use to develop proprietary programs, but the
    AdaCGI library must stay open

98
AdaCGI Basics
  • with CGI initialization autoloads data
  • Two ways to access CGI data
  • an associative array (given key optional key
    count, returns value)
  • indexed sequence (given index, gtkey or value)
  • Call Put_CGI_Header to start returning data
  • by default, to return HTML
  • Then send results (HTML?) to standard out
  • Use String or Unbounded_String directly

99
Minimal Web App Example
  • with CGI, Text_IO use CGI, Text_IO
  • procedure Minimal is
  • begin
  • Put_CGI_Header -- We will reply with a
    generated HTML document.
  • -- Output ltHTMLgtltHEADgt.lt/HEADgtltBODYgt
  • Put_HTML_Head("Minimal Form Demonstration)
  • if CGI.Input_Received then -- Check if input
    was received.
  • Put_Variables -- Input received show all
    variable values.
  • else
  • -- No input received reply with a simple
    HTML form.
  • Put_Line("ltFORM METHODPOSTgtWhat's your
    Name?ltINPUT NAME""name""gtltINPUT
    TYPE""submit""gtlt/FORMgt")
  • end if
  • Put_HTML_Tail -- End HTML doc, sending
    lt/BODYgtlt/HTMLgt
  • end Minimal

100
Debugging/Testing aWeb Program
  • For debugging test scripts, can start directly
  • setenv REQUEST_METHOD GET
  • setenv QUERY_STRING key1value1key2...
  • compile, link, run (./minimal)
  • Output should look like
  • Content-type text/html
  • ltHTMLgtltHEADgtltTITLEgtMinimal Form
    Demonstrationlt/TITLEgt
  • lt/HEADgtltBODYgt
  • ltFORM METHODPOSTgtWhat's your Name?ltINPUT
    NAME"username"gt
  • ltINPUT TYPE"submit"gtlt/FORMgt
  • lt/BODYgtlt/HTMLgt

101
Installing a Web Program
  • To really use it, set up with web server, e.g.
  • su
  • cp minimal /home/httpd/cgi-bin
  • Run
  • http//localhost/cgi-bin/minimal
  • http//localhost/cgi-bin/minimal?nameDavid20Whe
    eleremaildwheeler_at_dwheeler.com
  • Odd problems? Try Put_Variables

102
Get vs. Post
  • CGI supports two sub-protocols
  • Get data can be included in URLs
  • Post data can be voluminous
  • AdaCGI supports both, merging them
  • Can use either subprotocol at any time
  • API hides difference access data the same way
  • If you need to know, AdaCGI will say which, but
    using this difference is not recommended

103
Cookies
  • Cookies are small pieces of data
  • Sent by the server
  • Stored by the client and sent back when the
    client re-communicates with the server
  • Often used in e-commerce (the cookie is an ID
    indicating the transaction were in)
  • Potential privacy risk Permits servers to track
    users (loss of anonymity)

104
Security Issues
  • CGI data comes from untrusted users
  • identify legal values, and prohibit anything not
    meeting the legal criteria (min, max, patterns,
    etc.)
  • dont assume that these values are trustworthy
    (price)
  • in particular, never trust a filename or
    directory name
  • you may need to escape all metacharacters
  • NIL character
  • See the many documents available on CGI
    programming security

105
Additions in Version 1.5
  • AdaCGI Version 1.5 added the following
  • Cookie_Count
  • HTML_Encode becomes amp
  • URL_Encode/Decode becomes 25
  • Generic Iterators
  • Key_Value_Exists Has Key been given Value?

WebAda Inspired
106
Important Limitations
  • No separate IndexedKey ADT/OO type for parameters
    cookies
  • parse, modify, remove, save, reload
  • Doesnt support file uploads
  • Rarely used in practice
  • Only supports GET/POST commands
  • Others useful for web maintenance (WebDAV)

107
Less Important Limitations
  • Auto-initializes data on startup
  • Doesnt support FastCGI
  • Usually implemented separately anyway
  • Doesnt auto-gen form with initial values
  • Can be done with a higher-level package
  • String/Unbounded_String awkward
  • Some subprogram names too similar
  • Could be broken into multiple packages (?!)

108
AdaCGI Spec Get-by-key
  • function Value(Key in String
    Index in Positive 1
    Required in Boolean False)return
    Unbounded_String
  • function Key_Exists(Key in String
    Index in Positive
    1)return Boolean
  • function Key_Count(Key in String)return
    Natural

109
AdaCGI Spec Get-by-Position
  • function Argument_Count return Natural
  • function Key(Position in Positive) return
    String
  • function Value(Position in Positive)return
    String

110
AdaCGI Spec Starting Output
  • procedure Put_CGI_Header(Header in String
    "Content-type text/html")
  • Puts CGI Header to Current_Output, followed by
    two carriage returns.
  • This header determines the program's reply type.
  • Default is to return a generated HTML document.
  • Warning Make calls to Set_Cookie before calling
    this procedure!

111
AdaCGI SpecGenerating HTML Basics
  • procedure Put_HTML_Head(Title in String
    Mail_To in
    String "")
  • Puts an HTML header with title Title
    ltHTMLgtltHEADgtltTITLEgt _Title_ lt/TITLEgtltLINK
    REV"made" HREF"mailto _Mail_To_
    "gtlt/HEADgtltBODYgt
  • procedure Put_HTML_Heading(Title in String
    Level
    in Positive)
  • Put an HTML heading, e.g. ltH1gtTitlelt/H1gt.
  • procedure Put_HTML_Tail
  • P ut HTML tail, I.e. lt/BODYgtlt/HTMLgt

112
AdaCGI Spec Watch Out, Excessively Similar
Names!
  • Put_CGI_Header
  • Content-type text/html
  • Put_HTML_Head
  • ltHTMLgtltHEADgtlt/HEADgtltBODYgt
  • Put_HTML_Heading
  • ltH1gtlt/H1gt

113
AdaCGI SpecGenerating HTML Miscellania
  • procedure Put_Error_Message(Message in String)
  • This Puts an HTML_Head, an HTML_Heading, the
    message, and an HTML_Tail.
  • Call "Put_CGI_Header" before calling this.
  • procedure Put_Variables
  • Put to Current_Output all of the CGI variables as
    an HTML-formatted String.

114
AdaCGI Spec Miscellaneous
  • function Input_Received return Boolean
  • function My_URL return String
  • function Get_Environment(Variable in String)
    return String
  • Line_Count, Line_Count_of_Value, Line,
    Value_of_Line handle multi-line values

115
AdaCGI Spec Cookies(new feature of AdaCGI 1.4)
  • Set_Cookie(Key StringValue String
    Expires String "" Path String
    Domain String Secure Boolean False
    )
  • Sets a cookie value call this BEFORE calling
    Put_CGI_Header.
  • function Cookie_Value(Key in String Index
    in Positive 1 Required in Boolean
    False)return Unbounded_String
  • function Cookie_Value(Position in Positive)
    return String

116
Search Example Top
  • with CGI, use CGI,
  • procedure Search is ...
  • begin
  • Put_CGI_Header
  • if Key_Exists("query") and Key_Exists("file")
    then
  • Process_Query
  • else
  • Generate_Blank_Form
  • end if
  • Put_HTML_Tail
  • end Search

117
Search ExampleGenerate_Blank_Form (1 of 4)
  • Put_HTML_Head("Text Search Form")
  • Put_HTML_Heading("Text Search Form", 1)
  • Put_Line("ltPgtYou may search for a text phrase
    from any of the given files.ltPgtltFORM
    METHODPOSTgt")
  • Put_Line("What do you want to search
    forltPgt")
  • declare
  • Query_String constant String
    CGI.Value ("query")
  • File_Value constant String
    CGI.Value ("file")
  • begin
  • Put_Line("ltINPUT NAME""query"" SIZE40")
  • if Query_String / "" then - - if query
    set, use as default
  • Put(" VALUE") Put(String'(Value("query
    ")))
  • end if
  • Put_Line("gtltPgt")

118
Search ExampleGenerate_Blank_Form (2 of 4)
  • - - if file set, then save it in form
    display its value.
  • - - otherwise, let the user select the
    file to search.
  • if Key_Exists("file") and File_Value / ""
    then
  • Put("ltINPUT TYPE""hidden""
    NAME""file"" VALUE""")
  • Put(String'(Value("file") """gt"))
  • Put("ltPgtYou will be searching file
    ltIgt")
  • Put(String'(Value("file")))
  • Put_Line("lt/IgtltPgt")
  • else
  • Put_Line("Where do you want to
    search?ltPgt")
  • Put_Select_List
  • end if
  • end -- declare block

119
Search ExampleGenerate_Blank_Form (3 of 4)
  • - - if casesensitive set, save in form
    invisibly, else ask user
  • if Key_Exists("casesensitive") then
  • Put_Line(String'("ltINPUT TYPE""hidden""
    NAME""casesensitive"" VALUE"""
    Value("casesensitive") """gt"))
  • else
  • Put_Line("Do you want this search to be
    case-sensitive?")
  • Put_Line(ltDLgtltDDgtltINPUT TYPE""radio""
    NAME""casesensitive" " VALUE""yes""gt
    ltIgtYes.lt/Igt")
  • Put_Line("ltDDgtltINPUT TYPE""radio""
    NAME""casesensitive"" VALUE""no"" CHECKEDgt
    ltIgtNo.lt/Igt")
  • Put_Line("lt/DLgt")
  • end if

120
Search ExampleGenerate_Blank_Form (4 of 4)
  • - - Generate submit and reset buttons for
    form
  • Put_Line("ltPgt ltINPUT TYPE""submit""
    VALUE""Submit Query""gt")
  • Put_Line("ltINPUT TYPE""reset""gt ")
  • Put_Line("lt/FORMgt")

121
Search ExampleProcess_Query (1 of 2)
  • procedure Process_Query is
  • User_File_To_Search constant String
    CGI.Value("file")
  • File_To_Search constant String - -
    Dont trust user to set this!

  • Real_File_Name(U(User_File_To_Search))
  • Pattern constant String
    Value("query")
  • Case_Sensitive Boolean False
  • Case_Sensitivity constant String Value
    ("casesensitive")
  • begin
  • Put_HTML_Head("Query Result")
  • Put_HTML_Heading("Query Result", 1)
  • Put_Line(String'("ltPgtThe search for ltIgt"
    Value("query") "lt/Igt"))
  • Put_Line(String'(" in file ltIgt"
    Value("file") "lt/Igt"))

122
Search ExampleProcess_Query (2 of 2)
  • if Case_Sensitivity "yes" then
  • Case_Sensitive True
  • Put_Line(" in a case-sensitive manner")
  • end if
  • Put_Line("produced the following
    resultltPgt")
  • Put_Line("ltPREgt")
  • Flush
  • Put_Matches(File_To_Search, Pattern,
    Case_Sensitive)
  • Put_Line("lt/PREgt")
  • end Process_Query

123
In Conclusion...
  • You can make web apps in Ada!
  • Get it at http//www.dwheeler.com/adacgi
  • EMailing adacgi-list-request_at_adapower.com
    message body subscribe
  • Linux packaging http//www.gnuada.org
  • Use the current version of AdaCGI
  • Currently version 1.5
  • Patches welcome
  • Go forth have fun!

124
Introduction to XML
Currie Colket MITRE
125
Motivation for XML
Book
Author
Title
Publisher
Date
ISBN
HTML Dumbs Down
lthtmlgt ... ltPgt Title Programming in Ada95
(Second Edition)ltBrgt Author John
BarnesltBrgt Date July, 1998 ltBrgt ISBN
0-201-34293-6 ltBrgt Publisher Addison-Wesley ltBrgt
lt/Pgt ... lt/htmlgt
Useful for Presentation only Limited Content
accessibility
126
What is XML
  • Produced by W3C as recommendation voted on by
    Consortium members
  • http//www.w3.org/XML/
  • XML is a method for putting structured data in
    a text file
  • XML looks a bit like HTML but isn't HTML
  • tags delimit data in HTML tags communicate
    presentation
  • XML is text, but isn't meant to be read
  • strict rules a forgotten tag makes the
    entire file useless
  • XML is a family of specifications

XML 1.0 - specifies tags and attributes, and
Document Type Definition (DTD) guidelines Xlink
- describes a standard way to add links to an
XML file Xpointers and
Xfragments point to portions of an XML file CSS
- Cascading Style Sheets provide mechanism to
present content documents XSL -
Extensible Style Language is the advanced
language for expressing style sheets XSLT -
Transformations (XSLT) is the semantics for
transforming one XML document
into another DOM - Document Object Model
allows programs and scripts to dynamically access
and update the content,
structure and style of documents XML Namespaces -
specifies how you can associate a URL with every
single tag and attribute in an
XML document RDF - Resource Description
Framework (RDF
Write a Comment
User Comments (0)
About PowerShow.com