I leveraged the new Cairngorm Framework (C2) recently on a Flex enabled Flickr app. Functionally, it's pretty similar to the hundreds of other Flickr apps, but the point of the app was to immerse myself in the new vr of C2, rather than to get bogged down in functionality. NOTE: loosely documented and some small errors, as this was just a first pass with C2 and Flex 2. Lots of refactoring and some small defects to address, but you'll get the pt. Just enter in tag(s) comma separated without spaces. eg: munch,rocco -- brings up my dogs.

http://www.brianmriley.com/sandbox/flickr/FlickrV2.html

One point or issue I had with C2 was the implementation of the ServiceLocator as an MXML component. The thing I love most about Flex is the clear separation of business logic from presentation logic -- MXML for views and AS for business / application logic. Sure, you'll have to add a bit of AS to all your views in order to make it work, but my ideal app leverages MXML only for views only. So, I created my own ServiceLocator for the application, and moved some of the result and fault objects to the BusinessDelegate. My BusinessDelegate is specific to the my Flickr application, but it could be refactored to a an AbstractBusinessDelegate or similar.

Also, since I leverage the ARP framework for Flash apps quite a bit, I like the idea of instantiating Commands as they're needed, not when the Controller is instantiated -- while I didn't implement this in my first pass at the app, I'm probably going to introduce this in my next vr.

And then there's the use of additional controllers. I usually introduce controllers into my app for the different MVC triads that require it -- while this can be seen as overkill, I sometimes like the granular control of smaller MVCs within my app. I took this away from large Flash apps, but I've found it's not as necessary in Flex. That being said, I've considered creating an additional controller here to handle the click event from the DataGrid, although it could be completey unnecessary in this small app.

I'll continue to add additional functionality as I have time. Feel free to comment.

Yes, I know my Flickr info is in the src ;-)

-riley


Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to