Matakuliah : M0284/Teknologi & Infrastruktur E-Business Tahun : 2005

advertisement
Matakuliah
Tahun
Versi
: M0284/Teknologi & Infrastruktur E-Business
: 2005
: <<versi/revisi>>
Pertemuan 17
Programming Languages
for
E-Business/E-commerce
1
Learning Objectives
• Differentiate between HTML and XML and
appreciate the role of XML in e-business
• Create an XML document that uses a simple
cascade style sheet and displays its content in
an IE browser
• Learn how to use an external document type
definition (DTD) file to specify the document
structure required for an XML document
• Write an extensible style sheet (XSL) to specify
the formatting requirements of a document and
appreciate how its programming features are
used
2
Chapter Overview
•
•
•
•
Languages used on the WWW
Similarities and dissimilarities
Advantages and disadvantages
Understanding the newer technologies in
the offing
3
Aspects of content delivery
• Languages for formatting and aesthetics
(HTML, DHTML, Style Sheets)
• Structure and semantics of the content
(XML)
• Scripting languages for processing of data
and interface with external applications
(CGI, Java Server Pages, JavaScript,
VBScript, Coldfusion, PHP)
4
History of Web
• Originally availability and dissemination of
information
• SGML – Standard Generalized Markup
Language
• Had mark-up language, with hyper links,
no complex features
• HTML- HyperText Markup Language
• DHTML – Dynamic HTML, more flexible
• Not standardized, no common standards
5
adopted by the leading browsers.
XML – eXtensible Markup Language
• Supported by major players like Microsoft
and IBM.
• Projected to be the most relevant web
standard of the future.
• Best suited for E-Commerce (as front-end
and back end sub-systems can be
conveniently integrated).
6
PDF – Portable Document File
• Proprietary format from Adobe
• Best suited for distributing complex
documents
• Preservation of original style, format etc.
• Freely available Reader (Adobe Reader),
– no charge for viewing the documents.
7
SGML – Standard Generalized
Markup Language
• Born out of generic coding and mark-up
languages in early 1970’s.
• SGML as a formal standard under ISO
• First edition in 1986
• Amended in 1988.
8
SGML (contd.)
• Specifies a standard method for describing the
structure of a document.
• Open-ended definitions
• Does not directly specify any type of content
data, no restrictions on any type of data.
• Flexible, able to describe any logically structured
set of information (e.g. form, memo, book,
dictionary, spreadsheets, databases).
• Sophisticated, used by a loyal group of
developers,
9
SGML - Not a markup scheme.
• But a means for describing any markup
scheme.
• SGML can be used for developing markup
schemes for different document classes.
10
Uses of SGML
• Publishing
• Multi-media
• Save and store information for long term
(e.g. AAP, ATA, CALS etc.)
11
HTML – Hyper Text Markup
Language
• Most prevalent form of web pages is HTML.
• Born out of SGML’s rejection, is easy to use.
• Both Microsoft I.E. and Netscape Communicator
support it.
• HTML content can be formatted with the addition
of a few tags.
• Can be created using dynamic code generators
or templates
• Word processor files, even MS-Excel, Access
and PowerPoint files can be exported to HTML.
12
Advantages and disadvantages of
HTML
• HTML has pre-defined tags, both a strength and
a weakness, depending on the user’s
experience.
• Elements of HTML include title, body,
background, paragraphs, lists, tables, forms,
formatting (bold, italics, underline)
• Can add Java applets and ActiveX controls
within HTML pages.
• HTML can be developed using editors ranging in
complexity from MS Notepad to WYSIWYG.
• Limitation – tags cannot be created for new undefined structure, format.
13
Insertion of pictures and graphics
in HTML
• One of the main reasons for the success
of the WWW.
• Inline images, hyper-linked images (stored
on a different page).
• Types of raster graphics: GIF, JPEG, PNG,
no need for plug-ins.
14
Syntax for inserting a picture
<html>
<head>
<title> Picture of a dog </title>
</head>
<body>
<IMG SRC = “dog.jpg” border = 0>
</body>
</html>
15
Other features
• Align – takes values bottom, top, left, middle and
right.
• Alt- an alternative message
• Border – defines border width
• Height- height of the image and allows resizing
• HSpace- horizontal space
• SRC- URL of the image
• VSpace- vertical space
• Width – width of the image and allows resizing
16
Most common HTML tags
<html> </html>
Marks the beginning of the document and end
<head> </head>
Specifies the beginning and end of header
<title> </title>
Indicate the title ; not displayed on web page
<body> </body>
Indicates the main part of web page
<hn>
Specifies the size of heading from 1 (large) to 6
</hn>
<p> </p>
Delimits a paragraph with a blank line
<li> </li>
Delimits the beginning and end of unordered list
<hr>
Inserts a horizontal line
<br>
Indicates a cut in the flow going to next line
<b> </b>
Indicates that the text within is emphasized
<i> </i>
Indicates that the text within is italicized
<u> </u>
Indicates that the text is underlined
<table>
</table>
Inserts a table in the document
<form>
</form>
Inserts a form in the document
17
Background color
<body bgcolor = “#99CCFF”>
Here, 99 denotes red, CC denotes green and
FF denotes blue in hexadecimal notation.
or
<body background = “lightgreen.jpg”>
18
For additional functionalities, we might
want to add Java applets
<APPLET
CODEBASE=“..”
CODE=“hm30.class”
NAME=“HotMedia”
WIDTH=“239”
HEIGHT=“50”>
<PARAM NAME=“mvrfile”
VALUE=“data/preview.mvr”>
</APPLET>
19
Links to other pages
• Hyper-links- most attractive feature in Hypertext
media.
• Makes navigation through the pages very
convenient.
• Useful for e-commerce also, as it can be used to
balance and distribute the load among various
servers. Delegate time consuming operations to
the service providers.
• <A HREF=“second.htm”> second page </A>
• Here <A> and </A> act as anchors for the link.
HREF indicates the URL of the target page.
20
Web publishing
• A web server should be running on the
computer where the document to be
published is located.
• FTP (File Transfer Protocol) allows remote
insertion of pages on a web server.
21
Download