J2S, JavaScript, and JalView

Jeff, Jim, Mungo, et al.,

As you know, last summer I took a stab at creating a JavaScript HTML5 version of Jalview. We were able to see an alignment show up, but that is about it. After a year back as department chair (no longer!) and teaching I’m finally back to working on SwingJS.

This summer, two St. Olaf undergraduate students and I have further developed SwingJS, and it is looking great. We won’t have time in the next few weeks to tackle Jalview – we are focusing on physics applet conversion right now – but I think by the end of the summer we will have all the parts necessary to take a look at Jalview again. I don’t see any particular problem, other than the fact that some of the tasks that Jalview is so good at may overwhelm JavaScript. We’ll see.

I’m just taking the opportunity now to re-booting that conversation. Please let me know if you are still interested in this or if it just doesn’t seem like something that fits in with your future plans for Jalview.

Bob

This is awesome news ! We are simply maintaining state with the applet at the moment, pending the move to OSGi. Keep us informed and we’ll pitch in when we can.

One major barrier is the lack of automation for java2js… Has any work been done on that ?

Jim.

···

Sent from my Cyanogen phone

On Jul 14, 2016 6:06 AM, Robert Hanson hansonr@stolaf.edu wrote:

Jeff, Jim, Mungo, et al.,

As you know, last summer I took a stab at creating a JavaScript HTML5 version of Jalview. We were able to see an alignment show up, but that is about it. After a year back as department chair (no longer!) and teaching I’m finally back to working on SwingJS.

This summer, two St. Olaf undergraduate students and I have further developed SwingJS, and it is looking great. We won’t have time in the next few weeks to tackle Jalview – we are focusing on physics applet conversion right now – but I think by the end of the summer we will have all the parts necessary to take a look at Jalview again. I don’t see any particular problem, other than the fact that some of the tasks that Jalview is so good at may overwhelm JavaScript. We’ll see.

I’m just taking the opportunity now to re-booting that conversation. Please let me know if you are still interested in this or if it just doesn’t seem like something that fits in with your future plans for Jalview.

Bob

The University of Dundee is a registered Scottish Charity, No: SC015096

You mean, being able to run an Eclipse batch job, right? Like this?

http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_batch_compiler.htm

I have not looked into that further. There is some chatter about that on the web, but to my knowledge Zhou Renjian does not have that for j2s, I think.

Zhou? Udo?

Bob

···

On Thu, Jul 14, 2016 at 1:34 AM, James Procter (Staff) <J.Procter@dundee.ac.uk> wrote:

This is awesome news ! We are simply maintaining state with the applet at the moment, pending the move to OSGi. Keep us informed and we’ll pitch in when we can.

One major barrier is the lack of automation for java2js… Has any work been done on that ?

Jim.

Sent from my Cyanogen phone

On Jul 14, 2016 6:06 AM, Robert Hanson <hansonr@stolaf.edu> wrote:

Jeff, Jim, Mungo, et al.,

As you know, last summer I took a stab at creating a JavaScript HTML5 version of Jalview. We were able to see an alignment show up, but that is about it. After a year back as department chair (no longer!) and teaching I’m finally back to working on SwingJS.

This summer, two St. Olaf undergraduate students and I have further developed SwingJS, and it is looking great. We won’t have time in the next few weeks to tackle Jalview – we are focusing on physics applet conversion right now – but I think by the end of the summer we will have all the parts necessary to take a look at Jalview again. I don’t see any particular problem, other than the fact that some of the tasks that Jalview is so good at may overwhelm JavaScript. We’ll see.

I’m just taking the opportunity now to re-booting that conversation. Please let me know if you are still interested in this or if it just doesn’t seem like something that fits in with your future plans for Jalview.

Bob

The University of Dundee is a registered Scottish Charity, No: SC015096


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr

If nature does not answer first what we want,
it is better to take what answer we get.

– Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

Jim, just noting that there are two aspects to this:

  1. Running the j2s Eclipse compiler from the command line to create .js files (in the bin directory by default)

  2. Running the ANT task that then puts all the pieces together into a functional package, including doing the Google Closure compression.

I think (2) is no problem. Since there is a command-line version for (1) with the standard compiler, there must be some way to do this. I just don’t know how.

