3 of 3 people found the following review helpful
4.0 out of 5 stars
Good Introduction to JavaFX 2, April 18, 2012
This review is from: Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology (Paperback)
The book gives an introduction to JavaFX 2, a web framework for realizing Rich Internet Applications (RIA). Overall, this is good book. If you want to get started with JavaFX 2, then you should buy this book. The book is easy to read and has good code examples (which you can download, too) for every feature.
Content
The book begins with a "getting started" chapter, which explains the initial setup of software and tools, and explains the basic concepts. This is what you need when you start with a new technology.
Afterwards, several chapters go into more detail about creating a user interface, defining properties and bindings, and using UI controls. After reading these chapters, you are ready to realize your first JavaFX application.
The next chapter explains the thread concept of JavaFX. This is very important to understand for writing responsive applications. After reading this chapter, you can start programming production-ready JavaFX clients. Of course, you also need to connect to a backend, so the chapter "accessing web services" is a must-read for developer who do not write standalone applications. The book explains several ways how to connect to a backend via XML or JSON. Even several addons and frameworks are mentioned including code examples (e.g. RESTFX or Jersey).
Further chapters describe how to use advanced UI controls for creating charts or including media files.
The last chapter describes how to use alternative JVM languages and layout markup languages besides Java, namely Groovy, Scala, FXML, and Visage. This chapter is awesome. Even if you do not have any experience with these languages, you will learn and understand the differences compared to Java, and see why and when you can benefit from using another language instead of Java.
Criticism
Even though this book is a great introduction to JavaFX 2, here is some criticism. The major weak point is that you do not get much information about deployment. You can deploy JavaFX applications as standalone application, as Applet within a web browser, or run it via Java WebStart. But how do you do that? How do you configure the application (e.g. how do you configure your JNLP file for Java WebStart)? Every developer needs to know this to use the application outside of his IDE... You have to google to get answers.
Besides, two minor weak points:
Firstly, there is no word about unit testing. How should you write tests for your JavaFX application? Are there any best practices?
Secondly, when should you use JavaFX, when should you use another framework (e.g. JSF, GWT, Grails, etc.)? This book has a lot of marketing style, so you won't get an answer here about problems of JavaFX.
Conclusion
As mentioned in the beginning, this is a very good introduction to JavaFX (omitting the deployment aspect) and easy to read. Every feature is explained in detail, including good code examples. So, if you want to get started with JavaFX 2, I can recommend this book to you.
Best regards,
Kai Wähner (Twitter: @KaiWaehner)
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
3 of 3 people found the following review helpful
5.0 out of 5 stars
Great resource, April 3, 2012
This review is from: Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology (Paperback)
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 IDE of choice. If you're interested in learning JavaFX, this book is well worth your money.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No