webdatabase / 1 web data bases in this lecture, we will be looking at –the development and use of...

62
WebDataBase / 1 Web Data Bases In this lecture, we will be looking at The development and use of Intranets to share, or to make available, information and communication to staff Additional responsibilities of Data Managers Web Servers The use of Web browsers to access data stored in existing, or planned, databases in an Organisation (American term - Enterprise) The need to organise information so that it can be quickly and accurately used by people - perhaps now the ‘weak link’ in the Information chain ? Where are Captain Kirk and Mr. Spock ?

Upload: baldric-neal

Post on 11-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 1

Web Data BasesWeb Data Bases

In this lecture, we will be looking at– The development and use of Intranets to share, or to

make available, information and communication to staff– Additional responsibilities of Data Managers– Web Servers– The use of Web browsers to access data stored in

existing, or planned, databases in an Organisation (American term - Enterprise)

– The need to organise information so that it can be quickly and accurately used by people - perhaps now the ‘weak link’ in the Information chain ?

Where are Captain Kirk and Mr. Spock ?

Page 2: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 2

Web Data BasesWeb Data Bases

• The term ‘Web Data Base’ is a misnomer - the Web (either Internet or Intranet capabilities) is the means of linking multiple databases, and thus supporting many users

• Data Management has a ‘central’ role

• Information can be cost-effectively available to many users (stakeholders is a frequently used term)

Page 3: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 3

Web Sourced InformationWeb Sourced Information

• Examples of ‘stakeholders’– Customers tracking the status of goods (e.g. Books from

Amazon.com or CDs from CD-Now)– Investors checking funds /shares performance– Banking - status of Accounts, transfers, balances,

mortgages– Suppliers/Contractors checking contract details or

accessing contract requirements– Selection of Orthotics - as with the Caulfield Rehab

Centre

Page 4: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 4

Web Sourced InformationWeb Sourced Information

• New skills for Data Managers - not Data Base Administrators– Information design

– Web site management

– Database applications for the Web

– Use of Java, XML, C# as application languages

– New technologies - Windows XP, .net

Page 5: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 5

Web Sourced InformationWeb Sourced Information

Information Architecture:

Deals with the arrangements of ‘data elements’ into an inter-related system

Has its basis in database query design

Web sites consist of pages - each page has the potential of a variety of related information structures

text, hyperlinks, sounds, images, animation, colour patterns (Portals are an example of a multi-type document)

Page 6: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 6

Web Sourced InformationWeb Sourced Information

There are 7 models for information organisation

– Linear - a book or novel– Parallel - such as an airline timetable– Overlay - X-Ray, MRI, 3 dimensional display (cube)– Matrix - Calendar or similar display ( ? spreadsheet)– Web - thesaurus (ability to move from word to word)– Hierarchical - tennis tournaments, business organisation

chart – Spatial Zoom - ‘drilling’ through layers of information,

magnification or reduction of detail

Page 7: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 7

Web Sourced InformationWeb Sourced Information

The models may be intertwined

A novel, or a report, may be linear (at the macro level) but contain other model types at the micro (or detail) level.

A report probably will contain matrix organised tables.

It could also have an Hierarchical and a parallel data content and display

Page 8: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 8

Web Sourced InformationWeb Sourced Information

Information Design

The main objective of deign is to present or convey meaning to the user

What is the design goal of a page ?

How can a collection of linked pages support the design goals of a Web site ?

Page 9: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 9

Web Sourced InformationWeb Sourced Information

Which organisation model(s) best ‘present’ information - and who decides what is ‘best’ ?

Is user (stakeholder) consultation possible ?

necessary ?

Were you consulted when your favourite web page was designed ?

Are we likely to be dependent on Web page design by a remote agent ?

Page 10: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 10

Some Web BasicsSome Web Basics

The Internet provides resource sharing among thousands of networks

It is a ‘network of networks’

The Internet uses standard protocols to provide sharing among different kinds of

computers,

operating systems,

communication equipment

Page 11: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 11

Some Web BasicsSome Web Basics

There are 2 Protocols– Transmission Control Protocol– Internet Protocol

