e-business technologies - home | george mason …hfoxwell/ec511/ch05.pdfe-business technologies:...

24
5-1 E-Business Technologies: Supporting the Net-Enhanced Organization John Wiley and Sons, Inc. 2003 All Rights Reserved E-Business Technologies Craig Van Slyke and France Bélanger John Wiley & Sons, Inc. Slides by Fred Niederman 5-2 E-Business Technologies: Supporting the Net-Enhanced Organization John Wiley and Sons, Inc. 2003 All Rights Reserved Electronic Business Applications Development Chapter 5

Upload: dophuc

Post on 19-May-2018

217 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-1E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

E-Business Technologies

Craig Van Slyke and France BélangerJohn Wiley & Sons, Inc.

Slides by Fred Niederman

5-2E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Electronic Business Applications Development

Chapter 5

Page 2: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-3E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Key Ideas

l One of the challenges for web developers is interacting with many different environments.

l Markup languages add information to text generally for formatting purposes.

l Programming languages create actions on web pages and in non-web programs.

5-4E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Terminology

Page 3: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-5E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Markup Languages

l Allow storage of text in a single documentl Interpreters read and format the textl Examples:

• HTML• Virtual Reality Modeling Language (VRML)• Dynamic HTML• Standard Generalized Markup Language (SGML)• Extensible Markup Language (XML)

5-6E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Programming Languages

• Programs or applets perform actions• Compiler – turns source into machine

code• The browser acts as an interpreter• Examples

•Java, Perl/CGI (object oriented)•C++, COBOL, Fortran, Pascal

(traditional)

Page 4: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-7E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Scripting Language

l Add functionality without separate compilersl Don’t check user errorsl Examples

• Server-side script• Active Server Pages (ASP)

• Client-side scripts• JavaScript• VBScript

5-8E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

l Program – file containing a set of actions• Executable file once compiled

l Document• Material for presentation normally with formatting

instructionsl Script

• May be integrated into documentsl Applet

• Java programs in executable form loaded on server but executed by browser.

More Terms

Page 5: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-9E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Markup Language: HTML

5-10E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Hypertext Documents

l Tagsl Example

• <i>italicized</i>

l Case insensitive• <i>italicized<i> is the same as <I>italicized<Ii>

Page 6: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-11E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

HTML Example<HTML><HEAD><TITLE> Title of Document </TITLE></HEAD><BODY><H2> First HTML Example </H2><P> This is a paragraph of text on this page <P><A href= “file2.html”> Linked Page </A></BODY></HTML>

Note: when you type this yourself, if you cut and paste the beginning tag, be sure to add the slash to the ending tag

5-12E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Other Important Tags

l <META>l <STYLE>l <TITLE> -- used for bookmarks, should be

meaningfull Headings <H1> to <H6>l Other tags you’ll want to check out:

• Paragraphs, lists, tables, forms, images, hyperlinks, frames

Page 7: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-13E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Alternative Tools for Writing HTML Documents

l HTML assistants or editors• Notepad or Wordpad

l Coding directly in HTML• WordPad or UNIX vi allow saving without adding

extras• Use extensions .htm or html for browser

recognition

5-14E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Coding with HTML Assistants and Converters

l HTML assistants or editors• Use Word or Excel and save file as HTML• Many other converters available on-line

l Limitations• Adds lots of extra code• May be difficult to maintain or use with other programs

l HTML editors• Applications specifically for creating HTML documents

• Example: MS Front Page

Page 8: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-15E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Validating Code

l Always a good idea to check the outcome• Good idea to use multiple browsers

l Data Type Definitions (DTD) describe the structure of the document

l Documents can be validated to make sure the content is consistent with the DTD

5-16E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Other Markup Languages

Page 9: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-17E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Standard Generalized Markup Language (SGML)

l The “superset” of HTMLl Generally large and complex set of rules

5-18E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Dynamic HTML

