Up to this point in the book, you have familiarized yourself with the basic methods of Flex: you learned how to use some of the elements that allow you to define the user interface of an application, how to load external data using data models, and how to convert these data models into collection classes.
The next logical topic for discussion is remote data sources. Flex takes care of the presentation part of the application, but it does not have native access to any databases. Remote data sources allow you to take advantage of the RPC classes to perform calls to business logic built using ColdFusion, Java, or any other server-side technology to send and receive remote data. RPC, which stands for remote procedure call, allows you to execute a subroutine or procedure either locally or on another computer without having to code specific procedures for the remote interaction. For more details on RPC, check out the Wikipedia article on remote procedure call.
In Flex, the RPC services provide a call-and-response model to access remote data and expose the components based on service-oriented architecture (SOA). There are three RPC classes in Flex: the HTTPService class, the WebService class (compliant with Simple Object Access Protocol, or SOAP), and the RemoteObject class.

Figure 1. The HTTP call is executed on the creationComplete event of the application.
Marco Casario has been passionate about informatics since he was little more than a child and used to program games in Basic for Commodore 64, before dedicating himself—while still very young—to innovative projects for the web using Adobe Flash and Adobe Director (as far back as versions 3 and 5). In 2005, he founded Comtaste, a company dedicated to exploring new frontiers in rich Internet applications and the convergence between the web and the world of mobile devices. Marco was a technical editor for Apress, Friends of ED, and Wrox for such books such as Flash 8 Essentials, Professional Adobe Flex 2, and Foundation Flash Applications for Mobile Devices.