These protocols are known as TCP/IP

Page 12: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 12

Some Web BasicsSome Web Basics

TCP/IP protocols are also used for private networks , known as intranets

Normally, computers in an Intranet are not normally accessible from computers in the Internet

An intranet (such as Monash University’s) can be protected from outside access by a firewall

Page 13: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 13

Some Web BasicsSome Web Basics

Client-server database access is necessary in intranets for internal computing requirements.

Client-server database access in the Internet is normally for outside parties - customers and suppliers

Page 14: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 14

Intranet and Internet RelationshipIntranet and Internet Relationship

Firewall

Intranet

Internet

All connections TCP/IP

Page 15: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 15

Some Web BasicsSome Web Basics

Some terms:

HTTP - Hypertext Transfer Protocol - this establishes a session between a browser and a Web server.

During a session, the browser and the server interact to send and receive files which contain Web pages

Each page has a unique address - the Uniform Resource Locator (URL).

Page 16: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 16

Some Web BasicsSome Web Basics

URL:

The first part of a URL specifies the protocol of a service

The second part specifies a computer on the Internet which contains the file. Communications devices (routers and gateways) translate the second part unto a numeric IP address

The third part specifies a path to a file containing the page

e.g. http://www.microsoft.com/products/default.html

http is the service

www.microsoft.com is the computer

products/default.html indicates the directory and the file name of the page

Page 17: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 17

Some Web BasicsSome Web Basics

Web pages are written in a language called

‘Hytertext Markup Language’ - HTML

(or are translated to this by Word Hyperlink, Front Page or other software)

A browser displays pages on a PC by interpreting HTML code in the file sent by a server.

Part of the HTML can contain ‘hyperlinks’ - or requests for other pages

Page 18: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 18

Some Web BasicsSome Web Basics

Web browsers support older Internet protocols

File Transfer protocol - FTP, used for transferring data files such as word-processing documents and spreadsheets

.htm extension files - indicates older DOS based 3 character extension files e.g. /Myfile.htm

Creating HTML files - text editor (Windows Notepad)

HTML convertor (Microsoft Word)

HTML Editor - Microsoft Front Page

Page 19: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 19

Some Web BasicsSome Web Basics

A fairly typical HTML Document Structure

<html>

<head>

<title> [Web page title text] </title>

</head>

<body>

[Web page content text and tags]

</body>

</html>

The beginning <html> and ending </html> paired tags inform the Web browser that the enclosed text is to be treated as a HTML document

Page 20: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 20

Some HTML codeSome HTML code

<html><head><title> Order Tracking</title></head>

<body>

<h1 align=center>Order tracking</h1>

<form action=‘Omit for now’>

<center><table width=“70%” border=“1”>

<tr><td width=“38%” align=“right”>

select a time period:</td>

<td width=“62%” align=“left”>

<input type=‘Radio” checked name=“optTime” value=”week” within last week<br>

<input type=“Radio” name=“optTime” value=“month”> within last month<br>

<input type=“Radio” name=“optTime” value=“year”>within last year<br>

Page 21: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 21

Some HTML CodeSome HTML Code

<input type=“radio” name=‘optTime” value=“All”>AllOrders</td></tr>

<tr><td> align=“center” colspan=“2”>

<b>or</b>&nbsp;

<b><small><I>(If an Order ID is entered,the selected time period will be ignored)</small></I></td></tr>

<tr><td align=“right”

Enter an OrderID:</td>

<td align = “left”>

<input type=“text” name+”txtOrderid” size=“20”></td></tr>

</table>< br><input type=button name=“cmdSubmit”

value=“submit query”></center>

</form></body></html>

Page 22: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 22

Some Web BasicsSome Web Basics

There are some limitations with HTML– Content, structure and page formatting are mixed

together

– This leads to difficulties in searching for Web pages, display Web pages in different formats for different devices, and standardisation of Web page content

Therefore to support the rapid growth of the Web, the ability to search, display and standardise Web pages must improve

Page 23: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 23

Some Web BasicsSome Web Basics

Enter from left with alarums (Shakespeare)

