Evaluate Weigh the pros and cons of technologies, products and projects you are considering.

Compiling Java into JavaScript with DukeScript

Learn how DukeScript will compile Java code into JavaScript and change software development in this video from JavaOne 2014.

In an earlier interview with Anton Epple and Jaroslov Tulach, the pair introduced to us to DukeScript, an exciting new way to take advantage of a vast array of JavaScript libraries, but to do it all simply by writing type-safe Java. It's an idea that has been talked about for years, but there has always been a large divide between the talk and the reality, which means TheServerSide had plenty of questions when a couple of software architects told us they can deliver the holy grail of software development.

Many software projects have promised the ability to write Java code that compiles into JavaScript, but the process is rarely clean. This means a Java developer still needs a certain degree of competency with the underlying JavaScript library, forcing them to tinker with some of the generated JavaScript in order to make their applications behave the way they were intended. So, just how much JavaScript does someone entering the DukeScript world need to know?

"We hope nothing" said Epple. "At least, that's the goal." Of course, in order to write DukeScript APIs that wrap around the underlying JavaScript framework, there may be a bit of work that needs to be done, but that is a very specialized, one-off type of activity that a subject matter expert would have to engage in. "But for a Java developer involved in creating the final application, we hope nothing," said Tulach.

As far as linking to an underlying JavaScript library goes, Tulach emphasizes that doing so is the whole point of DukeScript, not a challenge with it. By linking to JavaScript libraries, such as Knockout.js, that have already addressed many of the cross-browser compatibility issues, many of the challenges of writing Web-based applications are already taken care of. But of course, DukeScript can be used anywhere, not just within the browser. With DukeScript, the write once, run anywhere mantra of Java development can be applied not only to standalone Java applications, but also to the mobile and browser-based world as well. It's a technology that not only promises a lot, but it actually follows through on it.

To learn more about how DukeScript is set to change modern day software development in Java, watch the accompanying interview between TechTarget's Jan Stafford and DukeScript advocates Anton Epple and Jaroslov Tulach that took place at JavaOne 2014. Check out part one about DukeScript.

Dig Deeper on Web application framework and Java middleware

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.