SourceForge has been redesigned. Learn more.
Close

#111 preloader applet

closed
nobody
None
5
2008-08-15
2007-01-21
No

While visiting
http://www.micro.magnet.fsu.edu/primer/java/jablonski/solventeffects/
I have found that they use what seems like an initial applet advising the user that the main applet is being loaded. I've seen this in several sites using Flash animations.

This could be a nice idea for Jmol. Since the applet takes quite a time to download from distant servers, a warning for the user would be adequate. Right now, we have three steps:

1) a sizeable delay before Jmol's black square comes --the user may think the browser has stuck--;
2) the black square in Jmol shows a count-up of time, until the applet finishes loading --the user knows things are going on--;
3) time needed for the model to load. This can be anticipated by the web author, programming an initial "echo" script to warn the user.

Step (1) would benefit from some warning.

Would it be feasible? Could the modular, 6-piece JAR files design be used for this, or a separate applet jar that does the preloading role?

Discussion

  • Bob Hanson

    Bob Hanson - 2007-05-02

    Logged In: YES
    user_id=1082841
    Originator: NO

    Isn't that what the white Java image with the rotating ticks is for?

    I don't think time needed to load can be anticipated by anyone -- it depends upon how many networks and what kind are being traversed, and whether the applet is cached, and whether Java is already loaded.

    We'll go with the much better preloading that is being introduced in Jmol 11.1.30.

    Angel, you will want to note that we no longer have JmolApplet0-6.jar Instead, we have the following:

    JmolApplet0.jar
    JmolAppletCore.jar
    JmolAppletJars.jar
    JmolAppletJvxl.jar
    JmolAppletMain.jar
    JmolAppletPopup.jar
    JmolAppletQuantum.jar
    JmolAppletReadersCifPdb.jar
    JmolAppletReadersMolXyz.jar
    JmolAppletReadersMore.jar
    JmolAppletReadersXml.jar
    JmolAppletShapeBio.jar
    JmolAppletShapeSpecial.jar
    JmolAppletSmiles.jar
    JmolAppletViewer.jar
    JmolApplet_i18n.jar

    Now there will be a possibly significant difference between using or not using a jmolInitialize() command, because without it Jmol will use JmolApplet.jar, with no incremental loading, but with it there will be incremental loading with possible startup enhancements (but associated delays later on, as critical files are downloaded when required).

     
  • Angel Herraez

    Angel Herraez - 2007-05-02

    Logged In: YES
    user_id=1065324
    Originator: YES

    > Isn't that what the white Java image with the rotating ticks is for?

    I think that's Java loading, but there is a delay between that finishing and the Jmol "loading" message coming. In any case, don't worry; let's see how things work with the new on-demand loading.

    > Angel, you will want to note that we no longer have
    > JmolApplet0-6.jar Instead, we have the following:

    Right. I will change whatever needed in the website (Jmol.js library, mainly).

     
  • Nicolas

    Nicolas - 2007-05-02

    Logged In: YES
    user_id=1096197
    Originator: NO

    > Step (1) would benefit from some warning.

    I think the web page designer could do it without modifying Jmol.
    Would it be possible to display a text (in the HTML page) over the applet ? and remove it when Jmol has finished loading ?
    If it's possible, then it could probably be added in Jmol.js.

    > I will change whatever needed in the website (Jmol.js library, mainly).

    Is there a need to change anything ?
    I think Jmol.js has been modified to only reference JmolApplet0.jar and not the others.

    > JmolAppletViewer.jar

    Would it be possible to split this one again ?
    It probably contains many classes that are used only when some options are activated.

     
  • Bob Hanson

    Bob Hanson - 2007-05-02

    Logged In: YES
    user_id=1082841
    Originator: NO

    I think all Angel was going to do was change the discussion of Jmol.js --- what files are involved and where to put them.

    Angel, mention that future versions of Jmol may have additional files. But from now on they will not be 1-6. JmolApplet.jar and JmolApplet0.jar are the only ones that are still there from the former set, but they are totally changed. Once JmolApplet0.jar loads, then the browser can start building the applet and only downloading files as necessary. By the way, that also means that web page developers do not have to provide files that they won't be using. The mission-critical files are these (650K):

    JmolApplet0.jar
    JmolAppletCore.jar
    JmolAppletJars.jar
    JmolAppletJvxl.jar
    JmolAppletMain.jar
    JmolAppletPopup.jar
    JmolAppletViewer.jar

    And the optional set includes:

    JmolAppletQuantum.jar
    JmolAppletReadersCifPdb.jar
    JmolAppletReadersMolXyz.jar
    JmolAppletReadersMore.jar
    JmolAppletReadersXml.jar
    JmolAppletShapeBio.jar
    JmolAppletShapeSpecial.jar
    JmolAppletSmiles.jar
    JmolApplet_i18n.jar

    But mostly we want people to have them all and not pick and choose. Originally I was thinking we might need some sort of modification to Jmol.js, but Nico set me straight on that, and that's no longer necessary.

    Bob

     
  • Angel Herraez

    Angel Herraez - 2007-05-02

    Logged In: YES
    user_id=1065324
    Originator: YES

    > I think the web page designer could do it without modifying Jmol.
    > Would it be possible to display a text (in the HTML page) over the
    > applet? and remove it when Jmol has finished loading ?

    I think I've tried that before and it does not work; you cannot put anything on top of the applet. Apparently somebody put the applet at 1000px left of the left margin and then moved it back into the page, but that was unpredictable in browsers. So I have abandoned the idea.

    > I think all Angel was going to do was change the discussion of Jmol.js
    > ---what files are involved and where to put them.

    Right. Just documentation (currently 0-6 are mentioned, I think)
    BTW, this split applet starts at.. 11.1.30?

    > Angel, mention that future versions of Jmol may have additional files.
    > But from now on they will not be 1-6. JmolApplet.jar and
    > JmolApplet0.jar are the only ones that are still there

    Yes. It's on my to-do list. I am already doing some edition in Jmol.js doc, so it'll go with that.

    > By the way, that also means that web page developers do not have to
    > provide files that they won't be using.

    I think better no advice to this respect. Leave people to include all files, to be safe.

     
  • Nicolas

    Nicolas - 2007-05-02

    Logged In: YES
    user_id=1096197
    Originator: NO

    > Apparently somebody put the applet at 1000px
    > left of the left margin and then moved it back into the page,
    > but that was unpredictable in browsers.
    > So I have abandoned the idea.

    Ah, z-index doesn't work with applet ? Yes, really possible ;)

    I already used that technique to deal with bugs that are still in Firefox for other things than applets, but I was putting things above the beginning of the page (with a div using absolute positionning), and not on the left. It was working fine on IE (Win) and FF (Win and Linux), I haven't really tested other browsers.

     
  • Bob Hanson

    Bob Hanson - 2008-08-15
    • status: open --> closed
     
  • Bob Hanson

    Bob Hanson - 2008-08-15

    Logged In: YES
    user_id=1082841
    Originator: NO

    This is mostly a Java operation. Not something we have any control over.

     

Log in to post a comment.