Dec 01

Flex Ruby on Rails Sample App that uses Cairngorm 2.1 and WebORB

Tag: Flex and RailsDerek Wischusen @ 7:37 pm

I recently updated the issue tracker sample application in the Flex RoR SDK so that it uses Cairngorm 2.1 and WebORB for Rails.

Besides showing how WebORB and Cairngorm can work together, this app demonstrates how to:

  • use active record associations.
  • return typed ValueObjects objects from Rails using the [RemoteClass] metadata tag.
  • use dynamic finders inside Flex by directly mapping a Service to a ActiveRecord class.
  • do simple effects in Flex.
  • use states and transitions.

You can get the source here

Let me know if you have any questions or comments, or if you find any bugs.

Credits:

The reflection on the login screen is by Ben Stucki.

8 Responses to “Flex Ruby on Rails Sample App that uses Cairngorm 2.1 and WebORB”

  1. flexonrails.net » Blog Archive » Cairngorm/WebORB Issue Tracker Sample App Up and Running says:

    [...] I’ve set the issue tracker sample application that I recently added to Flex RoR SDK up on my site. [...]

  2. ilya says:

    the zip file seems broken?

    Did you manage to get specified objects on the AS side, or do you use vanilla vo’s (objects as associative array’s).

    I ran into that the last time i played with webOrb and rails… (object graphs that need to be turned into actual objects on the flex side)….

    curious to see how you set it up in this app…

  3. Derek Wischusen says:

    Hi Ilya,

    I just downloaded the the zip and opened it and everything worked. What was the problem that you encountered?

    Yes, Rails is returning typed objects to Flex.

    To get this to work you have to do two things

    1. Use [RemoteClass] metadata tag to specify the alias for your class:

    [RemoteClass(alias=\"com.rxr.issuetracker.vo.Issue\")]
    public class IssueVO implements IValueObject
    {

    2. Go to config/weborb-config.xml in your Rails app and map the alias to a server-side class

  4. flexonrails.net » Blog Archive » Cairngorm/WebORB Issue Tracker Sample App Up and Running (for real this time) says:

    [...] You can get the source for this app, and learn a little about what is going inside, by going to this post: http://flexonrails.net/?p=31   [...]

  5. ilya says:

    Hi Derek,

    I was downloading the zip at a financial institution (client).
    I guess it was their firewall…

    Sorry for the confusion. I will renew my efforts to tear through the entire web-orb config.

    I am seriously doubting between two approaches, and i wonder what you think about them:

    1) Use the new REST approach with xml (or json)
    advantage: no extra layers, simple setup.
    -closer to the rails-way.
    -the real cool thing is that unlike browsers, flex apps support the full gamma of HTTP headers (GET, POST, PUT, DELETE)
    so your ruby controllers and models is where you model your app.
    - So you get the testing structures automagically..
    disadvantage: one has to jiggle cairngorm around a little. Inside the methods on your business delegate you have to specify the HTTP verb…
    - possibly have much more services (and business delegators), the offset of this is that you have the REST style advantages (scalabillity through url partitioning and things like standard http caching configuration).

    2) Use Web-orb:
    advantage: close to vanilla cairngorm j2ee way of doing things.
    one service supports many methods, clean architectural composition.
    less boilerplate on flex side (turning xml states into value objects, or deserializing json objects.)

    maybe i tweak your sample app to use the first approach and get a feel for the differences.

    what do you think?

  6. ilya says:

    I read some stuff up on this topic on the google group. good overview of pro’s and con’s.

    I guess there is no simple answer.

    Thanks for providing this app Derek, it shows how to wire it up very nice.

    I had trouble myself with the examples on midnight coders. Thanks.

    Two questions: (if you prefer the google groups for dialogue let me know.)

    U directly invoke methods on the User (Rails) object. I didn’t know that was possible. its an interesting aproach. Did you do it like this to round off the app quicker, or do you go this route on purpose?

    You have some interesting boiler plate code (ValueObjectUtil.updateAttributes()).

    Can you comment on why you use this method, instead of putting the objects that come back from the server on your model?

    Curious ilya

  7. Derek Wischusen says:

    Hi Ilya,

    In addition to the points made on the google group, one thing to keep in mind is that you do not have to choose between using XML over HTTP (REST) or WebORB. You can use them together in the same app, if you need to.

    I did go the route of directly invoking dynamic finders on the User object on purpose, but not necessarily because I think this is the best method. My goal was just to show that it is possible.

    I use the ValueObject.updateAttributes() method because I think it is more efficient to update the properties on the selected object than it is to delete it and replace it with the object that I get back from the server. In other words, it is more efficient to make changes to the properties on an individual object than it is to make changes to a whole collection.

    Derek

  8. flexonrails.net » Blog Archive » Part 1 - Flex Cairngorm/WebORB Issue Tracker Tutorial says:

    [...] This is the first in a series of posts/tutorails that will cover certain features of the Issue Tracker sample app that I recently released. [...]

Leave a Reply

Tramadol without a prescription
Cheap viagra online uk
Order tramadol cod
Valium prescription drug
Buying xanax without a prescription
Xanax overnight delivery
Valium online without prescription
Buy generic valium online
Cheap valium online
Propecia generic online
Get phentermine without a prescription
Propecia buy online
Valium generic
Generic propecia cost
Order propecia without prescription
Cialis online without prescription
Buy cialis online from canada
Cialis generic online
Phentermine 37.5mg tablets
Prescription valium
Phentermine us pharmacy
How to buy viagra online without prescription
Valium buy online uk
Order viagra online canada
Canada cialis online
Prednisone prescription
50 mg tramadol
Genuine cialis no prescription
Levitra medicine
Order xanax online uk
Cheap levitra uk
Buy phentermine hcl without prescription
Phentermine 37.5mg without prescription
Cheapest viagra professional
Levitra cheapest price
Purchase valium without prescription
Valium buy no prescription
Viagra usa
Buy phentermine online with no prescription
Valium purchase
Xanax online without prescription
Viagra online pharmacy canada
Levitra uk
Viagra free samples
Viagra to buy in uk
Viagra suppliers
Prednisone cheap
Viagra online overnight
Cost of cialis 20 mg
Viagra discount prices
Free viagra samples
Cheapest place to buy viagra online
Order xanax
Cialis pills
Tramadol 100 mg
Canadian pharmacy phentermine
Purchase phentermine online
Valium online
Buy cheap propecia
Side effects of viagra
Low price cialis
Levitra lowest price
Propecia without a prescription
Cheap viagra pills
Cialis 5mg tablets
How to buy viagra in uk
Cialis prescription online
Buy phentermine in uk
Buy generic viagra india
Cheap viagra and cialis
Cialis no rx
Buy cialis in australia
Xanax pills online
Levitra cheap
Where to buy phentermine without a prescription
Cheap viagra in india
Cheap viagra canada
Doses of tramadol
Non prescription cialis
Best viagra websites
Cheapest generic viagra online
How to buy phentermine without a prescription
10 mg valium effects
Buying propecia
Buy viagra online in south africa
Cheap viagra cialis
Pharmacy valium
Levitra 20 mg price
Cialis online canada
Buy phentermine with mastercard
Buy discount viagra online
Valium online no prescription
Cialis canadian pharmacy
Order valium without a prescription
Best generic viagra prices
Online prescription propecia
Generic cialis online pharmacy
Online prescriptions for phentermine
Buy cheap cialis online
Non prescription viagra
Genuine viagra prices
Viagra discount coupons
Cheap generic xanax
Valium pills effects
Generic 2mg xanax
50 mg viagra online
Best price on cialis
Buy viagra online canadian pharmacy
Non prescription levitra
Cialis free sample
Purchase xanax online without prescription
Online viagra prescriptions
Cheap viagra generic
Order xanax cheap
Buying prednisone
Overnight xanax without prescription
Canadian pharmacy viagra online
Cialis london
Low price phentermine
Xanax generic 2mg
Cialis order
Cialis 100
Phentermine no prescription needed
Viagra pfizer canada
Tramadol hcl 50 mg tab mylan
Buy valium uk
100mg tramadol effects
Generic cialis prices
Buy viagra online from canada
Where can i buy levitra
50mg viagra
Viagra prescription free
Buy phentermine without a prescription
Buy real viagra
Buy genuine phentermine online
Viagra online with prescription
Buy propecia uk
Prednisone online without prescription
Prednisone online
Valium online reviews
Viagra online sales
Generic viagra in the uk
Phentermine purchase online
Tramadol pharmacy online
Phentermine without prescription mastercard
50 mg tramadol hcl
About phentermine 37.5 mg
Viagra overnight shipping
Phentermine pills
Cialis purchase online
Viagra trial pack
Xanax 1mg dosage
Buy prednisone no prescription
Phentermine hcl 37.5mg
Generic viagra professional
Phentermine hcl without prescription
Buying cialis online
Cialis for sale in canada
Generic levitra from india
Tramadol cod fedex
Get tramadol online
Buy viagra 100mg online
Generic tramadol medication
Buying phentermine in the uk
Viagra india
Generic viagra overnight shipping
20 mg valium effects
Australia viagra prescription
Xanax buy uk
Get phentermine without prescription
About xanax bars
Order propecia online no prescription
Canadian cialis no prescription
Viagra usa pharmacy
Tramadol no prescription next day
Xanax no prescription needed
Valium overnight delivery
Order levitra without prescription
Best viagra generic
Best price for phentermine
Viagra overnight delivery us
Viagra cheap prices
Phentermine 37.5 manufacturer
Online cialis generic
Purchase viagra without prescription
Cialis from india
Where to buy levitra online
Cheap tramadol without a prescription
Buy viagra online without prescription uk
Xanax cost
Where to buy valium
Viagra ordering
Prednisone pharmacy
Cialis over the counter in canada
Canada viagra online without prescription
Genuine viagra
Cialis drug prices
How to buy viagra in australia
About xanax pills
Buy viagra las vegas
Phentermine tablets 37.5
Order cialis online
Buy viagra generic
Tramadol 50mg tablets
Brand name cialis online
Cheapest place to buy phentermine
Buy 30mg phentermine
Fast delivery cialis
Where can i buy generic viagra
Buy tramadol online canada
Canadian pharmacy phentermine 37.5
Best place to buy xanax
Online viagra cheap
Viagra purchase uk
Buy tramadol cod delivery
Cialis pricing
Buy phentermine no prescription
Cialis 100mg pills
Buy cheap viagra uk
Phentermine 37.5 without prescription fedex
Levitra 10 mg
Brand cialis without prescription
Buy phentermine online without prescription
Phentermine no rx
Female viagra uk
Where to buy phentermine
Phentermine usa
Buy xanax bars online
Cheapest viagra in uk
Generic phentermine 37.5 without prescription
How to buy viagra over the counter
Buy discount cialis
Viagra suppliers australia
Cialis no prescription canada
Buy valium in uk
Best place to buy viagra uk
Best generic cialis
Buying viagra in the uk
Viagra 50 mg price
Valium prescription uk
Cost of prednisone
Xanax fedex
Buying generic viagra
Doses of prednisone
Where can i buy valium in the uk
Order cialis online without prescription
Viagra for sale usa
Phentermine 37.5 without prescription free shipping
Viagra fast shipping
Generic cialis from india