|
|
The Architecture Continued from Why Server-Side JavaScript? Most JavaScript applications follow a three-tier client/server architecture, with Web clients in the first tier, a Netscape Web server and database client in the second tier, and database servers and legacy data in the third tier. The first tier provides the user interface for the application, the necessary code to pass information to the second tier, and often data validation routines. As indicated earlier, the server passes HTML and client-side JavaScript to the client without interpreting them. Because of this, the type of Web client really doesn't matter as long as the client has a compatible JavaScript interpreter. Your needs will determine whether you tailor your front-end for a specific client or use generic functionality that will work in all JavaScript-capable clients. The second tier provides the application logic and manages security for the application using server-side JavaScript. This tier consists of a Netscape HTTP server with JavaScript support and, if the application accesses a database server, a database client. The access controls on this tier determine whether clients outside a firewall can access the application. The second tier is also where you'll find the Netscape server and JavaScript runtime environments. The key component of the Netscape server runtime is NSAPI, which connects your applications and the JavaScript runtime environment to the server. Key components of JavaScript's runtime environment include the JavaScript runtime library, the LiveWire database-access library, and the Java Virtual Machine. The JavaScript runtime library provides the primary server-side services, objects, and functions. LiveWire lets your server-side applications access relational databases. The Java Virtual Machine is used by Java applications running on the server. The third tier supplies access to data and functions provided by database or application servers. You can also access legacy data and code written in programming languages such as C and C++. Normally, you do this through LiveConnect, an enabling technology that connects JavaScript with other technologies such as applets and plug-ins. Now let's take a closer look at the features of server-side JavaScript, including session management, file and mail services, and database access. We'll also look at services for accessing other programming languages. Tier 2 Tier 3 Next: Diagram: How LiveConnect Works Published as PC Tech Feature in the 5/4/99 issue of PC Magazine. Related Links |
|
TOP |
Copyright (c) 1999 Ziff-Davis Inc. |