|
Why Server-Side JavaScript? Continued from Introduction Although client-side JavaScript has been widely accepted and used in Web pages for some time now, developers are only beginning to understand the power and flexibility that server-side JavaScript offers, including a number of functions, objects, and structures for developing Web-based applications. Such applications can combine client-side and server- side JavaScript and HTML. One type of Web application, for example, may include a group of Web pages each serving a different function and accessed based on user selections or actions. Unlike traditional Web pages that rely solely on HTML, however, these pages can be generated entirely from JavaScript or a combination of HTML and JavaScript. Client-side scripting has been very useful for creating dynamic content for Web pages and providing preliminary validation for user input, but you often need a server component to handle the follow-on processing of information submitted by the client. For example, if a user submits a registration form, the server component could parse the form contents, set up an account, and then inform the user that the account is ready. Traditionally this has meant some sort of CGI solution. Server-side JavaScript is more powerful and easier to use than CGI, and it can dramatically reduce programming complexity and development time. You can often replace hundreds of lines of Perl or thousands of lines of C or C++ with a few dozen lines of HTML and JavaScript. Server-side JavaScript's advantage stems from the fact that it has a well-developed framework for handling a wide range of common tasks. Because this framework contains high-level functions and objects, you can develop advanced solutions with minimal coding. Next: The Architecture Published as PC Tech Feature in the 5/4/99 issue of PC Magazine. Related Links |
|
TOP |
Copyright (c) 1999 Ziff-Davis Inc. |