Flex and Rails: Two Useful Books

Flexible Rails


Flex on Rails

You’re using Ruby on Rails for rapid web application development, and you’re struggling to get JavaScript to display properly on different browsers. Surely there must be something for dynamic client side presentations that matches the ease of Rails development. Well, there is, and even better, it integrates nicely with Rails. It’s called Flex, and it is a part of the now ubiquitous Adobe Flash player.

The Flex language is a general purpose client side language for dynamic web presentation, and because it is mediated by Flash, it works the same in all browsers. It is now arguably the language of choice for new client-side web development, and it may displace JavaScript in the not too distant future. Best of all, it’s easy to get it to work with Rails on the server side. Two books show you how, one in easy to follow tutorial style, and the other covering more topics (but with less hand-holding.)

The first, Flexible Rails, is an excellent introduction that starts off by showing you how to install Rails and Flex on Windows or a Mac OX (plus some Linux hand waving.) Next, it presents a step-by-step tutorial of “Hello World!” as implemented in Flex alone, Rails alone, and finally with Flex cooperating with Rails. Such simple examples are a big help to understanding the basics of the technologies. The bulk of the remaining chapters are organized around an implementation of the popular Getting Things Done time management system.

The second book, Flex on Rails, is 200 pages shorter, but because of its terser style, it manages to pack in information on topics than the Manning book omits. With refreshing honesty the preface states “This book is not an introduction to Rails nor to Flex. If you haven’t used at least one of these technologies before, you may find yourself a little lost.” So you are warned.

Both books cover user authentication, the Cairngorm Flex framework, REST, and RubyAMF, a compact alternative to XML for Flex-Rails communication. But from there the two books diverge. Flexible Rails has chapters on validation, and the Adobe Integrated Runtime, while Flex on Rails has chapters on testing with Fluint, data visualization, and performance, plus briefer treatments on other topics.

In summary, Flexible Rails is a great introduction to integrating these two emerging technologies, and Flex on Rails is an admirable second book on the topic. Choose between them based upon your level of Flex experience, or better yet, get both.