1. XML (eXtensible Markup Language and

2. XSL (eXtensible Style Language)

XML provides a clean separation between structure and content of a document

The Document Type Declaration section of an XML document provides field names, field properties, and also the structure of the fields

Page 24: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 24

Some Web BasicsSome Web Basics

XSL supports the transformation of of XML Documents into HTML and other display languages

Both languages are extensible.

They support the development of industry-specific standards for document content, structure and display

Page 25: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 25

Web Page Request CycleWeb Page Request Cycle

1. User clicks hyperlink

2. Browser sends requestto Web server

3. Web server locatespage

4. Web server sendsfile

5. Browser displaysfile

Page 26: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 26

XML and XSL Server/BrowserXML and XSL Server/Browser

In the previous diagram, the server and/or the browser may be able to processing XML and XSL in addition to HTML.

If the browser has XML and XSL processors, the server can send XML and XSL to the browser instead of HTML

The browser can then transform the XML and XSL into HTML and then display the HTML

If the browser does not contain XML and XSL, the server can process the XML and XSL and send HTML to the browser

Page 27: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 27

Common Gateway InterfaceCommon Gateway Interface

This allows a Web server to communicate with an external program, and to pass parameters to it (much like Segments and packages in PL/SQL).

The external program then uses the passed parameters to produce output which is sent back to the browser

The output normally contains HTML so that it can be displayed properly by the browser

CGI is portable across most Web servers. The external program may not be portable

Page 28: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 28

Common Gateway InterfaceCommon Gateway Interface

The external program can be written in a compiled language such as C, or an interpreted language such as Perl

Page 29: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 29

Common Gateway InterfaceCommon Gateway Interface

CGI offers several ways of providing database connectivity

In the ‘normal’ CGI approach, the external program sends SQL statements to the database server and then encodes the result in HTML or XML format

Web Server External Program Database Server

Parameters SQL

HTML/XML Results

Page 30: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 30

Common Gateway InterfaceCommon Gateway Interface

In a ‘hybrid’ approach, the external program sends SQL statements to a partner program which interacts with a database server. This method generally provides better performance - the partner program manages database connections among multiple CGI processes and performs some middleware functions

Web Server External Program Database Server

Parameters SQL

HTML/XML Results

Partner Program

Parameters

HTML/XML

Page 31: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 31

Common Gateway InterfaceCommon Gateway Interface

However, there could be a catch - the hybrid CGI approach may not scale to many simultaneous users (remember concurrency ?)

A better approach is to add additional process management functions in the Web server so that the Web server communicates directly with the database server

and that of course is what we are going to look at next

Page 32: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 32

Common Gateway InterfaceCommon Gateway Interface

The 2 terms which will be mentioned are

1. Server-side connectivity

and

2. Client-side connectivity

The 2 diagrams following may help to illustrate these

Page 33: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 33

Server-Side ConnectivityServer-Side Connectivity

This by-passes the external program needed with the CGI approach.

There is direct communication between the Web server and the database server

However, a specialised server may be needed to provide the direct connection between the Web server and the database server

This ‘special’ server supports management of simultaneous users, support for transactions which span multiple Web pages and message queuing

Page 34: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 34

Server-Side ConnectivityServer-Side Connectivity

Web serverwithmiddleware extension

DatabaseServer

SQL Statementsand Formatting requirements Database

HTML/XML

SQL

Page 35: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 35

Server-Side ConnectivityServer-Side Connectivity

There is a limitation with the previous configuration

There is the need for a specialised Web server

This is overcome by a middleware server

The middleware contains a ‘listener’ component which routes database requests to the middleware server

The middleware server provides transaction management and queuing services

Page 36: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 36

Server-Side ConnectivityServer-Side Connectivity

Web Server

Middlewareserver withListener

DatabaseServer

DatabaseRequest

SQL

ResultsHTML/XML

SQL statements and formattingrequirements

Database

Page 37: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 37

Server-Side ConnectivityServer-Side Connectivity

The server-side approaches provide strong and robust services for transaction processing as well as a software bus for accessing and using remote objects

The specialised Web servers and the middleware servers normally support many hundreds to thousands of simultaneous users

Software buses are built into specialised Web servers and Middleware servers and provide transparent access to objects which are distributed across the Internet

Page 38: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 38

Client-Side ConnectivityClient-Side Connectivity

In the server-side approaches, the browser is limited to interpretation of HTML

And even with the later versions of HTML which contain scripting capabilities (DHTML), the client computing capabilities may be underutilised

The client-side approach utilises available computing capabilities without storing the code on the client (remember cookies and donuts ?)

Page 39: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 39

Client-Side ConnectivityClient-Side Connectivity

In the following diagram, there are two very brief outlines to enhance client interfaces for database processing

You have probably heard of Java - it’s a language intended for embedded applications

You may have come also across ActiveX - An ActiveX object is a binary file which can be executed directly on a PC client.

Page 40: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 40

Client-Side ConnectivityClient-Side Connectivity

And a Java applet ? It is a ‘special’ program which executes inside a virtual machine located in a Web browser - the virtual machine prevents an applet from damaging the resources of a PC. (strange but true)

A Web server sends a Java applet to a requesting Web browser inside a PC client.

After receiving the applet, the Web browser executes it to produce specified effects on the browser

Page 41: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 41

Client-Side ConnectivityClient-Side Connectivity

ActiveX

An ActiveX object is a binary file which can be executed directly on a PC client.

No virtual machine is used for ActiveX objects

A Web server sends an ActiveX object as a result of a request by a PC client

ActiveX objects can execute inside a browser or as separate processes

Page 42: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 42

Client-Side Connectivity - Web Page Request Cycle

Client-Side Connectivity - Web Page Request Cycle

Web server sends filecontaining HTML/XMLand embedded applet(Java) or binary object(ActiveX)

Browser sends requestto Web server

Page 43: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 43

Client-Side ConnectivityClient-Side Connectivity

Final Comments

The client-side approaches can be integrated with the server-side approaches

This provides the advantages of a multiple-tier client-server architecture with a customised interface on a PC client

PC clients remain thin, because the customisation code (Applets and Objects) resides on a remote server.

PC clients can execute remote code on other servers through Java or ActiveX code

Page 44: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 44

Some Web BasicsSome Web Basics

Client-Server Computing with Middleware

Middleware

Page 45: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 45

Some Web BasicsSome Web Basics

Two Tier Architecture

SQL Statements DatabaseServer

Database

Query Results

Page 46: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 46

Three Tier Architecture - Middleware Server

Three Tier Architecture - Middleware Server

Middleware DatabaseServer Server

SQL Statements

Query Results

Page 47: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 47

Three Tier Architecture - Application Server

Three Tier Architecture - Application Server

SQL Statements

Database Server Application Server

Query Results

Page 48: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 48

Some Web BasicsSome Web Basics

Database access:

Additional servers and interactions assist the browser (or extend its capabilities) and the web server functions of the previous diagram

The Web server supports all (or mostly all) requests from a browser

A Web server does not provide the same services as database middleware

Page 49: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 49

MiddlewareMiddleware

So, what is this ‘middleware’

A major function of middleware is to support ‘interoperability’

Clients, and servers, can exist on platforms with different hardware, operating systems, DBMSs and program languages

Middleware allows a client and server to ‘be aware’ of each other and to communicate without knowledge of each other’s platform

Page 50: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 50

MiddlewareMiddleware

Another function of middleware is efficient message control

Normally in a client-server environment there are many clients communicating with a lesser number of servers (remember that a ‘server’ can become a ‘client’ can become a ‘server’)

A server can become overloaded managing messages rather than performing the process tasks requirements

Page 51: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 51

MiddlewareMiddleware

Middleware frees up servers from managing request messages and allows servers to concentrate on the processes associated with completing requests for services

Middleware can perform queuing, scheduling and message routing

This allows clients and servers to work at different speeds and times (sounds like the functions of an operating system ?)

Page 52: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 52

MiddlewareMiddleware

Types of middleware

1. Transaction processing monitors - These relieve the operating system of managing database processes. A transaction processing monitor can switch control among processes much faster than an Operating system (any ideas why this is so ?)

A transaction processing monitor receives transactions, schedules them, and manages them until the process is complete.

Transaction processing monitors also get involved with updating multiple databases, and multiple sets of data, in a single transaction - remember a ‘database transaction ?)

