9780321543370

Flex on Rails : Building Rich Internet Applications with Adobe Flex 3 and Rails 2

by ;
  • ISBN13:

    9780321543370

  • ISBN10:

    0321543378

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2008-12-23
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
  • Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $49.99 Save up to $6.00
  • eBook
    $43.99
    Add to Cart

    DURATION
    PRICE

Supplemental Materials

What is included with this book?

  • The eBook copy of this book is not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Summary

"Therers"s no question yours"re going to be a better Flex and Rails developer when yours"re done reading this book." From the Foreword by Matt Chotin, Senior Product Manager, Adobe Systems, Inc. Adobe Flex enables the rapid development of rich and engaging user experiences. Ruby on Rails dramatically simplifies the development of database-driven web applications. Now therers"s a book that shows how to use the newest versions of both frameworks together to create state-of-the-art Rich Internet Applications (RIAs). Flex on Railsbegins with the absolute essentials: setting up your environment for Flex and Rails, passing data with XML, and integrating Flex front-ends with Rails back-ends. Then, using practical, easy-to-understand code examples, the authors take you from the basics to advanced topics only discussed in this book. Techniques covered here include Constructing sophisticated interfaces that canrs"t be created with AJAX alone Using RESTful services to expose applications for access via APIs Testing Flex and Rails together Using Flex Frameworks Getting Flex into your build/deploy process And morehellip; The authors also offer practical introductions to powerful complementary technologies, such as RubyAMF and Juggernaut. Written by developers with extensive experience using both frameworks, this book covers the new Adobe Flex 3 and Ruby on Rails 2 from the ground up. Even if you have minimal experience with Flex or Rails, yours"ll learn all you need to know to use them to build exceptional production applications.

Author Biography

Tony Hillerson is a Software Architect for EffectiveUI. He graduated from Ambassador University with a BA in MIS. On any given day, he may be working with Flex, Java, Rails, Maven, Ant, Ruby, Rake, Capistrano, or shell scripts. Tony maintains RubyAMF, a Rails plug-in that allows Flex applications to pass AMF messages to and from Rails. Tony has been a speaker at 360Flex, Adobe MAX, and RailsConf, as well as local user groups. In his nonexistent free time, Tony enjoys playing the bass, playing World of Warcraft, making electronic music, brewing beer, learning Latin, and studying philosophy. Tony lives outside Denver, Colorado with his wife and son, Titus.

Daniel Wanja, a native of Switzerland, currently lives in Denver, Colorado. He has lived in Denver for more than six years with his wife and three children, ages 5, 3, and 5 months. Daniel is a dynamic, skilled enterprise software architect and developer with over 20 years’ experience. He has worked in the banking, insurance, and high-tech industries around the world delivering mission-critical software. Daniel is president and part owner of two Flex and Ruby on Rails consulting agencies, Nouvelles Solutions, Inc., in Denver, http://n-so.com, and ProDesign Sarl in Geneva, Switzerland, http://prodesign.ch. Daniel started the http://onrails.org blog on Ruby on Rails and related matters in 2005.

Table of Contents

