A new set of Application Program Interfaces (API) called DukeScript has emerged as an easy alternative solution to creating cross-platform applications for mobile, desktop and the Web. With DukeScript, developers can use plain Java to write application logic and internally render it with HTML5 and JavaScript technologies.
As a result, the latest User Interface (UI) advancements are made available to Java programmers while additional toolkits are no longer necessary. Responsive layouts can be created by combining DukeScript with a framework like Bootstrap, and there is support for many other technologies such as the Knockout JavaScript framework and the canvas API.
DukeScript is fully enterprise ready and enforces true separation of concerns by using HTML5 for the view and Java for business logic while integrating flawlessly with backends such as JavaEE and Spring. The same Java code can be reused as both client-side and server-side.
To run Java code on the desktop, DukeScript leverages the HotSpot Virtual Machine (VM). On Google Android (News – Alert) devices the Dalvik VM is used, and the DukeScript application is packaged and deployed with the DlvkBrwsr plugin. For Apple iOS devices it’s RoboVM and iBrwsr. The Bck2Brwsr VM allows Java to run in plugin-less browsers.
“The problem on iOS is you cannot do dynamic code generation, but that's exactly what RoboVM avoids,” said Jaroslav Tulach, inventor of DukeScript.
The developers behind DukeScript offer several demo applications on the official website that demonstrate its usefulness and flexibility. These include a Minesweeper game and the FXGameEngine for game developers, a jsfiddle called DEW (Development Environment for the Web), Leaflet4j for displaying and interacting with maps in applications, the Canvas API for developing with the HTML5 Canvas component and a plugin for running in NetBeans.
DukeScript encourages its users to bridge the gap between logic and rendering code by offering this revolutionary new solution. As developers become more familiar with the technology and its capabilities, it is sure to become even more indispensable as it is extended to a wider range of applications and functionality in general.
Edited by
Maurice Nagle