Coming Up for Air

Book Review: Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology

Tuesday, April 03, 2012 |


I was privileged to be given a copy of the recently released Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology ir?t=coupfoai0f 20&l=as2&o=1&a=1430268727 from Apress, authored by!/JavaFXpert[James] Weaver,!/weiqigao[Weiqi] Gao,!/steveonjava[Stephen] Chin,!/deanriverson[Dean] Iverson, Johan Vos. This review is a bit overdue, but I hope you find it as helpful as I found the book.

For those looking for a quick summary, here it is: Overall, I thought it was a really good book that should get you up and running with JavaFX very quickly.

Now, the details. As I said, I think this is a very solid technical book, which is hard thing to accomplish. Some books are really dry and overly technical, making them hard to read and reference, while others are fun to read, but shallow and not very helpful. This book, though, strikes a great balance, I think. There’s a wealth of knowledge, but I found it flows pretty well and doesn’t bog the user down in the super technical details. I do, though, read a fair number of these types of books, so maybe I’m numbed to that. Your mileage may vary. : )

Chapter 1, "Getting a Jump Start in JavaFX", might be the most important, as it introduces the technology to the user. Lose him here, and the rest of the book is worthless to him. The authors did a great job of working through a simple, yet functional application, hitting the high points. They didn’t spend a great deal of time on the details, but gave the reader enough to grasp kinda-sorta what’s going on. There is tons of source code and pictures, which is extremely helpful. You don’t have to go download the source and glance back and forth between the book and your computer. It’s literally all right there.

Chapter 2 deals with "Creating a User Interface in JavaFX". The component library in JavaFX is large and growing, so the book can’t (and shouldn’t) cover all of them, this chapter hits some of the major ones, showing how to put them on the screen, lay them out, have them respond to events like mouse clicks, etc. Again, there is a lot of source code, giving the reader plenty of complete examples right the book to follow. Skipping a bit, Chapter 4 shows how to write (visually) scalable applications with no static positioning, while Chapter 5 returns to the topic of components, demonstrating a large number of the components and how to use them. Using these three chapters, I was able to get a non-functioning, but non-trivial UI mocked up in no time.

Chapter 3 covers properties and bindings, two of the more fascinating aspects of the library, in my opinion. This one dives a bit deeper into the interfaces involved in the topics (including some UML for those that into that sort of thing), but still manages to be very readable. Like chapter 3, chapter 6 covers something not necessarily graphical, collections and concurrency. This chapter covers the new, rich collections API, while addressing the concurrency issues that are sure to arise in a modern, event-driven application.

Chapter 7 spends considerable time on the charting features available in JavaFX, an important part of many business applications. The chapter has plenty of source and graphics to look at, and spends some time on styling the charts with CSS

Chapter 8 shows the media control features in the JavaFX. In this chapter, the user is walked through building simple, yet functional audio and video players. This is very practical chapter, I think, giving interested parties a great starting point in making their media-capable applications.

Chapter 9 seemed to me to take a very odd departure. What in the world do web services have to do with JavaFX? The answer is nothing, really, but what this chapter does, though, is provide a very practical, real world usage of the various JavaFX APIs, both UI and concurrency. We’re give great examples of ListCells, Services, TableViews, etc., and some more hands-on with JavaFX Property objects. I may have started the chapter confused, but I think in the end, this is one of my favorite chapters.

Chapter 10 and Appendix A round out the book by describing some of the alternate languages available to JavaFX developers, namely, GroovyFX, ScalaFX, Visage, and FXML. While these chapters are really more about these other languages than JavaFX itself, I think those open to non-Java JVM languages will find a wealth of information here to help them pick a language. Or reinforce a choice they’ve already made.

With all of that out of the way, if I had to say something bad about this book (and, I know, this will sound strange), I would say that maybe there’s too much code. The amount of source in a book is, I think, a pretty subjective question. When learning something, it’s great to have it all right there in front of you (the authors even include import statements, a rare, in my experience, but nice touch), but if you’re just needing a quick answer found somewhere in the prose of the book, it can obscure things a bit. Having said that, I don’t think they’ve done a bad thing here, as I like to see the code, but I can see someone being a bit put off by the multiple consecutive pages of code, so be forewarned.

As I said at the beginning, I really enjoyed this book. As I find the time to work more with JavaFX, I think this will be my go-to tome to help me through my issues. Can you find all of this information online? Certainly, as is the case with every technical book, but the authors have done a great job of distilling all that information into a readable text, meaning you’ll spend less time on Google, and more time in your" title: ";)[IDE of choice]. If you’re interested in learning JavaFX, this book is well worth your money."



    Sample quote

    Quote source


    My name is Jason Lee. I am a software developer living in the middle of Oklahoma. I’ve been a professional developer since 1997, using a variety of languages, including Java, Javascript, PHP, Python, Delphi, and even a bit of C#. I currently work for Red Hat on the WildFly/EAP team, where, among other things, I maintain integrations for some MicroProfile specs, OpenTelemetry, Micrometer, Jakarta Faces, and Bean Validation. (Full resume here. LinkedIn profile)

    I am the president of the Oklahoma City JUG, and an occasional speaker at the JUG and a variety of technical conferences.

    On the personal side, I’m active in my church, and enjoy bass guitar, running, fishing, and a variety of martial arts. I’m also married to a beautiful woman, and have two boys, who, thankfully, look like their mother.

    My Links