HTML forms have a minimal interface
Hard to maintain state between forms
- cannot be extended natively
Redundant data frequently needs to be re-retrieved between HTML forms
- A new interface must be recreated everytime info is sent to the server
Bloated Applet Problem
Java is hard!
- Placing all application code on the applet makes for a huge download
Security "Sandbox" restricts what applets can do
- Browser Incompatibilities
- Complicated maze of class libraries to learn
Problems with Java Applets
- cannot read/write local files
- cannot open sockets to non-originating server (RDBMS problem)
- No good, easy connectivity options
- JDBC requires lax firewall for talking to DBMS directly or complex middleware
- RMI is not supported by browsers
- CORBA is not supported by all browsers
- CGI/Perl can provide database connectivity more easily
- Application related "business-rules" are centrally maintained and executed in CGI/Perl scripts
- Browsers that don't support Java can still use the application
- Leverage existing "legacy" CGI/Perl code
- Many Internet Service Providers only allow CGI/Perl access (no daemons)
- Java applet becomes a truly thin client
- only requires GUI code and GUI logic
- JavaCGIBridge class adds ~5k overhead
- No need to learn the entire Java class library.
- You can get by with AWT (Forms) and some utility classes
- Java applet can maintain state between all CGI script calls
- Java applet can cache retrieved data
- eliminates the need to constantly get redundant data from the server
- Data to be returned should be identified
- Top separator ()
- Bottom Separator ()
- Pipe delimited fields
- Set up form variable to tell script to send data using separators defined above (javacgibridge=on)
- Instantiate JavaCGIBridge class
- Set up form variable, form value pairs inside Hashtable
- Set up URL by instantiating URL class
- Get parsed data back using the URL and form variable Hashtable as a Vector of Vectors (otherwise known as an array of arrays in Perl 5)
JavaCGIBridge Discussion Forum among other Selena Sol Scripts Archive Forums.
These two examples are included in the distribution. They show the CGI application as well as the JAVA front end. The Applets were built using the JavaCGIBridge and the existing CGI.
Power of Two
javacgibridge.tar javacgibridge_tar.gz readme.installation readme.usage COM.Extropia.net.JavaCGIBridge COM.Extropia.net.JavaCGIBridgeTimeOutException JavaCGIBridge Documentation (JavaDOC)
JavaCGIBridge Overview talk given at Perl97 in PowerPoint 95 Format (zipped).
JavaCGIBridge Overview talk in Adobe PDF Format. Use Adobe Acrobat to read this document.