
The Flex application, which is running on the customer’s com-
puter,
uses the HTTPService tag to talk directly to the web serv-
er. The code on the web server, either in PHP, ASP, JSP, or
something similar, talks to the database and then returns either
text or XML.
Example 5-3 shows the code for the Flex application which
responds to a text response from the web server.
Example 5-3. The text-based Flex application
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" backgroundColor="#FFFFFF"
backgroundAlpha="0"
backgroundImage="">
<mx:Script>
Figure 5-5. The XML return version of the application
Figure 5-6. Network access from the Flex application
72 | Chapter 5: Working with the Server
Komentáře k této Příručce