kieler / klayjs

(deprecated) KIELER's layout algorithms for JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When do you plan to provide a new version?

xiaowang03 opened this issue · comments

GTW 2.8 supports Java 8.
Could you provide a new release with the latest features?

I looked at the old build scripts a couple of days ago to evaluate how much effort it is to migrate everything to the new ELK code base. Thereby I read that Google seems to be working on a new Java to JavaScript transpiler called j2cl. I was wondering if it makes sense to use it instead of GWT. Sadly, nobody seems to have an idea when they plan to publish it.

I haven't looked much into it yet but some of my thoughts that may or may not be true when using j2cl:

  • build process should be easier/cleaner
  • gwt is about developing web pages, the tranpiler is just part of it
  • gwt may use j2cl internally itself
  • better js code readability/debbugability

It is not clear if j2cl would replace GWT or not.
Instead of waiting for a decision, you could use GWT 2.8.1 for now.

I could and I will if there's nothing new regarding j2cl once I come to this. I cannot say when I find time though. Maybe towards the end of the month.

That would be great!

I just want to let you know that klayjs is great.
It is one of the best open source js auto-layout library.

To give an update: I had a closer look at the code and started migrating the build scripts. Most issues should be easy to resolve. There's one rather big problem though. We need a json parser in ELK that conforms to eclipse licensing policies and that is compilable by gwt. Additionally it should be available in both worlds.

  • google's gson cannot be compiled to gwt
  • the simple org.json has an incompatible license
  • gwt's json is not available to ELK

I planned to look at it more closely. They use java.io.Writer and java.io.StringReader which aren't supported by gwt. But I get the feeling that most json libraries out there use some part of the jre that is not emulated by gwt. In the end we may have to implement something ourselves.

In klay.js we implemented the json->graph transformation based on gwt's json (in addition to the transformation we have in KIELER). However, that means we have to maintain and synchronize two transformations doing the same job. We do not really have the manpower to do that.

Another update: I found a good solution to the json issue that uses gson on the ELK side of things and GWT's json for the Javascript part. The latter makes more sense anyways since it uses native javascript instead of some emulation of json elements.

With that I was able to build the javascript library and execute layout, yay. There are still some things to clean up and some questions to answer though. For instance, we use EMF for the internal graph data structure and require version 2.10. There's a gwt compatible version 2.9 available on maven central. As far as I can tell there are significant changes within the emf code itself to make it compatible with gwt and the gwt version doesn't seem to be maintained.

It is nice to hear that you have made some progress.
You could not stay with EMF 2.9?

Could be possible that we can replace the 2.10 features we are using. However, I don't like the idea of being stuck with a particular version.

Short update. There is an initial version that works: elkjs. Building is still somewhat cumbersome since it requires a checkout of the elk repository and a specific branch of this emfgwt repository.
Nevertheless, we are getting there :).

This is great news!
With the support of more algorithms, klayjs will be more powerful!