beyond dhtml so far we have seen and used: cgi programs (using perl ) and ssi on server side java...

15
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some applications involving animations and graphics scripting languages are not powerful enough. Other technologies are used in such cases. Java Applets. COM objects.

Upload: jodie-smith

Post on 26-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Beyond DHTML

So far we have seen and used:

CGI programs (using Perl ) and SSI on server side

Java Script, VB Script, CSS and DOM on client side.

For some applications involving animations and graphics

scripting languages are not powerful enough. Other technologies are used in such cases.

Java Applets.

COM objects.

Page 2: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Java Applets

Can be considered as a software component that can be embedded into an HTML page. An applet cannot run independently. Needs an applet viewer or a web page to call it.

A file compiled to byte code (.class extension) contains the applet on the server and is downloaded by the browser along with HTML page to run on the local machine

Security Issues

Java virtual machine

Applet example.

Page 3: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Component Object Model (COM) Objects

Microsoft technology

Provides a specification and infrastructure for use of compiled ActiveX components. Each component is designed to provide specific functionality and can be reused many times. An ActiveX control is an object that supports a customizable, programmatic interface. Using the methods, events, and

properties exposed by a control, Web authors can automate

their HTML pages. Examples of ActiveX Controls include

text boxes, command buttons, audio players, video players,

stock tickers, and so on.

You can develop ActiveX Controls using Microsoft Visual

Basic, Microsoft Visual C++, and Java.

Security Issues

Page 4: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

ActiveX Data objects for Database connectivity

ODBC (Open Database Connectivity) driver is a low level program that translates messages from an application into the syntax expected by a specific database. Each different type of database (access, Oracle, Db2, etc) requires a different ODBC driver.

Applications that need to access databases have to be able to communicate with ODBC drivers. To simplify this communication Microsoft has developed some COM objects:

Data Access Object (DAO) - does not support queries that change the content in some databases.

Remote Data Object (RDO) -is full-featured but only available in Microsoft high-end programming environments.

ActiveX Data Object (ADO) - is full featured and available in most Microsoft environments.

Page 5: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Database

Application

DAO RDO ADO

Access Oracle DB2

Data Objects

ODBC Drivers

Microsoft Data Access Architecture using ODBC

Page 6: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Beyond DHTML

DHTML along with CGI scripting works well for most applications but more complex applications need additional technologies.

Consider a scenario:

An HTML page has a form that asks the user to input mailing address. In order to make the page look dynamic we want the postal code field be filled automatically when the user fills in the street and city fields.

Last Name:First Name:

Street Address:

City: Postal Code:

Page 7: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Beyond DHTML

How to achieve the functionality described in previous slide?

1. Send form contents to server w/o postal code. Server has complete list of postal codes in the country. It finds the correct postal code and creates a new page with a form containing all data including postal code, sends it to browser where it is displayed.

Additional effort, time, annoying wait for user.

2. When the first page is sent by the server the entire file containing complete list of postal codes in the country is also sent to the browser. Now browser can look into the list locally and update the relevant field in the form.

Long download time, heavy network traffic.

A more efficient solution is to use Distributed Objects.

Page 8: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Distributed Objects

Remote procedure call (RPC)

A process on client machine can execute a procedure that exists on the server and get the results back.

Remote Method Invocation (RMI)

Based on Java Remote Method Protocol (JRMP). An object on a client machine can invoke a method of an object that exists on the server machine and get results.

Common Object Request Broker Architecture (CORBA)

Is a specification from Object Management Group (OMG) governing the remote communication between objects. Implementations from many vendors. Interoperability.

Uses Object Request Broker (ORB) that handles requests and responses from / to different objects.

Page 9: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Remote Procedure Call (RPC)

A process on client machine can execute a procedure that exists on the server and get the results back.

Page 10: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

RMI (Remote Method Invocation)

Based on Java Remote Method Protocol (JRMP). An object on a client machine can invoke a method of an object that exists on the server machine and get results.

Client Object Server Object

Stubs Skeletons

RMI Infrastructure

JRMP/IIOP transport layer

Page 11: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Web Server with HTML

pages

Applet Stub RMI Infrastructure Skeleton

Remote Object

Application Server

Client Browser HTTP

HTML

Applet using RMI

Page 12: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

CORBA(Common Object Request Broker Architecture)

Client Object Implementations

Request

ORB

Is a specification from Object Management Group (OMG) governing the remote

communication between objects. Implementations from many vendors. Interoperability.

Uses Object Request Broker (ORB) that handles requests and responses from / to

different objects.

Page 13: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Web Server with HTML

pages

Applet ORB Internet Inter-ORB Protocol (IIOP)

ORB

Remote Object

Application Server

Client Browser HTTP

HTML

Use of CORBA in Web Application

Page 14: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

Distributed Component Object Model (DCOM)

Microsoft’s solution to distributed objects is to use COM objects by suitably deploying and registering them.

COM objects are assigned a special class identifier (CLSID). Clients wanting instances of a particular COM request them with CLSID from the operating system. When a client machine supports DCOM, it is possible to locate these objects on a remote server.

A module called “Service control manager” SCM has the responsibility to locate the objects.

Page 15: Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some

DCOM (Distributed Component Object Model)

Client Server

Client Proxy

SCM

Stub Component

SCMDCOM network protocol