TPM’s are the oldest form of middleware

Page 53: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 53

MiddlewareMiddleware

2. Message orientated middleware - these maintain queues of messages (based on queuing theory).

A client process can place a message on a queue and a server process can remove a message from a queue

The major difference between Type 1 (transaction-processing middleware) and Type 2 is in the ‘intelligence’ of the messages. (which tends to be the way in which software becomes ‘smarter’ as in say MS2000 and MS XP operating systems)

Page 54: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 54

MiddlewareMiddleware

Transaction processing monitors provide built-in intelligence but use simple messages

Message orientated middleware provides less built-in intelligence but support more complex messages

3. Object-request brokers - these provide a high level of interoperability and message intelligence. Object-request broker messages must be encoded in a standard interface language

An object-request broker (ORB) resolves platform differences between a client and a server

A client can communicate with a server without knowing the location of a server (Corba, D-Comm)

Page 55: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 55

Connectivity SummaryConnectivity Summary

Approach Product

Straight CGI Apache Web server with external

PERL program

Hybrid CGI Apache Web server with Cold Fusion server extensions

Extended Web Internet Information Server with

server (server-side Microsoft Transaction Server

connectivity)

Middleware-server Oracle Application Server

(server side connectivity)

Client-side Microsoft Remote Data Service,

