Live data from Hacker News

Show HN: 300k lines of Java UI code running as JavaScript in browser

reportmill.com

21–30 of 75 posts

Re: Show HN: 300k lines of Java UI code running as JavaScript in browser

#21
post #8

Appears the tech behind this "cheerpj" a java transpiled to javascript[1] system that appears to contain all of openjdk including swing(!?!). That's kind of cool actually. But creating applications with such a system seems highly problematic. See for example GWT (google web toolkit)[2] which also transpiled java to javascript. I only see legacy GWT apps around nowadays, the world moved on. So I really don't see the a…

Cheerp really did it the right way - starting with the C++ compiler for the Java native runtime. This implementation of Java in the browser is very similar to a normal Java platform port - only in this case the platform is the browser. Compatibility and functionality is remarkable.

Re: Show HN: 300k lines of Java UI code running as JavaScript in browser

#22
post #8

Appears the tech behind this "cheerpj" a java transpiled to javascript[1] system that appears to contain all of openjdk including swing(!?!). That's kind of cool actually. But creating applications with such a system seems highly problematic. See for example GWT (google web toolkit)[2] which also transpiled java to javascript. I only see legacy GWT apps around nowadays, the world moved on. So I really don't see the a…

This is 100x more responsive than Reddit Mobile, if that's what "modern frontend development" is I hope it dies very soon.

Re: Show HN: 300k lines of Java UI code running as JavaScript in browser

#23
post #8

Appears the tech behind this "cheerpj" a java transpiled to javascript[1] system that appears to contain all of openjdk including swing(!?!). That's kind of cool actually. But creating applications with such a system seems highly problematic. See for example GWT (google web toolkit)[2] which also transpiled java to javascript. I only see legacy GWT apps around nowadays, the world moved on. So I really don't see the a…

This is impressive! Are they using WebAssembly here?

This version is all JavaScript - the WebAssembly version should be truly amazing. Though probably next year, when WebAssembly matures (adds threading and improved memory model, GC and more).

Re: Show HN: 300k lines of Java UI code running as JavaScript in browser

#25
Java finally made it on my iPhone. "Java uh.. finds a way." -Goldblum

This is actually pretty cool, though something about seeing my taskbar containing a window that contains an jvm that contains another window drawn in swing makes me think we've lost our way somewhat.. better we make the computers do it than rewrite everything by hand I suppose.

Re: Show HN: 300k lines of Java UI code running as JavaScript in browser

#26
post #8

Appears the tech behind this "cheerpj" a java transpiled to javascript[1] system that appears to contain all of openjdk including swing(!?!). That's kind of cool actually. But creating applications with such a system seems highly problematic. See for example GWT (google web toolkit)[2] which also transpiled java to javascript. I only see legacy GWT apps around nowadays, the world moved on. So I really don't see the a…

Vaadin [1], a fairly popular open-source Java UI framework, is still using GWT on the clientside, but it's more of an implementation detail given that the whole point of Vaadin is that you don't have to care about the clientside that much. And when you do, you can write your frontend stuff in Java. Of course that's less of a selling point than five years ago, and Vaadin has also been moving towards more easily interfacing with native JS code without GWT wrappers. (Disclosure: I'm a former Vaadin employee and core devteam member.)

https://vaadin.com/ [1]

Re: Show HN: 300k lines of Java UI code running as JavaScript in browser

#27
post #2

This is… actually not bad. :shocked:

Uhh... It seems very bad. I clicked "Run RMStudio DOM" in Chrome. It loaded dozens of java packages for half a minute, and then showed me a 90s looking splash screen with three buttons on it. None of them do anything. I'm assuming I'm supposed to be seeing something else. Edit: I tried "Run RMStudio Swing". That one actually loads eventually. I don't understand what kind of app it is, but it appears to leak DOM eleme…

Congratulations! Sounds like the 90s Java applet experience to me.

Re: Show HN: 300k lines of Java UI code running as JavaScript in browser

#29
post #8

Appears the tech behind this "cheerpj" a java transpiled to javascript[1] system that appears to contain all of openjdk including swing(!?!). That's kind of cool actually. But creating applications with such a system seems highly problematic. See for example GWT (google web toolkit)[2] which also transpiled java to javascript. I only see legacy GWT apps around nowadays, the world moved on. So I really don't see the a…

Legacy systems that haven't migrated to some other front end yet. There would be a lot of companies in this situation. That said, I'm not convinced this is the best approach. I think I'd prefer rewriting parts at a time of a system that big.

Think bigger. Start a consulting company that just runs around and recompiles all people's old Java Swing crap into "web apps" like this one. Charge $10-50k / pop.

Get on the consulting gravy train by somehow allowing piecemeal callouts to "real dom" (kindof like an IFRAME from within JAVA) which lets you start rewriting bits and pieces into some angular.next framework.

By the time you finish converting the majority of their Swing to Angular conversion, angular will finally be deprecated (or dart-only, lulz) and you can set yourself up with a new and improved consulting company which will convert Angular to React as soon as the Java to Angular contract finishes up!

/s

Post reply on HN