Follow me Stepbystep Flex tutorial

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.