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.
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:

Leave a Reply

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