Robotlegs Flickr search gallery

Another example of using robotlegs to create simple flickr search widget/gallery.
Required library: robotlegs-framework-v1.4.0.swc
Flickr API used for service
Flash Builder 4 used to run and compile project.
update
added “FlickrSelectedImageMediator” for the “FlickrSectedImage” flex custom component.
Moved Component opening/closing logic inside FlickrSelectedImageMediator.


Flow of the FlickrSearch:

  • FlickrSearchViewMediator listens for searchBtn CLICK
  • FlickrSearchViewMediator fires ImageSearchEvent event
  • ImageSearchEvent runs SearchCommand
  • SearchCommand starts FlickrSearchService
  • FlickrSearchService loads the data
  • FlickrSearchResultPareser converts data to array of thumbVO value objects
  • FlickrSearchService notifies SearchCommand with FlickrSearchResultEvent
  • SearchCommand updates data in FlickrSearchModel
  • FlickrSearchModel notifies FlickrSearchViewMediator with FlickrDataEvent.DATA_UPDATED
  • FlickrSearchViewMediator changes the view based on FlickrSearchModel data
  • user selects thumb
  • FlickrSearchViewMediator fires ThumbSelectEvent
  • ThumbSelectEvent runs ThumbSelectCommand
  • ThumbSelectCommand updates data in FlickrSearchModel
  • ThumbSelectCommand creates mediator for FlcikrSelectedImage and opens the component in popupmanager
  • FlickrSelectedImageMediator loads the selected image based on model data and handles link and close events as well as removes itself from being mediated on close

view source is available.
Finished version of FlickrSearch:
FlickrSearch

Bookmark and Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>