views:

301

answers:

1

I'm having a hard time building a Cairngorm Flex3 app that connects to a rails app... I'm used to rails DRY approad, and the Convention over Configuration thing too.. and Cairngorm in awful at these.

How do you keep you flex code as DRY as possible?

I've implemented a generic delegate to avoid a delegate for each command, at least. Any other idea?

A: 

OK, well, here's what I did:

  1. No use of Custom CairnGorm Events, simply make a common static dispatcher and dispatch Strings...

  2. One common RESTful delegate

  3. make components so that they inherit parent public vars (appModelLocator instance too!)
  4. Create a generic ServiceUtil to send dynamic HTTPServices, no need for the SerivceLocator etc..

this is a nice improvement in my opinion!

luca