Forewordp. xv
Prefacep. xvii
Acknowledgments from Tony Hillersonp. xxi
Acknowledgments from Daniel Wanjap. xxii
About the Authorsp. xxiv
Flex and Rails Essentials
Developing with Flex and Railsp. 3
Installation: What You Need to Get Runningp. 3
The Structure of a Flex and Rails Applicationp. 6
The Example Codep. 9
Compiling MXMLp. 9
Running the Rails Serverp. 9
Summaryp. 9
Passing Data with XMLp. 11
XML in Railsp. 11
XML in Flexp. 14
Getting XML to Flexp. 17
Sending XML to Railsp. 19
Mapping Data Typesp. 21
Error Handlingp. 25
Summaryp. 28
Flex with RESTful Servicesp. 29
Creating the Stock Portfolio Rails Applicationp. 29
Accessing Our RESTful Application with Flexp. 39
Summaryp. 48
Using Fluint to Test a Flex with Rails Applicationp. 49
Using Fluint to Write Your Flex Unit Testsp. 50
The Basics of Testing a Flex Applicationp. 51
Testing a Cairngorm-Based Applicationp. 59
Using Fixturesp. 79
Summaryp. 83
Passing Data with AMFp. 85
What Is AMF?p. 85
Benefits of AMFp. 86
RubyAMFp. 87
A Simple RubyAMF Examplep. 95
A RESTful RubyAMF Integrationp. 101
Summaryp. 103
Debuggingp. 105
Loggingp. 106
Debuggersp. 110
Command Line Debuggersp. 117
Debugging Communicationp. 127
Summaryp. 129
Data Visualizationp. 131
Online Analytical Processing (OLAP)p. 133
Advanced DataGridp. 144
Chartingp. 147
Summaryp. 152
Flex MVC Frameworksp. 153
What Do We Mean by a Framework?p. 153
Roll Your Ownp. 154
Cairngorm at a High Levelp. 154
PureMVC at a High Levelp. 159
Stuffp. 163
Summaryp. 182
Performance and Optimizationp. 185
Flex Performancep. 185
Rails Performancep. 206
Summaryp. 211
Cookbook Recipes
Source Control Flex and Rails Projectsp. 215
Goalp. 215
Solutionp. 215
Ignoring Files in Subversionp. 215
Gitp. 217
Discussionp. 218
Summaryp. 219
Building Flex with Rakep. 221
Goalp. 221
Solutionp. 221
Rake Is Your Friendp. 221
The Rakefilep. 222
Summaryp. 225
Deploying Flex and Rails Applicationsp. 227
Goalp. 227
Solutionp. 227
Capistranop. 227
Deploying with Capistranop. 228
Summaryp. 232
Read the Source!p. 233
Goalp. 233
Solutionp. 233
The Beauty of Open Sourcep. 233
The Rails Sourcep. 235
Flex Sourcep. 238
Generated Flex Sourcep. 240
Summaryp. 243
Using Observers to Clean Up Codep. 245
Goalp. 245
Solutionp. 245
BindingUtils and ChangeWatchers in Flexp. 245
Taking Action on ActiveRecord Lifecycle Eventsp. 248
Summaryp. 250
Authenticatingp. 251
Goalp. 251
Solutionp. 251
Authenticating Usersp. 251
Installing restful_authenticationp. 251
Summaryp. 257
Reusing Commands with Prana Sequencesp. 259
Goalp. 259
Solutionp. 259
Sequencesp. 259
Prana's EventSequencep. 261
Summaryp. 265
Hierarchical Data with RubyAMFp. 267
Goalp. 267
Solutionp. 267
Nested Setsp. 267
Summaryp. 273
p. 18
Advanced Data Grid and Awesome Nested Setp. 275
Goalp. 275
Solutionp. 275
Overviewp. 275
Create the Rails Application and Databasep. 275
Creating a Script to Load the Datap. 276
Flex Applicationp. 279
Adding CRUDp. 282
Summaryp. 287
Runtime Flex Configuration with Pranap. 289
Goalp. 289
Solutionp. 289
IoC, Eh?p. 289
Summaryp. 293
Server Push with Juggernautp. 295
Goalp. 295
Solutionp. 295
Push Technologyp. 295
Juggernautp. 295
Creating the Rails Messaging Applicationp. 297
Creating the Flex Messaging Client Applicationp. 299
Summaryp. 301
Communicating between Flex and JavaScriptp. 303
Goalp. 303
Solutionp. 303
Communication between Flex and JavaScriptp. 303
Securityp. 303
Building the Samplesp. 304
ExternalInterfacep. 304
SWFObject and Prototypep. 305
ExternalInterface in Actionp. 305
Flex-Ajax Bridge in Actionp. 309
Summaryp. 311
File Uploadp. 313
Goalp. 313
Solutionp. 313
File Uploadp. 313
Creating the Rails Application and Installing attachment_fup. 315
Using Flex's FileReference Class to Upload
One or Several Filesp. 316
Using Flex URLLoader Class to Upload a PNG Filep. 318
Summaryp. 320
Indexp. 321
Table of Contents provided by Publisher. All Rights Reserved.

Excerpts

Preface PrefaceIn 2004 yet another framework for making websites appeared. It was called Ruby on Rails, and when web and enterprise developers who had never heard of Ruby before started to work with it, they discovered that it wasn't like all the others. Why?Rails offers the promise of fewer configuration files, less boilerplate code, less red tape, and, most of all, the promise of having fun again while programming. Rails was designed to make development more about getting common development tasks done by following conventions, not offering endless flexibility for the remote possibility of connecting up with any number of hypothetical legacy back-ends sometime in the future. By taking away unnecessary choices and offering simple solutions for common problems, Rails lets developers focus on writing applications, and developers have paid Rails back in accolades and adoption.Around the same time as Rails was emerging, Macromedia (later bought by Adobe) was bringing a product codenamed "Royale" to market as Flexa server-side Flash compiler. Flash had been experiencing a groundswell of developers wanting to build rich interfaces for web applications, not just animations or "Punch the Monkey" ads. Flash developers loved that they could build interfaces that would be extremely hard, if not impossible, to produce in HTML and JavaScript, but the Flash IDE was more suited to timeline animations. Flex changed all that by offering an easy-to-understand XML language for developing Flash interfaces, as well as a component set that made it dead simple to build applications. Flex 2 made things even better by taking the Flex compiler off the server so that there was no requirement of building and deploying Flash movies (SWFs) using the Flex framework and compiler. Flex 3 is one step better by being open source!The Flex language has come a long way too. Bruce Eckel, the author of such books as Thinking in C++, Second Edition (Prentice Hall, 2000) and Thinking in Java, Fourth Edition (Prentice Hall, 2006), said it best when he said, "Flex is a DSL for graphics, multimedia, and UIs" ( http://www.artima.com/weblogs/viewpost.jsp?thread=193593 ). DSL, or Domain Specific Language, is a language with terms that match up well with a certain problem domain, and the term DSL should resonate with Rails developers. Flex, more than HTML with JavaScript, is a language for building rich interfaces quickly and easily.Flex and Rails developers haven't crossed paths that often, but more and more as the word gets out about each technology, developers want to know what these two are about. Having worked for years with both Flex and Rails, we believe that both have something powerful to offer developers who want to build desktop-like functionality into web apps quickly, in a team environment, with the ability to be agile and react to the ever-changing requirements of building and delivering an application to the web. Audience for This Book?Chances are you're reading this introduction to figure out if this book is for you. Have a look at these "stories" and see if any of them sound familiar. RickRails Guy

Rewards Program

Write a Review