last 2 Weeks I was playing with Robotlegs (yeah, again), before using it for the specific project I decide to make couple of examples to fallow the “right” path and of course get input from community experts. The example we are building here gonna be simple rss reader: input field, load button, result.
Required library: robotlegs-framework-v1.4.0.swc
Flash Builder 4 used to run and compile project.
I could probably avoid using model and command in this example but as mentioned try to use all “parts” of the framework in right order.
The main source for me was best practices documentation and 3 tutorials from J. Hooks :
Flow of the Rss reader:
- ReaderViewMediator listens for load button click, and fires FeedLoadEvent event
- FeedLoadEvent runs FeedLoadCommand
- FeedLoadCommand starts FeedLoadService
- FeedLoadService loads the XML
- FeedServiceResultParser converts loaded data to array of ReaderItemVO value objects
- FeedLoadService notifies to FeedLoadCommand with parsed data
- FeedLoadCommand updates ReaderModel
- ReaderModel notifies the ReaderViewMediator that data is updated
- ReaderViewMediator updates ReaderView
Inputs, suggestions, corrections are welcome!
Finished Rss Reader(view source is available):