Blog

  • Transpile Plain Java into JavaScript

    DukeScript is all about smooth communication between Java and JavaScript. It comes with no surprise that one can use the DukeScript infrastructure to easily transpile Java code into JavaScript and run it in a browser. Here is a...

    Read More
  • Spice your Android app with Web Components!

    Developing an Android application with Android Studio and in a need to talk to an HTML/web component? Then this article is for you. It gives a step by step description of how to add any web component into your application....

    Read More
  • Version 1.3 of Mobile Presenters

    The presenters are the soul of any DukeScript system. They help you to code in Java (or other JVM based language) and render in HTML - on Android, iOS, desktop, etc. Here comes a short note about them.

    Version 1.3...

    Read More
  • Can DukeScript Ecosystem Benefit from Java9?

    Today we’ve got engaged into particularly interesting discussion: Can DukeScript benefit from Java9? Java9 is feature freezed and it’s release date seem to be unstoppable: thus it is really the right time to look at its features and analyze...

    Read More
  • DukeScript with Node.js backend

    In one of our latest projects the customer has decided to use Node.js as a backend. So we decided to share a minimal demo how simple it is using DukeScript APIs.

    You’ll need node installed and in addition the...

    Read More
  • How to display a "Loading" Indicator

    When deploying a DukeScript Application to the Browser, it takes a bit until the Java libraries are loaded. During that time the HTML is already displayed.

    Since the Bindings aren’t applied yet, the application will look “broken” for a...

    Read More
  • Alternative to RoboVM for iOS

    A while ago RoboVM, our solution for running DukeScript applications on iPads and iPhones, was first commercialized and later abandonded. Our current workflow is based on the last Open Source version which still works fine.

    In the meantime a...

    Read More
  • Better Retina Support for Canvas API

    The DukeScript Canvas API is great, if you need to draw something directly in a DukeScript Application, but up until now there was one drawback. On Retina displays the output would look a little blurred. With version 0.10, we’ve...

    Read More
  • Storage and other Services for each Platform

    Ever wanted to access the most appropriate persistent storage for browser, desktop, Android or iOS platform? Ever was in a need to access any other platform dependent service? With new version 0.17 of our Maven archetypes this task has...

    Read More
  • Line Charts & more for Java

    Including nice looking charts in your Java application has never been easier! DukeScript visual archetype 0.16 gives you absolutely smooth start - just a few clicks in the IDE or shell commands and you are ready to use...

    Read More
  • Try native presenters!

    There are new archetype versions that make it easy to use the native presenters. What are the native presenters? What is a presenter?

    In DukeScript a presenter is a system that makes sure your Java application finds proper HTML...

    Read More
  • New Version of Maven Archetypes

    There’s a new version (0.14) of the DukeScript Maven Archetypes available. Users of the DukeScript Plugin for NetBeans don’t need to change anything. The Wizard will automatically use the latest version.

    The latest version has some minor changes in...

    Read More
  • User Objects in the @Model

    We often get questions about a specific limitation of our ViewModels: The classes generated by the @Model annotation don’t allow custom inheritance. This means they cannot subclass an existing class or implement an interface. And more important, also the @Properties...

    Read More
  • Native Installers with DukeScript

    This Tutorial was contributed by Ruslan López Carro, a Software Development professional at UNICOM, and a very active and valued member of the DukeScript community. Here’s a link to his original blog post:

    For this tutorial we’ll create a...

    Read More
  • SnapSVG for Java

    SnapSVG is a very decent JavaScript library for rendering and animations. With great delight the DukeScript project announces immediate availability of the library for all Java users!

    Check the javadoc for detailed description. Use following code to add...

    Read More
  • Role based UI with DukeScript

    It’s a very common requirement to show or hide elements in a UI based on the users roles. Depending on the view technology this can be quite a challenge. The most convenient way to do this, is by declaratively marking...

    Read More
  • Big Data with DukeScript

    At the JCrete conference last week we had some DukeScript hacking sessions, and we were was asked for best practices when you have large data sets to display in a grid. One solution is paging. If you want to...

    Read More
  • Transpile JavaScript to Java!

    Let’s reverse the trend of last few years today! Instead of continuing to transpile more and more languages into JavaScript, let’s demonstrate how to transcript any JavaScript library into Java!

    Please meet Definitely Typed Java Libraries another project sponsored...

    Read More
  • Wrap your favorite library!

    With DukeScript it’s easy to wrap any JavaScript Library using @JavaScriptRessource and @JavaScriptBody Annotations. This is great if you want quick access to some functionality from an existing library. But preparing a full blown API for the whole functionality is...

    Read More
  • Can Your Java Code Run in a Browser? Yes, it can!

    JUnit Browser Runner is a small and very handy extension of JUnit. It is a small step for the DukeScript project, but a giant leap forward for the Java community: The JUnit Browser Runner gives you...

    Read More
  • Demo of our new Presenters!

    We’ve recently announced new desktop presenters for DukeScript. The old desktop presenter, that we still use as the default is based on the JavaFX WebView component, a component based on webkit. The benefit of this is, that you can...

    Read More
  • Smash Your Design with WebKit Presenters!

    The presenters are the glue between your Java and JavaScript code in your DukeScript application. They make sure that your Java methods with JavaScriptBody annotation can properly pass their parameters to the JavaScript engine and receive results...

    Read More
  • Switching Views

    For a Swing or JavaFX developer switching between views in Single Page Applications (SPAs) might be a little strange at first. “Single Page” seems to imply, that everything needs to be in one large HTML-File. But that would be ugly,...

    Read More
  • DukeScript for IntelliJ IDEA

    Here are some instructions how to get started with DukeScript using IntelliJ IDEA. Miroslav Kopecky has volunteered to contribute a tutorial. Miro is a long time Java user and a very active member of the Java community, loves to...

    Read More
  • (Auto)Release of J(ava)Query!

    Today is a great day. With a huge delight the DukeScript project announces that it is now easy to use JQuery in your DukeScript applications. What is so great on that? Maybe you are thinking: “ooh well, just another library”...

    Read More
  • HTML/Java 1.3 API Released

    With a great delight we announce that the NetBeans project has released version 1.3 of HTML/Java API - the core API in any DukeScript application. The Javadoc is available at usual place and in its overview section it...

    Read More
  • DukeScript and the NetBeans Platform

    DukeScript is very easy to embed in NetBeans Applications. You can use it to create Plugins for NetBeans the IDE, or to write Applications on top of the NetBeans Platform. You can also enhance existing NetBeans Platform Applications with new...

    Read More
  • Basic Authentication in DukeScript

    I’m currently writing a little NetBeans Plugin with DukeScript. The Plugin allows you to show, filter and sort the issues of a Bitbucket project inside NetBeans. For this I need to make authenticated calls to the Bitbucket API. Here’s...

    Read More
  • JPA and DukeScript

    One of the benefits of using DukeScript for a client-server application is code reuse. You can use the same model classes on the client and the server. Our Maven Archetype CRUD with Jersey Faces is a good example of this.

    ...
    Read More
  • DukeScript for Swing Developers White Paper

    Oracle has decided to put Swing in „maintenance mode“, which means that only serious bugs will be fixed. Swing will still be around for a few years, but there will be no new feature development. Browser vendors discourage the use...

    Read More
  • Release of DukeScript Selenium

    Last week we blogged about how you can use Selenium to do integration tests for DukeScript applications. We’ve been working on improving the webdriver to support as much useful functionality as possible. Today we’re proud to announce the first...

    Read More
  • Behaviour Driven Development

    Behaviour Driven Development(BDD) combines the principles of Test Driven Development with the ideas of Domain Driven Design. The basic idea is to allow non-programmers to specify desired Behaviour as simple user stories. These stories should be written as...

    Read More
  • Integration Testing

    Integration testing is often painful. That’s why we’re trying to mimimize the need for integration tests by making the view logic completely unit testable. Still you also need to make sure that your data-bind attributes are correct, or that you...

    Read More
  • New Version of Controls4J DukeScript Plugin

    Position has released a version 2.1.0 of their controlsjs Plugin for DukeScript.

    Controlsjs offers a component suite with an easy to use WYSIWYG Editor fully integrated into NetBeans. With this, you can create your...

    Read More
  • Dynamic Lazy Loading Templates

    In a recent blog I created a little Java API for registering templates. With this approach you could define templates in external html files, which simplifies template management and editing (due to html editor support). It also gives you...

    Read More
  • Controlling Android Boot Sequence

    On most platforms a DukeScript application is a regular Java application - e.g. it has a main method that handles the initialization and then starts the appropriate presenter. If you use our archetypes, you’ll notice the Main or iOSMain...

    Read More
  • ChocolateChip-UI

    In our last blog you’ve seen Materialize, a great tool for creating native looking Android apps with DukeScript. This time we’ll look at ChocolateChip-UI a view framework that can help us do the same for iOS. It’s...

    Read More
  • Materialize your Application

    In our last blog we’ve shown you how you can use different views on iOS, Android and Desktop. Now we’ll have a closer look at how to style the app for Android.

    The app will be available on github...

    Read More
  • Alternative Views

    I know we’ve mentioned that a lot :-), but DukeScript really has a clean separation of view and logic. This is not only helpful for the collaboration of designers and developers, it’s also really helpful if you want to provide...

    Read More
  • Using Sass in NetBeans

    In case you decide to skip the designer developer workflow enabled by DukeScript, and write the css yourself. Or if you would like to structure the css your designer created, you can use SASS.

    Sass is really...

    Read More
  • Kinder Surprise - three wishes at once!

    Templates are a very simple way to structure your code. With them you basically add html snippets as a script tag to your dom. Then you can reference them which creates much cleaner code.

    Here’s an example from the...

    Read More
  • NetBeans Day at JavaONE

    This years JavaONE was really exciting. But one of the best things about it was NetBeans Day. As in the years before NetBeans Day was held as part of Community Sunday. There were lots of interesting session partially organized...

    Read More
  • Internationalization (i18n)

    We’ve been asked a couple of time at JavaONE how to deal with internationalization in DukeScript. It’s fairly simple. ViewModels are initialized on the Java side and we can use the normal ResourceBundle approach, but what about the html?

    There’s...

    Read More
  • Oracle Jet released

    My favorite announcement at this JavaONE was the release of the Oracle JavaScript Extension Toolkit (JET) which “empowers developers by providing a modular toolkit based on modern JavaScript, CSS3 and HTML5 design and development principles”.

    Honestly that text,...

    Read More
  • New Version of Maven Archetypes released

    We’re proud to announce a new version of the DukeScript Maven archetypes. Version 0.11 has some really nice new features.

    Android users can now debug their application directly on their Android device. In NetBeans 8.1 choose “debug” from the context...

    Read More
  • Simple Paging in DukeScript

    I’ve recently been asked about techniques for improving List performance in HTML-based views. One of the cheapest tricks to do that is paging. Most modern List implementations do apply it in one way or the another. Often it is hidden...

    Read More
  • Can't touch this? Hammertime!

    I’ve recently been asked how to deal with touch events in DukeScript. One option is to use hammer.js, a JavaScript Library that supports the most important number of events and gestures. You could create an API for that and...

    Read More
  • Links of the week

    Here’s what happened last week:

    Finally here’s some documentation on how to do java calls from JavaScript in form of this blog post

    Geertjan has talked about DukeScript in his JavaZone talk on Everything a Java Developer...

    Read More
  • Syntax of Java calls in @JavaScriptBody

    Hardcore developers of DukeScript are using the @JavaScriptBody annotation for creating their own APIs. Calling JavaScript code like this is pretty straightforward.

    It’s slightly more difficult if you want to make calls from JavaScript to Java. The first thing...

    Read More
  • Inspect Knockout Contexts with Eclipse and IDEA

    Since version 1.2 of the API, there’s a visual debugger available also for Eclipse and IDEA. Here’s some info how to activate the inspector ( which is firebug-lite ).

    You’ve seen how to use it for inspecting the...

    Read More
  • Links of the week

    Here’s what happened last week:

    Read More
  • Visual Debugging with Eclipse and IDEA

    The new version (1.2) of the HTML/Java APIs is already on Maven Central, and you should start using it right now. There is now an easy way to enable Firebug in the General Client for visually debugging the app. I...

    Read More
  • Our JavaONE Sessions

    At this years JavaONE there will be a bunch of sessions on DukeScript and even a full Hands-On-Lab. Hope to see many of you there:

    Java on Your Phone! [UGF10302] Panel with Gluon guys October 25, 4:30 pm - 5:15...

    Read More
  • New HTML/Java API Version 1.2

    NetBeans 8.1 will ship with a new version of the HTML/Java APIs we use in DukeScript.

    This brings us a couple of new features:

    HTTP request headers

    The ability to set HTTP request headers when using the OnReceive annotation....

    Read More
  • New NetBeans Plugin 1.5

    We’re happy to announce a new version of the NetBeans Plugin for developing DukeScript. The new Version (1.5) utilized new features of NetBeans 8.1 to allow on-device debugging of Android apps.

    It also provides more intelligent code completion for...

    Read More
  • Links of the week

    This week was quite a busy one:

    Read More
  • CRUD Example with Wildfly

    This blog post is an answer to a question recently asked in the DukeScript Forum. The question is about our CRUD archetype, which contains a very simple Jersey based REST Server: “How do you suggest I deploy my web...

    Read More
  • Simple Routing with DukeScript

    If you’re using DukeScript for Web based applications, you might be interested in allowing users to use bookmarks and history to navigate your app. Here’s a very minimal example showing how to add that to an application.

    First I created...

    Read More
  • How to develop DukeScript applications with Eclipse

    I’ve been asked a couple of times, if you can develop DukeScript applications with Eclipse. And while we encourage people to try NetBeans, we don’t want to exclude Eclipse users. So I decided to give it a try. I have...

    Read More
  • How to write an API for PouchDB

    In our forum someone has asked how he can use PouchDB in DukeScript. In case you don’t know PouchDB this is the description from their website:

    “PouchDB is an in-browser database that allows applications to save data...

    Read More
  • New Version of Controls4J DukeScript Plugin

    Position has released a version 2.0 of their NetBeans Plugin for controlsjs.

    Controls.js is a technology for building modern web and mobile applications. Controls.js is fully integrated with DukeScript. DukeScript applications are plain Java applications that internally...

    Read More
  • Here it is, the inevitable Twitter Demo!

    UPDATE:Registering your own Transfer is no longer required with Version 1.2 of the API. Check the update at the end of the blog entry before you try this tutorial…

    ******/UPDATE*********

    OK, drum roll, raise the curtain, clear the stage, here...

    Read More
  • On device debugging for iOS!

    We’re proud to announce the latest version of the DukeScript archetypes has been released to Maven Central. The greatest new feature is support for on-device debugging on iOS. If you have installed the NetBeans Plugin, the new archetypes will be...

    Read More
  • Chewie we're home - Enzo for DukeScript

    For a long time I’ve been admiring the great controls created by Gerrit Grunwald (@hansolo_ on twitter). So it’s time to convert them to DukeScript. It takes a bit of effort to do that and it’s probably not what the...

    Read More
  • Appify your Application (1)

    In our last post we showed you, how you can outsource the design of your application. And while it’s great to be able to do that, it’s still important to know a couple of techniques to make your app...

    Read More
  • The Design Experiment

    So DukeScript claims to have a clean separation of design and development? That’s nice, but many frameworks claim that, and often the statement doesn’t hold in practice. That’s why we decided to do an experiment. Is it possible with DukeScript...

    Read More
  • No More Redeploys!

    One of DukeScript’s motto is “JavaScript as it was meant to be!” - i.e. our vision is to use the benefits of Java to create something more productive than JavaScript. JavaScript developers are used to an edit/reload/try workflow. The iterative...

    Read More
  • New NetBeans Plugin

    We’re happy to announce a new version of the NetBeans Plugin for developing DukeScript. The new Version (1.2) fixes a problem with a library that is used to access the catalog of Maven Archetypes and adds a new update center,...

    Read More
  • Testing Network Communication with DukeScript

    Since the post on Test Driven Development in DukeScript we know that DukeScript is excellent when it comes to testing the UI behavior. However a typical DukeScript application not only shows a UI, but also talks to a server....

    Read More
  • Test Driven Development with MVVM

    I’ve been a consultant in many projects for client side developments, and compared to the backend the test coverage is usually very low. In fact in many projects unit test coverage is zero percent. And I do understand that. Many...

    Read More
  • New version of DukeScript for iOS and Android!

    We’re proud to announce the latest version of DukeScript support for iOS and Android. We’ve already submitted the new NetBeans plugin for publication. This will make it really easy to get started. It’s currently being reviewed, and we hope...

    Read More
  • Type-safe JSON Parsing. Easy with DukeScript!

    DukeScript is primarily optimized for designing client side responsive applications in Java and HTML, however libraries in its core are built with the goal of making Java/JavaScript interoperability easier. One of the essential concepts in JavaScript is JSON. Thus...

    Read More
  • A little Game (3)

    In the last posts we created our 15-puzzle, took care that it is solvable, made it persistent and added a Function for restarting the game.

    For todays post I promised you to make the thing responsive, so...

    Read More
  • A little Game (2)

    In the last posts we created a digital version of the 15-puzzle I liked to play as a kid. Back then when we were playing the 15-puzzle there was one neat little trick. I would carefully remove two of...

    Read More
  • A little Game (1)

    As a little exercise for using Animations in DukeScript, I’ve created a little sorting Game. The aim is to sort 15 numbered tiles. You probably remember the mechanical version of this game from your childhood. Here’s a description in...

    Read More
  • Common Misconceptions about DukeScript

    DukeScript is a relatively new Technology. As such it suffers from some misconceptions. I recently found a thread on Reddit discussing wether DukeScript could “take off in popularity”. Well, we definitely think it should and are prepared to deal...

    Read More
  • Persisting State with DukeScript

    I’ve been asked a couple of times, if it’s possible to store data on the device via DukeScript - for example in order to store UI state. We’re currently exploring how to automate this tracking, so you would only need...

    Read More
  • New Version of bck2brwsr released

    In DukeScript we use bck2brwsr (pronounced “Back to Browser”) as our default solution for running an app in any modern Web Browser. Our friends over at Apidesign.org have just announced the release of Version 0.12 of it’s popular Java...

    Read More
  • New Version of HTML-APIs released

    The NetBeans Team has announced the upcoming new version of the HTML for Java APIs. Version 1.1 brings one major change with it: You can now bind models to a specific Element of the DOM tree identified by it’s id....

    Read More

subscribe via RSS