Stephen Chin, Johan Vos and James Weaver

The Definitive Guide to Modern Java Clients with JavaFX

Cross-Platform Mobile and Cloud Development

With Contributions by:
Gail Anderson, Paul Anderson, Bruno Borges, Anton Epple, Weiqi Gao, Jonathan Giles, José Pereda, Sven Reimers, Eugene Ryzhikov, and William Antônio Siqueira
Stephen Chin
Belmont, CA, USA
Johan Vos
Leuven, Belgium
James Weaver
Marion, IN, USA
ISBN 978-1-4842-4925-3e-ISBN 978-1-4842-4926-0
© Stephen Chin, Johan Vos and James Weaver 2019
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Foreword

The early 1990s saw the introduction of several game-changing technologies, two of which were the Java programming language and the World Wide Web. Prior to that period, client-server architectures were all the rage. One of the big challenges of client-server was developing application user interfaces (UIs) for various client machines and operating systems.

While most of the application development world was content with adapting web-based technologies such as HTTP, HTML, and JavaScript to client application development, a remnant of developers envisioned an alternative future. This future is being realized today in the form of rich, responsive clients that execute on the nearly ubiquitous Java Virtual Machine (JVM). I have had the privilege of co-laboring with many of these talented and revolutionary developers, several of whom have contributed the content that you’ll read in the following pages. These champions of JavaFX include Gail Anderson, Paul Anderson, Bruno Borges, Stephen Chin, Carl Dea, Toni Epple, Weiqi Gao, Jonathan Giles, José Pereda, Eugene Ryzhikov, Sven Reimers, William Antônio Siqueira, and Johan Vos.

Here’s a sampling of the rich-client treasures buried in this book: First, the groundwork is laid by showing how prevalent Java is in user interfaces that you may not have realized are written in Java. Then, the fundamentals of JavaFX are methodically revealed in a very approachable manner. After this treatment of foundational concepts, deep dives are taken in the important capabilities and libraries contained in JavaFX. Some of these capabilities are behind the scenes, such as JavaFX properties and binding, and some are visual, such as JavaFX controls and 3D graphics. After these JavaFX internal deep dives, several environments in which JavaFX can add much value are explored in depth. These environments include web, desktop, mobile, and embedded devices and the cloud. Finally, some leading-edge uses of JavaFX are discussed, including machine learning and scientific applications.

It is important to note that JavaFX is developed in the OpenJDK umbrella and has its own release vehicle. As such, there is only one JavaFX, and it works on desktop, mobile, and embedded platforms. JavaFX evolves with and leverages new features of Java, ensuring that it will continue to be a cutting-edge platform.

It is my pleasure and honor to recommend this book and the JavaFX technologies discussed and innovated by my dear friends and colleagues.

—James Weaver

September 2019

Table of Contents

Index 611

About the Authors, About the Contributors and About the Technical Reviewer

About the Authors

Stephen Chin

is Head of Developer Relations at JFrog and a Java Champion. He has keynoted numerous Java conferences around the world including Devoxx, JNation, JavaOne, Joker, and Open Source India. Stephen is an avid motorcyclist who has done evangelism tours in Europe, Japan, and Brazil, interviewing hackers in their natural habitat. When he is not traveling, he enjoys teaching kids how to do embedded and robot programming together with his teenage daughter. You can follow his hacking adventures at: http://steveonjava.com/ .

 
Johan Vos

started to work with Java in 1995. He was part of the Blackdown team, porting Java to Linux. His main focus is on end-to-end Java, combining backend systems and mobile/embedded devices. He received a Duke Choice award in 2014 for his work on Javafx on mobile.

In 2015, he co-founded Gluon, which allows enterprises to create (mobile) Java Client applications leveraging their existing backend infrastructure. Gluon received a Duke Choice award in 2015.

Johan is a Java Champion, a member of the BeJUG and Devoxx steering groups, and is a JCP member. He is one of the lead authors of thePro JavaFX books (published by Apress), the author ofQuantum Computing for Java Developers (Manning), and he has been a speaker at numerous conferences on Java.

Johan contributes to a number of projects, including OpenJFX, OpenJDK, GraalVM., and is the project lead for OpenJDK Mobile and the co-lead for OpenJFX.

 
James Weaver

is a developer, author, and speaker with a passion for quantum computing and JavaFX. He is a Java Champion and a JavaOne Rockstar. James has written books includingInside Java ,Beginning J2EE , thePro JavaFX series, andRaspberry Pi with Java . As an IBM quantum developer advocate, James speaks internationally at quantum and classical computing conferences. He tweets as@JavaFXpert and blogs at http://JavaFXpert.com and http://CulturedEar.com .

 

About the Contributors

Gail C. Anderson
../images/468104_1_En_BookFrontmatter_Figb_HTML.jpg
is a Java Champion, Oracle Groundbreaker Ambassador, and a past member of the NetBeans Dream Team. She is the director of research and founding member of the Anderson Software Group, a leading provider of training courses in Java, JavaFX, Python, Go, Modern C++, and other programming languages.

Gail enjoys researching and writing about leading-edge Java technologies. She is the co-author of eight textbooks on software programming, includingJavaFX Rich Client Programming on the NetBeans Platform .

Gail has conducted technical sessions and hands-on labs at Oracle Code One and NetBeans Day conferences in San Francisco, Europe, and Latin America. Gail has also presented sessions at Devoxx and Devnexus.

For more information about Gail, visit asgteach.com, the Anderson Software Group on Facebook, and@gail_asgteach on Twitter.

 
Paul L. Anderson
../images/468104_1_En_BookFrontmatter_Figc_HTML.jpg
is a Java Champion, Oracle Groundbreaker Ambassador, and a past member of the NetBeans Dream Team. He is the director of training and founding member of the Anderson Software Group, a leading provider of training courses in Java, JavaFX, Python, Go, Modern C++, and other programming languages.

Paul is an experienced speaker and specializes in making the technical aspects of software engineering fun and understandable. He is the co-author of eight textbooks on software programming, includingJavaFX Rich Client Programming on the NetBeans Platform .

Paul has conducted technical sessions and hands-on labs at Oracle Code One and NetBeans Day conferences in San Francisco, Europe, and Latin America. Paul has also presented sessions at Devoxx and Devnexus and is the author of LiveLesson videos on JavaFX programming and Java Reflection.

For more information about Paul, visit asgteach.com, the Anderson Software Group on Facebook, and@paul_asgteach on Twitter.

 
Bruno Borges
../images/468104_1_En_BookFrontmatter_Figd_HTML.jpg

has been developing applications with the Java platform since 2000. Throughout his career, Bruno has developed desktop applications with Swing and JavaFX platforms, as well as dozens of large web systems with Java EE standards and third-party libraries like Spring Framework, Apache projects, and others. His experience building systems for corporations and government agencies led him to join big vendors like Oracle and Microsoft in the fields of product management and developer relations to foster investment in tools and runtimes for Java developers across different industries. Bruno is an active participant of the Java community at large and a recognized conference speaker and influencer and was recently named a Java Champion. Some of his most well-known public projects are the JavaFX port of the game2048 , the Twitter component for Apache Camel, his work with Oracle to initiate the donation of NetBeans to the Apache Foundation, the Docker images for Oracle products, and the Java EE platform account on Twitter to foster the community. You can learn more about his work at https://brunoborges.io .

 
Anton Epple

is a consultant for a wide variety of companies worldwide, ranging from startups to Fortune 500 companies, in many areas, including financial 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.

 
Weiqi Gao
../images/468104_1_En_BookFrontmatter_Fige_HTML.jpg

is a partner and principal software engineer at Object Computing, Inc. in St. Louis, Missouri, USA. He has decades of software development experience and has been using Java technology since 1998. He is interested in programming languages, object-oriented systems, distributed and cloud computing, and graphical user interfaces. He is part of the original author team that produced thePro JavaFX series for Apress. He is a member of the steering committee of the St. Louis Java Users Group. Weiqi holds a PhD in mathematics.

 
Jonathan Giles
../images/468104_1_En_BookFrontmatter_Figf_HTML.jpg

