jbrat
Re:PurpleJS – A JavaScript application framework running on the JVM
on Wednesday October 26, 2016 @04:13AM (#12794775)
This would be related to Java and Maven conventions, so you can easily handle tests, separate Java from Javascript - not a PurpleJS thing really.
Re:PurpleJS – A JavaScript application framework running on the JVM
on Wednesday October 26, 2016 @03:42AM (#12794641)
Apparently, the http framework in PurleJS is quite similar to express. Have a look at it!
Re:PurpleJS – A JavaScript application framework running on the JVM
on Wednesday October 26, 2016 @03:39AM (#12794633)
Async is not parallell. With Node, only one of your bakers would actually be working at a time since Javascript does not support multithreading! Only way to achieve this would be dispatching to other node processes and start handling this yourself. With the JVM however you could actually do things in parallell without any such RPC handling.
Re:PurpleJS – A JavaScript application framework running on the JVM
on Wednesday October 26, 2016 @03:26AM (#12794571)
How these tests are run will potentially create large differences. For instance, pure Nashorn will compile each script _every_ time before executing it. PurpleJS only compiles a script once and then caches it for re-use.
Re:PurpleJS – A JavaScript application framework running on the JVM
on Wednesday October 26, 2016 @03:23AM (#12794562)
- Performance: I guess looking at Nashorn performance tests would be relevant. Additionally, PurpleJS apparently compiles a javascript file on first run an then caches it for next execution, until the file is changed or the app is restarted. This would affect performance extremely over running the scripts from scratch each time. Compared to Node, you can for instance utilize a 32 core processor with a single runtime - compared to starting 32 node runtimes.
- Async: PurpleJS is a pure server-side framework. Thanks to the JVM it is capable of providing traditional multi-threaded approach to SSJS development which is both easier to understand and debug. The JVM helps you cope with the parallellism. I assume it should even be possible to add event driven capabilities to PurpleJS as well given that Java has a powerful event system.
Isomorphic: I see your point. However isomorphic scripts are naturally limited to anything that will successfully run on both server and client. For instance the DOM is just as little accessible to Node as it is to PurpleJS.
Apparently there is a new issue for 'console' in PurpleJS issues now - seems reasonable.