Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
JavaFX 8 : introduction by example (2nd ed.)
Dea C., Heckler M., Grunwald G., Pereda J., Phillips S., Apress, New York, NY, 2014. 420 pp. Type: Book (978-1-430264-60-6)
Date Reviewed: Mar 2 2015

First let me emphasize that I’m reviewing Dea et al.’s book, not JavaFX 8 per se. One of its strong points is the inclusion of many examples of each major topic, along with screen shots and code examples.

The introduction covers JavaFX’s history and its announcement by Oracle in 2007. Java 8, announced in 2014, includes the JavaFX components, primarily lambdas, a new and improved JavaScript engine (Nashorn), and JavaFX application programming interfaces (APIs). Relating to JavaFX itself, topics such as 3D graphics, rich text support, and printing APIs are covered.

Chapter 1 deals with downloading and installing the Java 8 system development kit (SDK) and NetBeans integrated development environment (IDE); compiling and running with two different methods; and packaging a JavaFX application as a JAR file, that is, a standalone executable. This helps the reader feel at ease before getting into the details of JavaFX 8.

One of JavaFX’s main contributions to developers is in the area of creating rich 2D and 3D images, scenes, and animation, as well as rich font families. Chapter 2 goes into the fundamentals of these areas.

Chapter 3 introduces a fundamental addition to the Java language, namely the so-called lambda expressions, which provide simplified interfaces to functions. Also included in this chapter are stream APIs, default methods and common aggregate functions, user interface (UI) patterns, properties, and source code change support, an important subject for all developers. All these topics are explored in detail, with code examples.

Next, chapter 4 covers graphical user interface (GUI) layouts and controls in which the preceding facilities can be used. The GUI layouts come in different form factors, such as horizontal and vertical, according to the device being used. HBox and VBox layouts provide string child nodes in these dimensions. FlowPane, BorderPane, and grid layouts help use the available screen space effectively, as illustrated by examples. UI controls also deal with creating standard menus and menu bars with handlers that can respond to menu item selection. Included are techniques for mapping keyboard shortcuts to menu items. These are supported by ObservableList collections, which help implement ListView and TableView nodes.

JavaFX aims to serve business, sporting, and gaming applications. Chapter 5 shows how this challenge is handled with the graphics capabilities of JavaFX. Main topics here include loading, displaying, and creating animations using transition classes. These classes include KeyFrames and KeyValues, timelines, and effects such as fading, scaling, and translating in different dimensions. A PhotoViewer application using these facilities is provided to give the user a good idea of how animation works in JavaFX.

The user can create custom GUI facilities using the techniques described in chapter 6: theming, Java FX CSS styling, SceneBuilder, and custom controls. Thus, one builds themes such as business, sports, gaming, and so on using cascading style sheets (CSS), and screens using the themes and custom controls coded in the FXML language. Again, lots of examples and code are provided.

Chapter 7 deals with using different types of media functionality, including FX media, MediaPlayer, MediaStatus, and MediaView. These are used to build and operate MP3 players, buttons, and sliders, again illustrated by a lot of sample code.

Developing web applications is the subject of chapter 8. JavaFX interoperates with Hypertext Markup Language 5 (HTML5) through a web engine using load() and loadContent() methods. Raw content is obtained through a document object model (DOM) Extensible Markup Language (XML) or XML string object. The JavaScript bridge allows bidirectional communications between Java and JavaScript. These facilities are illustrated with code examples like RESTful GET and POST methods, including the handling of JSON-formatted data.

Three-dimensional (3D) animation developers will find chapter 9 very useful. It covers geometric primitives, cameras, lighting, TriangleMesh models, event handling, and interacting with 3D scenes. 3D scenes are described through a primitive example with code and a screen shot. Then come the subjects of primitive translation, rotation, and multiple operations. The chapter concludes with 3D objects in a TriangleMesh class, rotating a camera around a fixed origin, and working with lights.

Chapters 10, 11, and 12 deal with programmable electronic prototyping boards and devices that recognize gestures, all of which are of high interest. The prototyping boards are used heavily in robotic applications. Given JavaFX’s emphasis on animation, interest in these boards is understandable. Chapters 10 and 11 discuss the Arduino and Raspberry Pi boards, respectively. In chapter 10, hardware configurations of Arduino Uno and Due are shown; the IDE and its installation, as well as several small applications, are covered along with full code. Raspberry Pi, a popular board in education, is also referred to as “the Commodore 64 of our era.” Models A and B are described with screen shots, installation instructions for a NetBeans environment. People interested in learning about electronic programmed automation and robotics will find these chapters useful. The first part of chapter 12 discusses developing applications using multitouch devices such as the Windows Surface. Examples include animating a shape along a path, rotation, and zoom events using touch control in Windows 8. In the second part of chapter 12, a remarkable new device called Leap Motion and its use in JavaFX gesture recognition applications is described. As usual, some examples, screen shots, and plenty of code are included.

The last chapter (13), “References,” lists and annotates the main subjects in the book, including other references on JavaFX. The book is good reading even for those already familiar with JavaFX.

More reviews about this item: Amazon

Reviewer:  Birol Aygün Review #: CR143213 (1506-0439)
Bookmark and Share
  Reviewer Selected
 
 
Object-Oriented Programming (D.1.5 )
 
 
Java (D.3.2 ... )
 
 
Reference (A.2 )
 
Would you recommend this review?
yes
no
Other reviews under "Object-Oriented Programming": Date
Object-oriented programming systems, languages, and applications
Paepcke A.  Object-oriented programming systems, languages, and applications,Phoenix, AZ,Oct 6-Oct 11, 1991,1991. Type: Whole Proceedings
Oct 1 1992
Object lifecycles
Shlaer S., Mellor S., Yourdon Press, Upper Saddle River, NJ, 1992. Type: Book (9780136299400)
Apr 1 1993
Object-oriented programming
Voss G., Osborne/McGraw-Hill, Berkeley, CA, 1991. Type: Book (9780078816826)
Oct 1 1992
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy