Subscribe

  • Subscribe  

RIA Architecture Frameworks

Posted by aleks76 | December 19, 2005 .

RIA Architecture Frameworks.

There are 2 major frameworks available for RIA development:Cairngorm and Ariaware. I didn’t find much difference after studying both of them. They advocate Application Controller – Command – Business Delegate – Service Locator pattern. Cairngorm goes a little further to introduce View Helpers that suppose to update the view while Ariaware leaves up to the developer to decide how the model should propagate changes to the view. In Flex 1.5 we relied on native Flex property binding to a static model class to make sure that all changes are captured. It is very easy and doesn’t clutter the code. Unfortunately Binding is not working like it suppose to in ActionScript 3.0 but it should be fixed before the final release. For now we can use Model to update respective view via View’s update(m:model) method.

Does anybody wants to share their framework or application developemtn approach?

Leave a Comment

If you would like to make a comment, please fill out the form below.


Name

Email

Website

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Comments

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


Related Posts

14 Comments so far
  1. Tim  December 20, 2005 1:12 am

    I am investigating various frameworks for Flex2 Alpha. Does anyone know if it’s possible to use either of the existing framework for Flex 2 apha.

    Cheers,

    Tim

  2. aral  December 20, 2005 1:17 am

    Hi Aleks,

    The two frameworks definitely are similar at this point, but not identical. By the way, the name of the “Ariaware” framework is actually “Arp” :) It used to be an Ariaware product but is now an open source framework available from OSFlash (http://osflash.org/arp).

    The current best practice I would support in Arp is to use the new ModelLocator (in SVN) and to update the model only from the BusinessDelegate or Command. Earlier releases had copies of the model propagated on views which is actually quite a bad practice.

    The latest version in SVN has a few enhancements over the main release version (such as a ModelLocator, etc.)

    I’m currently working on a new release that will be quite a milestone but it’s a major reworking that includes substantial changes to the documentation, etc. Expect it in the first half of 2006!

  3. Keith Peters  December 20, 2005 2:14 am

    I’ve done quite a bit of work with ARP, and have recently dived into Cairngorm as well. At my company, I’m creating a framework that uses the best of both, and some changes to both, driven by the particular needs of our project. I’d say it’s closer to Cairngorm, but is for straight Flash 8, AS2.

  4. Simon Barber  December 20, 2005 2:23 am

    Hi Tim,

    We have managed to implemented my own version of Cairngorm framework for Flex 2 Alpha. There are some work arounds with
    regard the ModelLocator due to AS3 not allowing static members to be bindable. Otherwise i have managed to
    get everything else to work.

    We did this as my company is currently building a Flex 2 application and we needed a familiar framework to
    work with. We will be uploading the framework to IFBIN Flex by Example in the near future.

  5. Steven Webster  December 20, 2005 2:58 am

    We’ll be releasing a new version of the Cairngorm framework for Flex 2.0 in the imminent future; Simon, it’d be great if you could consider contributing your changes back to the Cairngorm project, rather than forking it on IFBIN. That way, many more developers are likely to benefit from your input, and the project won’t become splintered.

    Drop me a note offlist to discuss ?

  6. Flexguy  December 20, 2005 3:10 am

    Hey my friend Steven, it’s still feeling odd your name links to Adobe…:-)
    Anyway, I agree, leaving opensource as opensource is good way of sharing. Go Simon, go!

  7. aleks76  December 20, 2005 3:14 am

    One can definitely implement Cairngorm or ARP frameworks in AS 3. First main
    difference would be Event Model. You must extend EventDispatcher class in AS3
    (it was static in AS2) and extend Event class to add data object member to pass
    data to the business tier. See full code below. See more posts about model
    binding work arounds later.
    //Event Dispatcher
    public class EventBroadcaster extends EventDispatcher{

    //the only instance of itself
    private static var eventBroadcaster:EventBroadcaster;

    //return the single instance of the class
    public static function getInstance():EventBroadcaster
    {
    if(eventBroadcaster == null)
    eventBroadcaster = new EventBroadcaster();

    return eventBroadcaster;
    }

    public function EventBroadcaster()
    {
    super(this);
    }

    public function broadcastEvent(eventName:String,eventData:Object):Void
    {
    var event:DAREvent = new DAREvent(eventName,eventData);
    super.dispatchEvent(event);
    }
    }
     
    //Event class

    import flash.events.Event;
    public class DAREvent extends Event {

    public var data:Object;

    public function DAREvent(eventName:String,eventData:Object)
    {
    super(eventName);
    this.data = eventData;
    }
    }
     
     

  8. Tim  December 21, 2005 12:44 am

    A small request — If it’s not a major inconvience, would it be possible for me to get an alpha of the Cairngorm framework or Aral framework to start with. (It’s better to start with one of the best-practice framework rather than devising our own and then having to re-architect later on).

    Cheers,

    Tim

  9. Alex Uhlmann  December 21, 2005 4:03 am

    Hi aleks,

    updating the view via the ViewLocator strategy is just one way to do it in Cairngorm. As Aral pointed out and now also uses in Arp, application specific views that bind towards a model (ModelLocator) is a much easier and cleaner solution in many cases.

    Alex

  10. Alistair McLeod  December 21, 2005 8:40 pm

    Tim, at this very moment in time, we have people porting a version of Cairngorm to Flex 2/AS3.
    This is a straight port and does use any of the new features of Flex 2, but it will allow you
    to write Flex applications in Flex 2 using Cairngorm.

    We hope to have it out this week, but if not, then by early in the new year.

    Cheers,

    Alistair

  11. Tim  December 21, 2005 10:43 pm

    Alistar,

    Even without all of the Flex2 features is still Super Fine. This will enable all those who are on Flex2 to immediately utilise a best practice framework at the very start of their project.

    Thanks again for your help,

    Tim

  12. Tim  December 29, 2005 6:38 am

    Happy Holidays Everyone !

    The Best is Yet to Come … Shining 2006

    Cheers,

    Tim

  13. Tim  January 4, 2006 11:28 pm

    Hi,

    This might be a Taboo question in the Flex 2 development circle, but I thought I give it a go. Does anyone know, or make a reasonably estimate of when Flex2 will be in BETA?

    The reason I ask is because we are working on a Flex 2 project and we really need to know Flex 2 time line. Currently, we are running quite a few problems with Flex2 in terms of CFadapter binding and many other issues when the application gets more complicated. Most things seem to work fine when the apps are small like those in the flex samples.

    Thanks for any educated estimates here.

    Tim

  14. Jon  January 8, 2006 11:45 pm

    Any news on the version of Cairngorm for Flex 2/AS3? Getting close to a release?

    Thanks,
    -Jon

<

Error. Page cannot be displayed. Please contact your service provider for more details. (6)


Direct TV Offers - usdirect has the best directtv deals