connectivity Java relational Model Interface

Page 56: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 56

Client Side ScriptsClient Side Scripts

Scripts are used for data validation within HTML forms

In many cases HTML form inputs do not require large applications and the script will be faster than creating a compiled program

Scripts can be modified using a script editor

Modifying a compiled program means that the necessary programming environment must be installed on the user workstation, the original source code must also be available, and after the source code is modified, the program must be recompiled, tested and finally, included in the system library

Page 57: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 57

Client Side ScriptsClient Side Scripts

Server side scripts are created using Active Server pages commonly known as ASPs

JavaScript is a client side scripting language. It is supported by Netscape Navigator and Microsoft Internet Explorer

JavaScript syntax is similar to C, C++ and Java

JavaScript client-side scripts can be added to standard HTML Web pages using special HTML tags

Page 58: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 58

Client Side ScriptsClient Side Scripts

The following code ensures that a user has entered a name in a form input box

<html>

<head>

<title> Monash Traders - Order Tracking</title>

</head>

<body>

<h2>Monash Traders - Order Tracking<h2>

Page 59: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 59

Client Side ScriptsClient Side Scripts

<script language = “JavaScript”>

<! -- hide this script from old browsers

Function validate(){

if (document.login.username.value ==“”) {

alert (“Please enter your name!”)

return

}

alert (“ Thanks for entering your name, “ +

document.login.username.value + “!”

document.login.submit()

}

//-->

</script>

Page 60: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 60

Client Side ScriptsClient Side Scripts

<form name=“login” onsubmit=“validate()”>

please enter your name:

<input type= “text” name+ “username” size=“20”

<input type=“submit”>

</form>

</body>

</html>

Page 61: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 61

Scripting LanguagesScripting Languages

Server side scripts:

An ASP is a text file (.asp) and contains server-side script commands which can perform tasks such as inserting, updating, and retrieving data from a database.

An ASP also contains HTML commands for creating a formatted Web page

ASPs are Microsoft specific technology, and can only be processed on Microsoft Web servers (Personal Web Server, MS Internet Information Server). Netscape has server-side scripting technology called LiveWire which is similar to Active Server Pages

Page 62: WebDataBase / 1 Web Data Bases In this lecture, we will be looking at –The development and use of Intranets to share, or to make available, information

WebDataBase / 62

Server-Side ScriptsServer-Side Scripts

And finally :-

Scripts within ASPs can be created using VBScript (the default ASP scripting language), and Jscript (Microsoft’s JavaScript implementation)

and ASPs are processed on a Web server and files must be stored and run from a folder on the Web server - they cannot be displayed from a folder on the user’s workstation using a file URL.