Live data from Hacker News

PurpleJS – An alternative to Node.js for Java projects

webagility.com

11–20 of 52 posts

Re: PurpleJS – An alternative to Node.js for Java projects

#13
post #10

How does this relate to Nashorn? With something like Avatar-JS [1] you can even run some NodeJS apps without modifications on the JVM. [1] https://avatar-js.java.net

See also Trireme [1], an implementation of Node.js 0.10.32 on the JVM, using Rhino.

[1] https://github.com/apigee/trireme

Re: PurpleJS – An alternative to Node.js for Java projects

#14
post #10

How does this relate to Nashorn? With something like Avatar-JS [1] you can even run some NodeJS apps without modifications on the JVM. [1] https://avatar-js.java.net

It's built on top of Nashorn[1].

[1] https://github.com/purplejs/purplejs/search?utf8=%E2%9C%93&q...

Re: PurpleJS – An alternative to Node.js for Java projects

#15
post #9

I didn't see any mention of Rhino. Does he know that existed (exists?)?

This uses Nashorn to execute the Javascript.

Oh ok so thats the new version then or rewrite? Just seems like he thinks its a new thing even though its been around for many years.

Re: PurpleJS – An alternative to Node.js for Java projects

#16
post #5

This could be pretty cool. So in theory, all the Java, Scala, etc servers out there can wire up an isomorphic single page app without calling out to a Node process. Once the docs are written... https://github.com/purplejs/purplejs/wiki/Embedding

Or you use Scala and Scala.js and just get things done.

Re: PurpleJS – An alternative to Node.js for Java projects

#17
post #15

Earlier quoted context omitted.

This uses Nashorn to execute the Javascript.

Oh ok so thats the new version then or rewrite? Just seems like he thinks its a new thing even though its been around for many years.

Rhino got a poorly documented rewrite and is a pain to use, JDK 8 forward there's Nashorn. Elsewhere I've used J2V8, a very lightweight wrapper around V8

Re: PurpleJS – An alternative to Node.js for Java projects

#19
Why do people think async code is complicated and keep trying to replace it?

I think there are just people who will never understand or fully grok the beauty, power and simplicity of functional programming and will always seek to replace it. I feel sorry for them.

Re: PurpleJS – An alternative to Node.js for Java projects

#20
I particularly don't find the problem it solves appealing. The power of Node comes specifically from its everything async programming model, Javascript is just a detail.

So what's the point in taking away the good part, and keep the cumbersome one? If you just want to program a Synchronous server in the JVM,just stick to Java.

Post reply on HN