• No results found

2. WEB SITES’ DESIGN SURVEY

2.6. Client Side Scripting

2.6.1. Java Applets

Because Java is a programming language, it allows not just creating standalone programs and programs which are embedded into the web pages. Parts of the Java language capabilities are special programs

applets. Applets can only be run on a web browser (client’s side) or in a special program meant to run applets like the appletviewer. Java applets are created to run in web pages

and thus can significantly improve browsers view using a range of functionalities not available to standalone applications. Java brings more interactivity to WWW because, web applications become real instead being plain documents containing static information. Java applets allows having sound, animated graphics, even own user interfaces. An example of such interface can be a small window that displays current stock data and gives a price when users enter sample amounts of the stock to buy.

Having possibility inserting programs into the web page using special tags, Java opened new possibilities presenting information on the web. Java applets which are embedded into HTML pages use <APPLET> … </APPLET> tag. This tag contains specific information regarding to the Java applet which will be presented on the page. Tag <APPLET> customizes applet attributes such as code, area size where applet appears on the page, e. g.:

<html>

<applet code=filename.class width=n height=n> </applet>

</html>

Java applets are not restricted by the network or server overloading. Once they are transferred to the local computer, they are executed according to the technical characteristics of that computer. It is up to the browser to interpret Java

applets and execute them. When the user loads a page containing Java code, in

the form of Java applet, the browser tells the applet to start. When the user leaves that page, the applet is told to stop. Java applets are much more independent than, for example, JavaScripts which are executed on the “event handler”. Java applets are independent programs. They may respond to a mouse click within its active area, but it won't be listening for the submit button being pressed. An applet is a little application. JavaScript code is more like a Dynamically Loaded Library (DLL), which is activated in response to something.

2.6.2. JavaScript and VB Scripts

Java or Visual Basic scripting languages are small pieces of programs embedded into HTML code with a purpose to enhance its capabilities, increase functionality and interaction with the end user. JavaScript is based on the Java and C++ languages; VB Script

on Visual Basic and Visual Basic for Applications. The syntaxes of scripting languages differ from the original languages but some similarities in syntax and structure have left. The difference from the original Java or VB programs is that functions written using scripting

languages cannot be executed alone not being implemented into HTML code. Below are examples of the VB and JavaScript code implementation into HTML:

<SCRIPT LANGUAGE="VBScript"> VBScript commands.</SCRIPT> <SCRIPT LANGUAGE="JavaScript"> JavaScript commands...</SCRIPT>

Web pages become more attractive and alive using script languages. Java or VB scripts generate events because they have special purpose items such as “event handles”. They allow the developer to write functions that contain code triggered by specified events which may occur on the specific user actions, e. g., clicking Submit button of the form. Examples of possible functions generated using Java and VB scripts are (1) rotations image or banner on mouse over them; (2) form validations, e. g. an application which collects and then validates input data of the correctness before sending it to the server; (3) directions/redirections; (4) actions of a mouse on the picture or over an anchor generates certain event.

Web pages containing client side scripts are retrieved from the web server in a usual way like static pages. During the first connection to the web server text of the page is retrieved. During other connections web server passes embedded parts to the web browser. The existence of scripts becomes noticeable when user performs certain set of actions which invokes “events handles” to be active. If say script programs are asked to present additional files or images, request is made to the web server again (see Fig 2.8).

2.6.3. ActiveX Components

ActiveX is a centrepiece of Microsoft’s overall Internet strategy (Afergan et al. 1996). They are similar to Java and VB scripts, since are embedded into HTML to enhance web capabilities. The difference is that ActiveX components are fully featured executable files able to do anything any other executable computer program can do. It can be used to run movie, video clip or animated images. Even more, they can contain links, act on user actions and do many more. ActiveX components have a big concern about the security since they are small programs running on the client side and have full access to the user’s file system and therefore cause serious damage. Due to this Microsoft provides an authentication who is wrote the control.

ActiveX component is an object having three parameters. The first parameter of the component describes the type. The second checks if there is a control on the computer. The third parameter describes multimedia itself (name, size and etc). For example, Macromedia multimedia type flash plug-in is an ActiveX component. When browser loads the page with the ActiveX component it detects the flash type and checks if there is a player installed on that computer to run it. If no, then browser retrieves it from an appropriate address defined in the parameter. Finally the security statement is presented about the control creation source. And if the user accepts it, control is downloaded, installed and run automatically.