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

Post on 26-Dec-2015

212 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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.

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.

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

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.

Database

Application

DAO RDO ADO

Access Oracle DB2

Data Objects

ODBC Drivers

Microsoft Data Access Architecture using ODBC

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:

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.

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.

Remote Procedure Call (RPC)

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

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

Web Server with HTML

pages

Applet Stub RMI Infrastructure Skeleton

Remote Object

Application Server

Client Browser HTTP

HTML

Applet using RMI

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.

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

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.

DCOM (Distributed Component Object Model)

Client Server

Client Proxy

SCM

Stub Component

SCMDCOM network protocol

top related