[kepler-dev] Re: Applet for morpho

Christopher Hylands Brooks cxh at eecs.berkeley.edu
Tue May 25 20:25:37 PDT 2004


$PTII/doc/codedoc.htm sums up the code generator, though the docs are
out of date, pending updates by me.  I expect to do this the second
week of June.  There is a chapter for the manual that Steve
Neuendorffer started, and I need to update it with applet info.

Applets really work best if the classes are wrapped up in jar
files.  The applet code generator looks for the appropriate jar
files and includes them in the applet archive parameter.
(The applet code generator will optionally copy them to a new location
if the destination of the .html file is outside the Ptolemy tree)

To create the appropriate jar files, run
   cd $PTII
   make install
before running the applet code generator.

Steve polished the $PTII/bin/copernicus facilty so
that it is much easier to run the code generator.

The quick and dirty test is:

  cd $PTII/ptolemy/domains/sdf/demo/Butterfly
  mv Butterfly.htm Butterfly.htm.bak
  $PTII/bin/copernicus -codeGenerator applet -targetPath ptolemy/domains/sdf/demo/Butterfly Butterfly.xml

For help, try
  $PTII/bin/copernicus -help 

The applet code generator reads templates from 
$PTII/ptolemy/copernicus/applet:
  model.htm.in is the default template for applets that do not
        use vergil
  modelVergil.htm.in is the default template for applets that
	use vergil


These templates have complex javascript in them so they will support
Netscape 4.x.  It would probably be better to use simpler 
templates that just have the <applet> ...</applet> tag.
If a simpler template is used, it might be worth having a simple
applet on one of the first pages that a user would go through
that verifies that they have Java 1.4 running
See:
http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII4.0/JavaVersionApplet.htm


The applet code generator can also copy the jar files to a different
location:

   $PTII/bin/copernicus -codeGenerator applet -targetPath Butterfly -ptIIUserDirectory /home/eecs/cxh/public_html/tmp Butterfly.xml

The results are visible at
http://ptolemy.eecs.berkeley.edu/~cxh/tmp/Butterfly/


The applet code generator also has a start on some facilities to
generate WebStart applications, which are much more robust.  However,
this facilty is not yet complete.

BTW - Recently, Efrat had some questions about applets, my response
can be found at:

http://www.mail-archive.com/ptolemy-hackers%40eecs.berkeley.edu/msg01169.html

-Christopher


--------

    
    Creating portable applets is a major challenge...
    This is partly because of the Sun-Microsoft war, and partly because
    of fundamentally bad design... That said, Christopher Brooks (cc'd here)
    has done amazingly well at this... There is a "code generator" in Ptolemy
    that will produce a starting point for an applet. Perhaps Christopher
    could summarize how to use it?
    
    Edward
    
    
    At 12:04 PM 5/25/2004 -0700, Efrat Jaeger wrote:
    >Hi Dan,
    >
    >I was just trying to put up some applets very similar to the examples on t
   he
    >Ptolemy web site. Apparently it's not as simple as it seems, my applets lo
   ad
    >only on selected desktops. It would be a good idea to look further into
    >this.
    >
    >Efrat
    >
    >----- Original Message -----
    >From: "Dan Higgins" <higgins at nceas.ucsb.edu>
    >To: "Samantha J Romanello" <sroman at lternet.edu>;
    ><kepler-dev at ecoinformatics.org>; "Matthew Jones" <jones at nceas.ucsb.edu>
    >Sent: Tuesday, May 25, 2004 11:47 AM
    >Subject: [kepler-dev] Re: Applet for morpho
    >
    >
    > > Hi Samantha,
    > >     I am about recovered from the Scotland trip! I had a good time and
    > > learned a lot. I hope you had a good trip back.
    > >
    > >     I think I was talking about Kepler applets at the meeting (rather
    > > than Morpho applets). My thought was that we could create some sample
    > > applets using Kepler in a manner similar to some of those for Ptolemy
    > > (see http://ptolemy.eecs.berkeley.edu/ptolemyII/). I have not done
    > > anything to implement such applets (other than trying to understand som
   e
    > > of the Kepler code base), but I would be interested in doing some work
    > > in this area [depending on the priorities of other tasks that Matt may
    > > have in mind for me ;-) ]
    > >
    > >     Any thoughts on this, Matt ?
    > >
    > > Dan
    > >
    > >
    > > Samantha J Romanello wrote:
    > >
    > > > Hi Dan
    > > >
    > > > I hope you had a safe trip back to CA and I hope this note finds you
    > > > well.  During the meeting you mentioned maybe creating an applet for
    > > > morpho (or was it kepler)  that could run through the tutortial on
    > > > line without downloading and runing the program...any way I thought
    > > > that was a great idea and would like to know if that is something tha
   t
    > > > you are doing or would be willing to do?
    > > >
    > > > best
    > > > samantha
    > >
    > >
    > >
    > > --
    > > *******************************************************************
    > > Dan Higgins                                  higgins at nceas.ucsb.edu
    > > http://www.nceas.ucsb.edu/    Ph: 805-892-2531
    > > National Center for Ecological Analysis and Synthesis (NCEAS)
    > > 735 State Street - Room 205
    > > Santa Barbara, CA 93195
    > > *******************************************************************
    > >
    > >
    > > _______________________________________________
    > > kepler-dev mailing list
    > > kepler-dev at ecoinformatics.org
    > > http://www.ecoinformatics.org/mailman/listinfo/kepler-dev
    > >
    >
    >_______________________________________________
    >kepler-dev mailing list
    >kepler-dev at ecoinformatics.org
    >http://www.ecoinformatics.org/mailman/listinfo/kepler-dev
    
    ------------
    Edward A. Lee, Professor
    518 Cory Hall, UC Berkeley, Berkeley, CA 94720
    phone: 510-642-0455, fax: 510-642-2739
    eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
--------



More information about the Kepler-dev mailing list