This explains the command section in more detail, which is how command uses the delegate section to do Services (Remoting,webservices ...). etc.).
As the reader can tell from the previous lecture, event triggers frontcontroller to the corresponding command for business processing.
If the system is to interact with the database in the background, the command generates Delegate, instantiates the remote access (http,webservices, and so on), and returns the result to the command.
Service is used to define server-side access to obtain data.
This way the reader is very clear about the process of the command section, as explained in the code below:
In loadphotoscommand.as, you need to load the image Access server data (which is simplified in local XML, but the same principle), by onresults_loadphotos This, loads the captured picture data into the Modellocator, So view can display the data you have obtained.
In Photodelegate, the remote access is instantiated: __service = __locator.gethttpservice ("Photosin");
The way in which data is accessed is defined in Services.mxml: <mx:httpservice id= "Photosin" url= "Assets/photos.xml"/>.
Readers through the Demo15 and their detailed explanation, should have a very basic understanding, as for the framework itself, in the actual system development, should be very good to follow the framework itself requirements.
Article Source: http://wangyisong.javaeye.com/blog/465678