[Date Prev][Date Next][Index][Thread] [SGT Mail Archive] [SGT Main Page]

Re: SGT Toolkit and the tartet Runtime Environment



At 09:51 PM 2/21/2002 -0500, you wrote:
Donald,
 
I have an SGT toolkit question that you could probably clear up very quickly:
 
I am developing a java applet which uses SGT and runs on the client browser from a web page and requires the Java plugin V1.3.1_01. The SGT class jar is 908KB and would be a prohibitive download. The question is what is the best way to incorporate SGT so that the total applet download size is minimized?
 
Possible solutions?:
1) Compile only the java files from the SGT toolkit that are needed and bundle them up with the applet.
2) Create an installed extension that the client has to download and install on their system.
3) Create a downloadable extension that downloads with the applet each time the page is loaded and as in #1 only contain the java files from the toolkit that are needed.

Gery,

Some commercial tools, Visual Cafe and JBuilder, can take existing jar files and extract those that are needed for a specific application.  It is possible that some classes that are required for the compilation to succeed are not needed when you application runs.  If you need to get the size down a lot you might want to try this, although it is a bit labor intensive.

The sgt jar file is on the large side because not only are the core sgt classes included but so are the demo programs and their required data files.  Also if your not using AWT there are several classes that could be removed with no ill effect.

The three possible solutions you give ones that have both positive and negative sides (life is compromises isn't it?).  Which one you choose should mostly have to do with your users and the kind of environment that the applet will be deployed.  If it gets used a lot then option 2 has a lot of merit (or use the Java Web Start system from Sun), otherwise 1 or 3 looks fairly reasonable.

 
I am hesitant to start pulling out only code from your toolkit since it is so well bundled. If there is a way to determine only the classes needed from say a comple then a batch file could be created to jar up only the ones needed. What I am thinking here is that one would have to go through not only ones one code but also the SGT hierarchy to determine all dependencies for identifiying all classes needed.

Like I said above I know that both Visual Cafe and JBuilder have tools that can determine the necessary files and create a custom jar.

 
A side note I have considered about downloading jar files is that jar files can be persistently cached on a client machine using the new param tags 'archive_cache' and 'archive_files' for the V1.3 Plugin. (I may not have the tag names correct.).

That's interesting.  I'm not a big applet user, spending most of my time developing applications.

Don

 
I would certainly appreciate any recommendations and/or opinions you have on this situation?
 
Thank you,
Gery D. Dorazio
 
 
 
 
Gery D. Dorazio
Development Engineer
EnQue Corporation
(704) 377-3327
gdorazio@enque.net

==================================================
Donald W. Denbo    dwd@pmel.noaa.gov
Ph: (206) 526-4487   Fax: (206) 526-6744
Collaborative tools: http://www.epic.noaa.gov/collab/
Netcdf Browser: http://www.epic.noaa.gov/java/ncBrowse
Scientific Java Graphics: http://www.epic.noaa.gov/java/sgt
EPIC Oceangraphic Data Management: http://www.pmel.noaa.gov/epic
==================================================