Bob

···

On Thu, Jul 14, 2016 at 7:19 AM, Robert Hanson <hansonr@stolaf.edu> wrote:

You mean, being able to run an Eclipse batch job, right? Like this?

http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_batch_compiler.htm

I have not looked into that further. There is some chatter about that on the web, but to my knowledge Zhou Renjian does not have that for j2s, I think.

Zhou? Udo?

Bob

On Thu, Jul 14, 2016 at 1:34 AM, James Procter (Staff) <J.Procter@dundee.ac.uk> wrote:

This is awesome news ! We are simply maintaining state with the applet at the moment, pending the move to OSGi. Keep us informed and we’ll pitch in when we can.

One major barrier is the lack of automation for java2js… Has any work been done on that ?

Jim.

Sent from my Cyanogen phone

On Jul 14, 2016 6:06 AM, Robert Hanson <hansonr@stolaf.edu> wrote:

Jeff, Jim, Mungo, et al.,

As you know, last summer I took a stab at creating a JavaScript HTML5 version of Jalview. We were able to see an alignment show up, but that is about it. After a year back as department chair (no longer!) and teaching I’m finally back to working on SwingJS.

This summer, two St. Olaf undergraduate students and I have further developed SwingJS, and it is looking great. We won’t have time in the next few weeks to tackle Jalview – we are focusing on physics applet conversion right now – but I think by the end of the summer we will have all the parts necessary to take a look at Jalview again. I don’t see any particular problem, other than the fact that some of the tasks that Jalview is so good at may overwhelm JavaScript. We’ll see.

I’m just taking the opportunity now to re-booting that conversation. Please let me know if you are still interested in this or if it just doesn’t seem like something that fits in with your future plans for Jalview.

Bob

The University of Dundee is a registered Scottish Charity, No: SC015096


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr

If nature does not answer first what we want,
it is better to take what answer we get.

– Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr

If nature does not answer first what we want,
it is better to take what answer we get.

– Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

Yup ! Us neither :smiley:

the plan this month after the 2.9.1 release, is to upgrade our
developerware, and then rebuild Jalview's CI infrastructure to support
integration testing. Once that's done, we can definitely look at adding
in new build hooks for j2s, but ideally, without having to script mouse
clicks on an interactive eclipse session (which would probably work, but
would definitely give me nightmares).

..j.

···

On 14/07/2016 13:24, Robert Hanson wrote:

Jim, just noting that there are two aspects to this:

1) Running the j2s Eclipse compiler from the command line to create .js
files (in the bin directory by default)
2) Running the ANT task that then puts all the pieces together into a
functional package, including doing the Google Closure compression.

I think (2) is no problem. Since there is a command-line version for (1)
with the standard compiler, there must be some way to do this. I just
don't know how.

Hello Udo -

···

On 14/07/2016 13:58, Udo Borkowski wrote:

1) Running the j2s Eclipse compiler from the command line to create .js
files (in the bin directory by default)

There is an old post in the Java2Script group regarding a plugin by
sgurin to run Java2Script through the command line:

https://groups.google.com/d/msg/java2script/JAFaeJM_Acs/2sj3ZbMY_ZEJ

Most of the links no longer work but maybe contacting the author would help.

Thanks for digging this out... I think we did take a look last year, but
couldn't quite make things work due to eclipse versions. Someone will
take a look again in the near future (hopefully) ...

Jim

OK, Jim. That’s good to hear.

With this in mind, one thing I will be doing this summer is developing a smooth way that projects can independently link to SwingJS resources. That is, have the SwingJS project and XXXX project in Eclipse and just link them, without having to recompile the SwingJS piece all the time. Right now, for development, we are just putting all source code in the SwingJS project directory itself, so it’s easier to compile everything at once.

Jim, I’m trying to remember what we felt wasn’t there last year that we needed. I can look back at my notes, but I think maybe the menubar for sure, and combo boxes. I can’t remember how the gene scrolling/paging works, but as I remember there was some concern that there might be some very big data sets involved.

We have plenty to work on for now even without Jalview. Just because a few applets are working does not mean we have it all working by a long shot. But I do think Jalview is a great target for us. It would demonstrate success with a complex application similar to Jmol’s complexity.

