• No results found

User Agents

In document Data Center Fundamentals (Page 122-125)

The client side of an application is software that runs on a personal computer, a workstation, a personal digital assistant (PDA) device, or a web-enabled phone and uses the network to send requests to a server in a Data Center. Client applications, also called user agents, are categorized as follows:

Thick clients—Clients that perform significant amounts of processing and access servers mainly to retrieve data.

Thin clients—Client applications that mainly display the results of processing done on servers. A thin client deals with the presentation layer of the application. A web browser is an example of a thin client.

Web browsers, e-mail clients, and streaming players are examples of client software. Web browsers implement presentation functions based on the HTML code sent by the server and basic functions such as data validation and confirmations based on code sent by the server and executed locally on the client. Among the key technologies used to implement these functions, you should be familiar with the following: helpers, plug-ins, JavaScript, applets, and ActiveX controls. Most vendors’ applications rely on one or more of these technologies for functions implemented on the client side.

Browsers

Web browsers are the most popular Internet client. A web browser is a client application that communicates with a web server, and its main purpose is to render HTML files on a computer screen. The user interacts with the browser either by entering URLs into the Address bar of the browser or by clicking the hyperlinks of HTML documents.

In addition to HTML, a browser renders several multimedia types. When a specific media type is not supported natively in the browser, helper programs and plug-ins help with this task. (See the section “Helpers and Plug-Ins.”)

The browser features that interest the network designer the most are

The support for HTTP 1.1 (read Chapter 8 for more information)

How browsers handle the resolution of domain names (read Chapter 10)

The support for SSL (read Chapter 9)

The use of cookies for HTTP session-state management (read Chapter 18)

The use of proxy servers for Internet access (read Chapter 19)

The most popular browsers at the time of this writing are Microsoft Internet Explorer and Netscape Communicator.

Helpers and Plug-Ins

The browser launches a helper application when it receives a content type that it cannot natively display. For example, a browser that requests a video and audio stream launches a player, which in turn contacts the streaming server.

Figure 3-3 shows the helper applications for Netscape. For each Multipurpose Internet Mail Extensions (MIME) type, there is a handler, which is the helper application. For example, Figure 3-3 shows that the Content-type video/x-ms-wmx is handled by Microsoft Windows Media Player.

NOTE For more information about MIME types, see Chapter 8.

Multitier Applications 85

Figure 3-3 Helper Applications

Plug-ins provide a more integrated solution than helpers do. For example, a browser that requests a streaming content can load the player plug-in into its memory instead of launch-ing it as an external application. Plug-ins applications run from the browser memory, and consequently, the content usually appears within the window of the browser.

With Netscape, the plug-in files are usually located in the directory C:\Program Files\

Netscape\Communicator\Program\Plugins. These files are mainly dynamic link libraries (DLLs) and are linked dynamically when the browser is launched.

Client-Side Programming

As previously mentioned, a browser is a thin client: it mainly implements the presentation function. Sometimes, an application needs to provide functions dynamically, such as exe-cuting simple procedures like data validations. You provide these functions with client-side scripting. Compiled code such as Java applets and ActiveX controls can execute more com-plex operations.

The main technologies for client-side programming are the following:

JavaScript—JavaScript is a client-side scripting language that is interpreted by the browser. JavaScript provides the HTML code with several functionalities that can be implemented on the client side (in the browser). They include control of the browser windows, graphic capabilities, and mathematical computations. For more information on JavaScript, consult http://devedge.netscape.com/central/javascript/.

Applets—Applets are Java applications compiled in bytecode format that can be executed in a Java virtual machine (JVM) on any operating system. Java applets and JavaScript are two different technologies, but they both use Java syntax. A Java applet is a compiled bytecode that runs in the browser’s JVM; JavaScript is the source-code part of the HTML code, and it must be interpreted by the browser. Applets are independent of HTML code, which merely references them.

Applets are downloaded by the browser from a web server. Applets can connect to the remote server with sockets, with the RMI protocol, and with IIOP. Applets can con-nect directly to a database with the Java Database Concon-nectivity (JDBC) application program interface (API). (JDBC is explained later in the chapter.) For more informa-tion about applets, consult http://java.sun.com/applets/.

ActiveX—ActiveX means many things, but for the purpose of our discussion, we are interested in ActiveX controls, which are developed by Microsoft and similar to applets. ActiveX controls are binary code downloaded to the client machine by a browser. They execute on the client machine just as applets do. An ActiveX control can open connections to a remote server, just as an applet does. The protocol that is used to invoke remote methods is DCOM. For more information about ActiveX controls, refer to http://www.microsoft.com/windows/ie/press/whitepaper/iwhite/

white003.htm.

For more information about these client-side technologies, see Appendix F, “Client-Side and Server-Side Programming.”

NOTE A JVM is an abstraction of a processor with its own registers and instruction set. Java applications are compiled in a bytecode format that runs in a JVM. The JVM is what makes the compiled Java code portable across operating systems and hardware platforms because it provides virtualization of the underlying hardware.

In document Data Center Fundamentals (Page 122-125)