is a principal Java architect at Microsoft. Before this, he was a technical lead in the JavaFX team at Sun Microsystems and Oracle Corp. for 9 years, where he led the development of the JavaFX user interface (UI) controls library and other related libraries. With his considerable contributions to Java releases 7–11, he takes immense pride in having his code deployed on almost every computer on the planet. Jonathan is passionate about creating excellent developer experiences with considered API design, documentation, testing, and tooling. He has toured the world extensively to present and write on these topics, and as a result he is a Java Champion, a JavaOne Rockstar, and a Duke’s Choice Award winner.

 
José PeredaPhD
../images/468104_1_En_BookFrontmatter_Figg_HTML.jpg

who specializes in structural engineering, works as a software engineer at Gluon Software. He is a Java Champion, Oracle Groundbreaker Ambassador, and JavaOne Rockstar. Having worked with Java since 1999, he is a JavaFX advocate, developing Java applications for mobile and embedded platforms connected to the cloud and enterprise systems. He also works on open source projects like OpenJFX and FXyz 3D ( https://github.com/jperedadnr ), co-authors JavaFX-related books (such asJavaFX 8: Introduction by Example andJavaFX 9 by Example , both published by Apress), blogs ( http://jperedadnr.blogspot.com.es/ ), tweets(@JPeredaDnr ), and speaks at JUGs and conferences (JavaOne, Devoxx, JAX, Jfokus, JavaLand, JCrete, JBCNConf, to name a few). José lives with his family in Valladolid, Spain.

 
Sven Reimers
../images/468104_1_En_BookFrontmatter_Figh_HTML.jpg

based at Lake Constance in southern Germany, works as a systems engineer at Airbus Defence and Space, creating next-generation ground segment software for space systems. He has more than 20 years’ experience building complex software systems and more than 20 years’ experience with Java, going back to its early days. In 2009, Reimers was the winner of the Duke`s Choice Award in the Network Solutions category for ND SatCom Satellite Communication Management Software. He is part of the Apache NetBeans PMC, a contributor to OpenJFX, and the leader and founder of JUG Bodensee. For his long-term commitment to Java and the community, Reimers was named a Java Champion in 2014.

 
Eugene Ryzhikov
../images/468104_1_En_BookFrontmatter_Figi_HTML.jpg
is a software architect with more than 30 years of experience in software development and design. He has created software ranging from real-time maps for very specialized field units and all the way to large energy trading systems. He has been using Java since the very beginning. His main interests are UI/UX, data visualization, advanced systems architecture/design, and serverless technology. Eugene is a cofounder of Gluon, and open source contributor, speaker at multiple conferences, and Java Rockstar.

In addition, his interests also include traditional Okinawan martial arts, jazz piano, and traveling with his lovely wife and daughter.

 
William Antônio Siqueira

is a software engineer working at Red Hat and is a longtime JavaFX blogger and Java developer. He is also a local JUG contributor and has created and has contributed to several Java and JavaFX projects.

 

About the Technical Reviewer

Carl P. Dea

is a principal software engineer. He has been developing software for over 20 years, for many clients from Fortune 500 companies to nonprofit organizations. He has written software ranging from mission-critical applications to ecommerce-based web applications. His passion for software development started when his middle school science teacher showed him a TRS-80 computer. Carl has been using Java since the very beginning, and he has been a huge JavaFX enthusiast since the early days when it was its own language called JavaFX script. His current software development interests are UI/UX, game programming, data visualizations, embedded systems, smartphones, AI, and robotics. When Carl is not working, he and his wife enjoy canoeing and day trips to the beach. Carl and his wife are proud parents of their younger daughter who attends Salisbury University. Carl and his wife are also proud of their older daughter, who is a high school teacher in Anne Arundel County, Maryland. Carl lives in Pasadena, Maryland, USA.

 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.239.234