A major success this summer was working out a way to speed up the sorting out of overloaded methods (formerly “searchAndExecuteMethod”). While it is still true that the more you can NOT overload methods, the better the performance, I’m not seeing that as such a major issue anymore. I don’t have any performance data yet, but I think there’s significant improvement there. At least for constructors there is no longer any search, and that is a huge part of the issue. For other methods we only have to do one search, then after that it is a quick signature match rather than an elaborate search process every time a method is called. Udo believes this is something that should be able to be settled at compile time, not run time, but for now it is still a run-time issue.

I’m turning my attention now to fleshing out JDialog. Basically I am just taking these as they come.

Bob

···

On Thu, Jul 14, 2016 at 7:28 AM, Jim Procter <foreveremain@gmail.com> wrote:

On 14/07/2016 13:24, Robert Hanson wrote:

Jim, just noting that there are two aspects to this:

  1. Running the j2s Eclipse compiler from the command line to create .js
    files (in the bin directory by default)
  2. Running the ANT task that then puts all the pieces together into a
    functional package, including doing the Google Closure compression.

I think (2) is no problem. Since there is a command-line version for (1)
with the standard compiler, there must be some way to do this. I just
don’t know how.
Yup ! Us neither :smiley:

the plan this month after the 2.9.1 release, is to upgrade our
developerware, and then rebuild Jalview’s CI infrastructure to support
integration testing. Once that’s done, we can definitely look at adding
in new build hooks for j2s, but ideally, without having to script mouse
clicks on an interactive eclipse session (which would probably work, but
would definitely give me nightmares).

…j.


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr

If nature does not answer first what we want,
it is better to take what answer we get.

– Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

I just sent a message to Sebastian Gurin asking if he is still interested in J2S.

···

On Thu, Jul 14, 2016 at 9:03 AM, Jim Procter <foreveremain@gmail.com> wrote:

Hello Udo -

On 14/07/2016 13:58, Udo Borkowski wrote:

  1. Running the j2s Eclipse compiler from the command line to create .js
    files (in the bin directory by default)

There is an old post in the Java2Script group regarding a plugin by
sgurin to run Java2Script through the command line:

https://groups.google.com/d/msg/java2script/JAFaeJM_Acs/2sj3ZbMY_ZEJ

Most of the links no longer work but maybe contacting the author would help.

Thanks for digging this out… I think we did take a look last year, but
couldn’t quite make things work due to eclipse versions. Someone will
take a look again in the near future (hopefully) …

Jim

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr

If nature does not answer first what we want,
it is better to take what answer we get.

– Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

Hi Bob,

I’ve been watching your emails today with excitement! It is great that you are interested in putting some more time into Javascript Jalview. As Jim says, development on this had been parked once you went home.

All the best from Sunny Dundee!

Geoff.

Jeff, Jim, Mungo, et al.,

As you know, last summer I took a stab at creating a JavaScript HTML5 version of Jalview. We were able to see an alignment show up, but that is about it. After a year back as department chair (no longer!) and teaching I’m finally back to working on SwingJS.

This summer, two St. Olaf undergraduate students and I have further developed SwingJS, and it is looking great. We won’t have time in the next few weeks to tackle Jalview – we are focusing on physics applet conversion right now – but I think by the end of the summer we will have all the parts necessary to take a look at Jalview again. I don’t see any particular problem, other than the fact that some of the tasks that Jalview is so good at may overwhelm JavaScript. We’ll see.

I’m just taking the opportunity now to re-booting that conversation. Please let me know if you are still interested in this or if it just doesn’t seem like something that fits in with your future plans for Jalview.

Bob

_______________________________________________
Jalview-dev mailing list
[Jalview-dev@jalview.org](mailto:Jalview-dev@jalview.org)
[http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev](http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev)

The University of Dundee is a registered Scottish Charity, No: SC015096

···

On 14/07/2016 06:05, Robert Hanson wrote:

-- 
Geoff Barton | Professor of Bioinformatics | Head of Division of Computational Biology   
School of Life Sciences | University of Dundee, Scotland, UK | [g.j.barton@dundee.ac.uk](mailto:g.j.barton@dundee.ac.uk) 
Tel: +44 1382 385860 | [www.compbio.dundee.ac.uk](http://www.compbio.dundee.ac.uk) | twitter: @gjbarton
 

The University of Dundee is registered Scottish charity: No.SC015096 

FYI, see https://chemapps.stolaf.edu/swingjs/site/swingjs/examples for evidence of our progress. The most interesting one there is Circuit, https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/applets/Circuit.html a rather complex applet
https://chemapps.stolaf.edu/swingjs/site/swingjs/j2s/com/falstad/Circuit/ that transferred beautifully. Some of the others have nice sound as well!

Bob

···

On Thu, Jul 14, 2016 at 7:24 AM, Robert Hanson <hansonr@stolaf.edu> wrote:

Jim, just noting that there are two aspects to this:

  1. Running the j2s Eclipse compiler from the command line to create .js files (in the bin directory by default)

  2. Running the ANT task that then puts all the pieces together into a functional package, including doing the Google Closure compression.

I think (2) is no problem. Since there is a command-line version for (1) with the standard compiler, there must be some way to do this. I just don’t know how.

Bob

On Thu, Jul 14, 2016 at 7:19 AM, Robert Hanson <hansonr@stolaf.edu> wrote:

You mean, being able to run an Eclipse batch job, right? Like this?

http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Ftasks%2Ftask-using_batch_compiler.htm

I have not looked into that further. There is some chatter about that on the web, but to my knowledge Zhou Renjian does not have that for j2s, I think.

Zhou? Udo?

Bob

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr

If nature does not answer first what we want,
it is better to take what answer we get.

– Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

On Thu, Jul 14, 2016 at 1:34 AM, James Procter (Staff) <J.Procter@dundee.ac.uk> wrote:

This is awesome news ! We are simply maintaining state with the applet at the moment, pending the move to OSGi. Keep us informed and we’ll pitch in when we can.

One major barrier is the lack of automation for java2js… Has any work been done on that ?

Jim.

Sent from my Cyanogen phone

On Jul 14, 2016 6:06 AM, Robert Hanson <hansonr@stolaf.edu> wrote:

Jeff, Jim, Mungo, et al.,

As you know, last summer I took a stab at creating a JavaScript HTML5 version of Jalview. We were able to see an alignment show up, but that is about it. After a year back as department chair (no longer!) and teaching I’m finally back to working on SwingJS.

This summer, two St. Olaf undergraduate students and I have further developed SwingJS, and it is looking great. We won’t have time in the next few weeks to tackle Jalview – we are focusing on physics applet conversion right now – but I think by the end of the summer we will have all the parts necessary to take a look at Jalview again. I don’t see any particular problem, other than the fact that some of the tasks that Jalview is so good at may overwhelm JavaScript. We’ll see.

I’m just taking the opportunity now to re-booting that conversation. Please let me know if you are still interested in this or if it just doesn’t seem like something that fits in with your future plans for Jalview.

Bob

The University of Dundee is a registered Scottish Charity, No: SC015096


Jalview-dev mailing list
Jalview-dev@jalview.org
http://www.compbio.dundee.ac.uk/mailman/listinfo/jalview-dev

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr

If nature does not answer first what we want,
it is better to take what answer we get.

– Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr

If nature does not answer first what we want,
it is better to take what answer we get.

– Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900

Hi Bob.

FYI, see https://chemapps.stolaf.edu/swingjs/site/swingjs/examples for
evidence of our progress. The most interesting one there is Circuit,
https://chemapps.stolaf.edu/swingjs/site/swingjs/examples/applets/Circuit.html
a rather complex applet
https://chemapps.stolaf.edu/swingjs/site/swingjs/j2s/com/falstad/Circuit/ that
transferred beautifully. Some of the others have nice sound as well!

These look awesome ! I love the site design too :slight_smile:

Circuit is impressive. It did make my machine run pretty hot - and there
seemed to be some slight glitches in the selection mode, where I had to
put the mouse to the left of elements in order to pick up and drag them,
but otherwise, everything looks great !

The 2.10 release candidate is back on track and I'm hoping it'll be
ready next week, so we can get back to looking at updating Jsjalview in
the very near future :^>

Jim.

···

On 26/08/2016 21:08, Robert Hanson wrote: