magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1998 > 02 > Script Junkie  

A Client-Side Save Method in Java

By Carl Dreher

A Java applet cannot write to the client's disk, right? Wrong -- it actually can, using a completely client-side Java applet.

The necessity for this invention began a few years ago when I wrote AXE, a business program that calculates the total cost of ownership for programmable logic chips. AXE has 46 different variables the user can set to accurately model development costs, from engineering salaries to the current interest rate on business loans. Naturally, once the user has set all these variables, they are saved to disk and needn't be reentered.

Recently, I rewrote AXE in Java so it could be moved to the Web. Christened WebAXE, the new program had to comply with Navigator and Internet Explorer, versions 3 and 4, and offer the same functions as the original program. That meant it had to be able to save the user's data; it also meant staying with Java 1.0.2 specs instead of 1.1.

A logical approach would be to write a client-side program in Java that sends the user's inputs to the server, and a server-side script that saves the data. However, this requires multiple client-server exchanges, which can be slow during heavy Web traffic and also consumes bandwidth. Furthermore, it consumes server CGI resources and is a maintenance headache for the system administrator.

More importantly, I'm not a server-side programmer. I had no idea how or where WebAXE would be deployed, and I wanted to debug it completely on my PC without involving a server. I needed a client-side "Save" method, and this article will tell you how I achieved it.<>




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2