Flex on Java:Review

8 09 2010

The people of Manning books give a MEAP copy of “Flex on Java” from Bernerd Allmon and Jeremy Anderson

In my company we are developing an ERP for a mid-size company dedicated to sale construction supplies on Leticia, Colombia. The application is a port from a Seam based application to a Flex/Spring application (BTW, Seam is a HORRIBLE framework, avoid it  if you can). So this is a great opportunity to review this book

First of all, the copy that I have is MEAP version so, this is not the final book and can contain some rough cuts and unpolished parts (if I can obtain the final version I’ll update this review)

Chapter 1:Some Flex with your Java?: A general introduction to the main topics of Flex and, of course, Java. A nice introduction for the rookie, but I don’t think that a rookie want to read this book. Flex and Java are big Behemoths and think to dominate both with just one book is silly. Also we have our first “Hello World!”, and IMHO the main problem of this book: (actually, not so relevant) The majority of the example codes aren’t in the last versions of the frameworks.

Chapter 2:Beginning with Java: This chapter cover the development of a Java Web Application with AppFuse (I read about this framework but I never use before) and Maven, once more time good information for the Rookie (Including how to install a JDK, yes, you read well). The application expose some WebServices and have the DAO Layer with Hibernate, the IoC with Spring and the Web Layer with Struts and JSP. Thumbs Up for no including IDE related content

Chapter 3:Getting Rich with Flex: Very good chapter, nice examples, and a valuable information for all the developers that are new in Flex, although don’t replace a good book in Flex, contains enough information to start and see the power of this framework. Thumbs Up for don’t use Flash Builder.

Chapter 4:Connecting to Web Services: This chapter is worth of the total costs of the book. The code quality are amazing, as never see before on others Flex books. The authors introduce the MVP (Model View Presenter) Pattern, a good way of organizing the code of a RIA. Although I never use the MVP is very nice to see a good example of how you can organize the code to call WebService/RemoteObject.

If you, like me, are not new to Flex and Server communication you’ll know that all the examples in the web and in the books use the <mx:RemoteObject> tag, very well for small examples but when your application grows up you’ll have a lot of copy-n-paste code in all the application. Well this chapter teach you how avoid this nightmare.

Chapter 5:BlazeDS Remoting and Logging: This chapter cover the Spring Flex project in very detailed way. For me this is OK, I’m a fan of Spring ( I’m  SpringSource Certified Spring Professional) but not all the developers love Spring. So, will be nice if the book cover another options like GraniteDS and integrations with EJB3 and Seam (The HORROR). Thumbs down for don’t including information about Exception Translators and the proper way to manage them

Chapter 6: Flex Messaging: Messaging is one of the more powerful features on Flex. This chapter have a LOT of technical details, is very deep and not for the faint of heart. But if you’re using Flex and Java, surely you’re not of them, right?

Chapter 7:Securing and personalizing your application: Spring Security deserve a book for his own, but this chapter makes a good work explaining the basics of Spring Security and his integration with Flex. Good examples and good theory, much better than the Spring Flex documentation

Chapter 8:Charting with Degrafa: This is the chapter that I enjoy less, Why? ’cause Degrada only works in Flex 2 and 3, and my current projects are on Flex 4, however AFAIK Degrafa is integrated now with Flex 4, so, hypothetically speaking, the theory in this chapter will help you with graphics on Flex 4.

Chapter 9:Desktop 2.0 with AIR: Great Chapter, AIR is a very compelling technology, and is huge plus if you can turn your Flex Web App in AIR Desktop App, but don’t lies yourself, most of the times this is Phantom requirement (A requirement that don’t exists), so Choosing Flex ’cause you can make Desktop apps easily when your app don’t have this requirement is a no-no.

Chapter 10:Testing your Flex application:Unit Testing is a requirement on all modern application development cycle. Flex Unit Testing is not very different from Unit Testing on other languages, so if you already knows how to do Unit Testing, you will dominate Flex Unit Testing in a breeze. This Chapter also covers Continuous Integration with Hudson Server, another hot topic (BTW I prefer TeamCity from JetBrains)

Chapter 11:Flex on Grails: Grails, my deadliest enemy, we meet again. You hate me, and I hate you… jokes apart, seriously, I’m not able to run any Grails example, and for my own mental health I don’t make the example in this chapter, but the code seems pretty easy, (Grails code is very easy, if it works is another question) but don’t expect that Grails auto-magically generates MXML code, so it’s not reduce drastically the amount of work that you need to do a mid size app.

Conclusion: Flex on Java is a very well written book, the code examples have a great quality and are production-ready, a very rare characteristic in programming books.

I like:

  • Code quality
  • Explanations on some hard topics
  • IDE-Agnostic

Don’t Like:

  • The book use some outdated libraries
  • Some important topics aren’t well covered
  • Don’t cover other connection options apart from WS and BlazeDS

NOTE: 9/10