Angular shitstorm: What's your opinion on the controversial plans for Angular 2.0?
Freshly ground

What’s the relevance of the Java desktop in a world that’s tilting towards mobile?

Geertjan Wielenga
fresh-beans

Geertjan Wielenga quizzes the authors of “NetBeans Platform for Beginners” about why they want to add to the Java desktop conversation at this stage in the game.

Freshly released publication “NetBeans Platform for Beginners” (https://leanpub.com/nbp4beginners), by Jason Wexbridge and Walter Nyland, is a 360 page guide to the modular architecture of Java desktop applications. What’s the relevance of the Java desktop in an increasingly mobile world, why did the authors write this book, and what do they think about Java 8? I decided to ask them these questions, and here’s what they had to say: 

Wielenga: What’s the point of writing a completely new book about the Java desktop?

Walter Nyland (WN): 
The question makes sense in some respects. But, in other respects, if you’re writing any kind of serious application that needs to be cross-platform and maintainable over decades, there are very few options at one’s disposal. Simply put, the Java desktop is awesome. The best books on this subject are really outdated and we thought a new one is sorely needed.

Jason Wexbridge (JW): Indeed. We work on management/monitoring tools, which need to visualize large amounts of data, and we have no need for the browser at all. The only benefit of the browser is accessibility, while we create applications for confined sets of users, e.g., air traffic controllers in a shared control room or underwater vehicle analysts, to name just two scenarios. For example, here’s NATO’s management console for monitoring and controlling the execution of air operations in a real-time environment, on the Java desktop, making use of the NetBeans Platform:


There are heaps of similar scenarios, mostly ignored in all the hype and buzz. JavaScript and HTML simply doesn’t cut it and is a nightmare to maintain over time.

The book you have put together has as its subtitle “Modular Application Development for the Java Desktop”. What’s the relevance of “modularity” and how does the book approach this subject?

JW: Well, modularity is the key to maintainability. Since Java itself does not provide modularity, other solutions need to be found, if you want to create any kind of medium to large size application. OSGi is an obvious candidate, but in our scenarios we need more than OSGi. We also need a docking framework, for example, and a synchronization framework for maintaining interaction across multiple sets of data in related windows. 

WN: Yeah, all that plumbing is just a nightmare to set up. And our users simply assume it will be there, they don’t actually pay for their plumbing, only for their domain-relevant layers in the application. We had a range of per-built Swing components that needed a modular home with extensible GUI containers to hold them, such as the aforementioned docking framework.

JW: When you add up all the above requirements, the only answer is to use the NetBeans Platform. We didn’t want to rewrite our components to SWT to make them fit with Eclipse RCP. Plus, we find Eclipse RCP to be way too heavyweight and slow, especially compared to the NetBeans Platform. Gives you everything you need, really. Except a complete and thorough guide to help you through the learning curve.

Right. Everything’s a bit spread around, in terms of documentation. Can you tell us a bit about the book you wrote?

JW: 
It’s the book we wish we had when we started creating serious applications.

WN: We simply put everything in there that we’ve learned over the years. We’ve also learned about other books on this topic. We wanted our book to combine the best of a reference manual with the best of a tutorial. So, each chapter begins with an extensive theoretical overview and ends with step by step tutorials, with all the source code on GitHub. And here is the end point of one of the key scenarios discussed in the book, again the sources are on GitHub, a drag-and-drop visualization of an underlying data model:

 

JW: Our reviewers have been very positive and encouraging. They’ve indicated that the book is far more than a beginner’s guide, since it covers a lot of more detailed content, also covering areas not dealt with anywhere else before. It builds slowly from basic concepts, with chapters dedicated to key terms, such as “Module”, “Lookup”, and “Node”.

What do you think about the latest developments in Java in this area, in particular JavaFX and Java 8?

WN: Java 8 is certainly interesting, especially the functional style of programming. That can potentially completely change the way we think about programming in Java, though probably only library developers will make use of these possibilities initially. Parallelism and the world of multi cores is obviously great for the type of large applications we’re involved in creating, so we’re looking forward to becoming even more relevant than we have been on the Java desktop.

JW: In terms of JavaFX, we’re not completely convinced. Most of the applications we work on in surveillance/monitoring applications don’t necessarily need the kinds of components and solutions that JavaFX provides, though it’s always interesting to be aware of the advantages they bring. For us, a modular architecture with patterns for loose coupling is really all we need. The rest, we can create ourselves, we have built up internal libraries of components — all that was missing was a coherent system to encapsulate and display them all to the user. And we have found that in the NetBeans Platform.

Together with “NetBeans Platform for Beginners”, you’ve released “Exercises in Porting to the NetBeans Platform”. 

JW. 
Right. In “Exercises in Porting to the NetBeans Platform” (https://leanpub.com/migrating2nbp) we basically provide exercises one can do, based on “NetBeans Platform for Beginners”. We’re hoping to interact with our readers and hear from them the kinds of exercises or scenarios they’d like us to cover. So, it’s a book continually in process, we hope to add a new exercise every week or so.

Finally, any final words for readers of this interview?

JW: 
Don’t be misled by buzz and hype. For industrial applications that need to be maintainable for years to come, JavaScript completely fails. Java is the answer and you need more than Java. You need an application framework based on open Java standards, which is the NetBeans Platform.

WN: My final words would be – the Java desktop is a cool place to be. Come and join us (and our book is cheap)!


Author
Geertjan Wielenga

Geertjan Wielenga

All Posts by Geertjan Wielenga

Geertjan Wielenga is a principal product manager in Oracle for NetBeans and has been a member of the NetBeans Team since 2004
Comments
comments powered by Disqus