l Elements that move or change based on user actions

l Style sheets describe DHTML properties• <STYLE> and </STYLE> • Cascading style sheets (CSS)

• Inline

• Embedded• Linked

Page 10: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-19E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

JavaScript within DHTML

l Create “events”• Showtext event• Hidetext event

l Basic steps to writing DHTML pages• Write a style sheet• Name the resulting action• Create activating element

• Write the JavaScript function that will modify the target element

l Netscape DOM; Microsoft DOM

5-20E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Virtual Reality Modeling Language (VRML)

l For 3-D imagesl Platform independentl Files called “worlds”l Web3D consortium

• X3D (Extensible 3D)

l Written with a plain text editorl Viewed with browser “plug-ins”

Page 11: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-21E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Extensible Markup Language (XML)

l Subset of SGMLl Define your own tagsl More strict specifications than HTMLl Coding

• Tags enclosed in angle brackets• Tags require end tags• Attribute values must be surrounded by quotation marks• XML tags are case sensitive• Comments can be included

• Tags must be nested properly

5-22E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Coding in XML

l Extremely important that everyone use same coding scheme

l Plan aheadl Develop or use existing DTDl Mark up XML documentl Consider use of XSL and/or CSS for

formattingl Can also use DOM

Page 12: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-23E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

XML Example

<?xml version = “1.0”><BOOK><TITLE>Evaluation of distance learning </TITLE><AUTHOR>France Belanger </AUTHOR>and<AUTHOR>Dianne H. Jordan</AUTHOR>and<CHAPTER><P> Since the dawn of human history….</P><P> The 20th Century has seen….</P></CHAPTER></BOOK>

5-24E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

E-business in Practice

l Will XML Replace HTML?• What are the benefits of XML?• What are the difficulties in shifting to XML?• Is XHTML the answer or a weak compromise?

Page 13: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-25E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Scripting Language: Active Server Pages

5-26E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Active Server Pages

l Microsoft product• Built into Windows 2000 and XP

l Server side scriptingl ASP.DLL libraryl Relatively easyl Many advanced functions

• Can populate webpage with information from database• Can be updated as database is updated

l Performance as “downside”

Page 14: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-27E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

ASP Example

<%@ LANGUAGE = “VBScript” %><HTML><HEAD><TITLE> Form Processing </TITLE> </HEAD><BODY><%First = Request.Form(“First”)Last = Request.Form(“Last”)Previous = Request.Form(“Previous”)%><% Response.Write First %><% Response.Write Last %><% If Previous = “yes” then %>Previous Visitor<% Else %>New Visitor<% End If %></BODY></HTML>

5-28E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Scripting Language: JavaScript

Page 15: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-29E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

JavaScript

l Originally “LiveScript” by Netscapel Can be written within the HTML pagel Can make text or menus appear with

movement of mouse

5-30E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

JavaScript Example<HTML><HEAD><TITLE> JavaScript Example </TITLE> </HEAD><SCRIPT language =“javascript”>Function showtext (text) {… code to show text. …}Function hidetext (text) {… code to hide text …}</SCRIPT><BODY><H2 align=center> EXAMPLE OF JAVASCRIPT</H2><DIV ONMOUSEOVER=“showtext (‘Smile’)”>ONMOUSEOUT=“hidetext (‘Smile’)”><IMG src=“Smile.gif”><DIV id=“Smile” CLASS =<“texthide”><P> This is a beautiful day! <BR> Give a smile to those <BR> who need it most:The sad and angry! </P></DIV></BODY></HTML>

Page 16: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-31E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

JavaScript Components

l Data typesl Operatorsl Statements

• (If-else; for, and while-do)

5-32E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

JavaScript Structure1. Javascript included within

<SCRIPT></SCRIPT> tags in the HTML file2. Functions/statements in curly brackets { }3. Evaluation/comparison in parentheses ( )4. Array elements in square brackets [ ]5. Comments between slashes (/) or /* */ if

multiple lines6. Statements end with semicolon (;)

Page 17: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-33E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Programming Language: Java

5-34E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Java Concepts

l Developed by Sun Microsystemsl Designed for running on any platforml Designed for reusabilityl Full-fledged programming language

Page 18: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-35E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Java Applets

l Develop files on text editor or Java development tool

l Uses .java extension for programsl JAVAC – java is a compiled language, needs

compilerl The executed program is stored in a

separate .class file

5-36E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

How Java Applets Work

l The java binary file is stored on the serverl The browser requests this filel The server sends the HTML page and .class file

back to the browserl This file is translated and run on the browser locallyl (Some Java programs, “servlets” are run on the

server )File1.java

Source file in text format

Compiler(JAVAC)

File1.class

Java binary document:Java bytecode

Page 19: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-37E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Web Environment with Java

Client(Web Browser)

Server (Web Server)

HTML fileFile1.class file

Client Web page(interpreted) with File1.class applet

Running (translated andExecuted by browser)

Object Tag Example

<OBJECT codebase=http://web.page.org/directoryClassid=‘test.class’ width=“150” height=“120”></OBJECT>

Request

HTML file +File1.class

5-38E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Writing Java Applets and Servlets

l Key components• Programming language• Runtime environment• Class Libraries

• The key to efficient Java programming is using already existing Java classes that can be imported from a variety of Java Libraries

Page 20: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-39E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

l Perl/CGI• Practical Extraction and Report Language• Common Gateway Interface scripts• Interpreted language

l VBScript• Tightly integrated with Internet Explorer• Subset of Visual Basic language

l Python• Source code freely available

Major Languages

5-40E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Decision Point

Buy ready made applications? Hire consultants to

customize

Yes

Built with integrateddevelopment environment? Select environment

Yes

Build applications& customize as needed

Select programmingand/or scriptinglanguage

Page 21: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-41E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Managerial Issues

5-42E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

l Integration of languagesl Trainingl Hardware/softwarel Life span

Selection of Development Environment

Page 22: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-43E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Development Life CyclePlanning and requirementsanalysis

Initial design

Development andTesting

Implementation and Operations

Maintenance

5-44E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Web Site Design and Usability

l Content is keyl Storyboard for relationships among pagesl Usabilityl Browser Support

Page 23: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-45E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Summaryl Markup, scripting, and programming languages have

different functions and different levels of complexity.l Tags are a basic mechanism for showing format and

structurel Scripting languages can run on the application side

as applets or server side as servletsl Full programming languages can be sent with HTML

files and run on the client browserl Managers balance numerous factors in selecting

tools and approaches to web service design.

5-46E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Expanding the Domain

l For examples of electronic commerce application development see:

• Perl Compiler• www.perl.com

• XML and the WWW consortium• http://www.w3.org/XML

• XSL• http://www.w3.org/TR/xsl/

• VMRL in Chemistry (to see VMRL as used by one interest group)• http://www.ch.ic.ac.uk/rzepa/vrml/

Page 24: E-Business Technologies - Home | George Mason …hfoxwell/EC511/ch05.pdfE-Business Technologies: Supporting the Net-Enhanced Organization 5-1 John Wiley and Sons, Inc. 2003 All Rights

5-47E-Business Technologies: Supporting the Net -Enhanced OrganizationJohn Wiley and Sons, Inc. 2003 All Rights Reserved

Copyright © 2003John Wiley & Sons, Inc.

l All rights reserved. Reproduction or translation of this work beyond that permitted in Section 117 of the 1976 United States Copyright Act without the express written permission of the copyright owner is unlawful.

l Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc.

l The purchaser may make back-up copies for his/her own use only and not for redistribution or resale.

l The Publisher assumes no responsibility for errors, omissions, or damages, caused by the use of these programs or from the use of the information contained herein.