Over a million developers have joined DZone.

JavaScript in the Enterprise

· Integration Zone

Is iPaaS solving the right problems? Not knowing the fundamental difference between iPaaS and dPaaS could cost you down the road. Brought to you in partnership with Liaison Technologies.

Nashorn is the new JavaScript engine that will ship with Java SE 8 . Under the hood, it leverages the invokedynamic bytecode introduced in Java SE 7. By doing this, Nashorn offers improved performance. It also shine when it comes to compliance with the ECMA JavaScript specification. But that's not all, Nashorn also offers a nice interoperability between Java and JavaScript. For a good overview of Nashorn, see this recent 'Oracle Nashorn: A Next-Generation JavaScript Engine for the JVM' article.

For Enterprise developers, Nashorn will offers new possibilities. For example, Avatar.js relies on Nashorn to support the Node.js programming model on the Java Virtual Machine. Project Avatar extends this model with added-value capabilities such as multiple event-loops with a built-in load-balancer; multithreading capabilities with a lightweight message passing mechanism; Model-Store, a pure JavaScript ORM based on JPA; etc.

Another way of leveraging Nashorn in the enterprise is scripting.  Instead of writing shell scripts, why not leverage JavaScript, eventually with some Java hooks if necessary? This simple script shows how to use Nashorn to monitor GlassFish via its REST Administration capabilities. This approach can easily be extended to fit any monitoring or management needs.

 

Discover the unprecedented possibilities and challenges, created by today’s fast paced data climate and why your current integration solution is not enough, brought to you in partnership with Liaison Technologies.

Topics:

Published at DZone with permission of Reza Rahman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}