Java everywhere
$15.00
Minimum price
$19.00
Suggested price

Java everywhere

Write Once run Anywhere with DukeScript

About the Book

For a long time Java used to be a really good way to create cross-platform applications. Swing, SWT and the frameworks built on top of them gave us a way to deploy our applications to all relevant devices from a single source. The advent of the iPhone changed that. iOS and Android suddenly put up a barrier that wouldn't let us run our applications there. While initially it didn't matter in the enterprise, these platforms have become more and more important. 

But Java as you download it isn't a solution any more. DukeScript was invented to solve this problem. With it you can create applications that run on almost any device using the same source code.

This is a book to help you with your project. If you're an absolute DukeScript newbie, that's perfect. The book starts by explaining the core concepts and then immediately jumps to practical exercices. We'll go through our sample applications and inspect how they work. Along the way I'll explain the beasic workings and ideas behind the APIs.

This is a living book. That means that new chapters will be added and content will be updated. Once you've bought the book you'll get these updates for free as long as the book exists. If I find any errors I'll try to fix them in a timely manner, and if you spot any errors, let me know! It also means that if you want more detail on something, or if you miss something, you can tell me in the public issue tracker, and I will try to include it, so together we can make our book even better. 

  • Share this book

  • Categories

    • Java
    • Android
    • iOS
    • Computers and Programming
    • HTML
    • JavaScript
  • Feedback

    Email the Author(s)

About the Author

Anton Epple
Anton Epple

Anton is a consultant worldwide for a wide variety of companies, ranging from startups to Fortune 500 companies, in many areas, including finance institutions and aerospace. In his spare time, Anton is a member of the NetBeans Dream Team and the organizer of the JayDay developer conference in Munich. In 2013 he joined the Java Champions and received a JavaONE Rockstar Award. In 2014 he received a Duke's Choice Award for his work on DukeScript. 

Table of Contents

  • Preface
    • About this book
    • History
    • How it works
  • Getting started!
    • Prerequisites
    • Developing DukeScript apps with the NetBeans Plugin
    • Creating DukeScript apps with Eclipse
    • Using Maven to create a DukeScript project
    • The Generated Projects
  • Understanding the sample application
    • Running the application
    • The View
    • Binding the View to the Model
    • The Model
    • Putting it all together
  • Debugging a DukeScript application
    • Debugging Java Code
    • Visual Debugging
    • Debugging on Android Devices
    • Debugging on iOS Devices and Emulators
    • Debugging JavaScript Code
    • Debugging JavaScript with firebug-lite
    • Summary
  • Using the Knockout API
    • Model, View, ViewModel (MVVM)
    • The Model
    • The ViewModel
    • The View
    • Defining the ViewModel
    • Summary
  • DukeScript, JSON and the REST
    • Creating the project
    • Running the application
    • The client application
    • Code sharing
    • Parsing JSON
    • Summary
  • Workshop: DukeScript Twitter Client
    • Prerequisites
    • Set up the project
    • DukeScript, JSON and the REST
    • Creating the ViewModel
    • A model for parsing JSON results
    • Create a JSON Endpoint
    • Adding Functions for the UI
    • Observing Property changes
    • Initializing the model
    • The View
  • Separating View and ViewModel in practice
    • The state of UI Development
    • The Setup
    • Finding the right Designer
    • Working with the design
    • The result
    • Responsive Design with CSS
    • New CSS3 units vh and vw
  • Testing
    • Unit Tests
    • Test Driven Development means “Test first”
    • Is your UI Toolkit Test friendly?
    • DukeScript to the rescue
    • A little example - Unit Testing a viewmodel
    • Unit testing server communication
    • @OnReceive with Plain Text
    • Type-safe Access to Received JSON Data
    • Dealing with JSON Arrays
    • Summary
  • Deploying to the App Stores
    • Deploying to the Google App store
    • Deploying to the Apple Store
    • Summary
  • Creating a new API
    • Some examples
    • HTML5 Canvas
    • The @JavaScriptBody Annotation
    • The @JavaScriptResource Annotation
    • Summary
  • Dear Reader,

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub