Over a million developers have joined DZone.

A Q&A With Stuart Douglas on JavaScript and WildFly

DZone's Guide to

A Q&A With Stuart Douglas on JavaScript and WildFly

Stuart Douglas, a Senior Software Engineer with Red Hat, answered a few questions about the upcoming release of WildFly's adoption of server-side JavaScript integration.

· Integration Zone ·
Free Resource

How to Transform Your Business in the Digital Age: Learn how organizations are re-architecting their integration strategy with data-driven app integration for true digital transformation.

With the upcoming release of WildFly 10, Java developers are being given the ability to deploy server side JavaScript alongside, and integrated with, their Java EE applications. This new feature is being developed by Stuart Douglas, a senior software engineer with Red Hat, who was gracious enough to answer a few of my questions.

What was the driving force behind integrating JavaScript with WildFly?

The idea behind this is to provide an easy way for Java EE developers to integrate JavaScript in their applications. This will allow you to write your front end in JavaScript, taking advantage of its hot deploy capabilities, while still using Java EE for backend services.

How would you compare this functionality to something like Node.js?

They are not really comparable, other than they both use JavaScript. Undertow.js is mostly targeted at frontend development and Java EE integration, while Node.js seems to be mostly targeted at developers who want to write their whole application in JavaScript.

What benefits do you see in allowing JavaScript code to interact with Java objects (like referencing CDI beans)?

There is a lot of existing Java code out there, this allows you to use a hybrid approach. I think the hybrid approach will also appeal to a lot of people because it means you can take advantage of Java's performance and strong typing for your backend code, while using JavaScript to quickly create and evolve your frontend. It also allows you to easily take advantage of some very mature Java based services that are provided by Java EE, such as transactions and messaging.

What has the reaction from the community been to this new feature?

Most people I have talked to have been very positive about it, but as this has not made its way into a WildFly final release yet it is too early to say. In my experience when we add a new feature most users wait until it is present in a final release before testing it out. WildFly 10 will be out soon and we will hopefully get some more feedback then.

Is this feature going to be something the WildFly team encourages in production environments?

Yes, this technology is based on the Nashorn JavaScript engine, which is a mature piece of technology. The actual implementation is mostly just a thin layer of glue code that integrates Nashorn with Undertow and Java EE.

Do you see this feature eventually making it into Red Hat JBoss Enterprise Application Platform?

Yes, this is slated to be included in EAP7 as a tech preview.

For those looking to experiment with this new functionality, WildFly 10 CR4 was just made available, with the final release of WildFly not far behind.

Thanks to Stuart for taking the time to answer these questions and providing this awesome piece of functionality.

Build and deploy API integrations 7x faster. Try the Cloud Elements 100% RESTful platform for 30 days free. Access your trial here.

wildfly ,javascript

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}