flexongrails

Preface

A Simpler Way

Traditionally, building enterprise web applications has been associated with complexity. These programs must be fine-tuned, heavily layered and scrutinized to an infinitesimal level. Development is slow, steady and complex.

The arrival of rapid application development (RAD) frameworks like Ruby on Rails and Django exposed the over-engineered world of Java-based web development. When David Heinemeier Hansson built a blog engine in 15 minutes with Rails in 2005, he demonstrated that web application development could be simple, elegant and fun. Rails has since been used to build large successful commercial applications like Twitter and power many of the web's success stories.

There has also been a quiet revolution in the tools and methods used to develop web applications in the last few years. Rich Internet Application frameworks like Flex, Capuccino and Silverlight have simplified the process of building highly functional and responsive web interfaces. Moreover, platforms like Adobe AIR have now blurred the line between web applications and desktop applications --- allowing developers to build cross-platform systems the same way they would write web applications.

This book tries to bring the visual gymnastics of Rich Internet Applications and the increased productivity of RAD frameworks into the world of enterprise Java development. Grails makes it easy to integrate the powerful server-side libraries used by Flex to communicate with Java. It also provides a highly adaptive web layer, allowing us to solve common Flash problems like cross-domain integration and search engine optimization. The Flex platform allows developers to create rich-interfaces that would require much more work using the HTML/Javascript tools currenlty available in Grails. Together, Flex and Grails provide a powerful combination that allow us to build media-rich, data-heavy applications quicker, faster and better.

Who This is Book Is For

About half of this book is geared towards back-end developers seeking to understand how Grails fits within the Flex and Java ecosystem. You should have a good understanding of Java, Spring, Hibernate and the tools used in Enterprise integration.  I try to give you enough information about powerful tools available via Grails plugins so you can quickly and easily develop and integrate the data layer of your web application.

The other half of this book has been written with front-end developers in mind. You have experience working with Flash, HTML, Ajax or similar technologies and are not afraid of writing a little code. In this part, I demonstrate the tools and techniques used to replace the traditionally HTML-based view layer in Grails with a rich Flex-based view. Additionally, we explore Grails-based solutions to common challenges faced when integrating Flash into web applications.

This is not intended as a comprehensive book on neither Grails nor Flex. Rather, the focus of this book is about the seamless integration of the two. Whenever possible, I will try to include links to relevant books, videos and other training materials that should help you further along in your exploration.

Downloading the Code

This book was written using Grails 1.2 and Flex 4. The source code for this book is available online from Github ( http://github.com/tomaslin/flexongrails/ ). The source code is organized in chapter order. Each chapter has its own project or projects to support its content.

Contacting the Author

Please contact me if you have any questions, comments or suggestions on this book’s content. Send all inquiries about this book to tomaslin@gmail.com. The website for this book is http://www.flexongrails.com. You can also follow me on Twitter at http://twitter.com/tomaslin.

License

This book is released under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. For the full text of the license, please visit http://creativecommons.org/licenses/by-nc-sa/3.0/.