3 May 2011
Download the Test Drive solution files (ZIP, 14 MB)
No code is written in this tutorial.
In this tutorial, you use the Flash Builder Network Monitor to monitor the traffic between your application and the server. This lets you quickly and easily look at the data being sent to and returned from your application.
Step 1: Enable the Network Monitor.
Open the Network Monitor view, enable the Network Monitor (see Figure 1), and run your application.
Figure 1. Enable the Network Monitor.
Before you do anything in the application, return to Flash Builder and look at the Network Monitor. You will see two requests: client_ping and getEmployees (see Figure 2). The client_ping operation is used by the Flex data service to check the server's responsiveness before it sends any actual requests. The getEmployees operation is the initial call to the server-side
getEmployees()method to populate the DataGrid. The time each request took is also displayed.
Figure 2. View the network traffic between the application and the server.
Step 2: View the getEmployees() response.
Select the getEmployees operation in the Network Monitor left panel and look at the request and response data for it in the right panel (see Figure 3).
The return type is AMF (Action Message Format), a binary format used by Flash Remoting to make calls to server-side classes.
Figure 3. View data returned from the getEmployees() operation.
Java developers: Each of your objects will be of type services.Employee.
Note that the three buttons in the upper-right corner to view the data in Tree, Raw, or Hex formats.
Step 3: View network traffic data for additional operations.
Return to your application in the browser and add, update, and delete data. Return to the Network Monitor and explore the data for the service calls. When you are done, disable the Network Monitor.
Be sure to look at the request data sent to the server when an employee is created or updated (see Figure 4).
Java developers: Your object will be of type services.Employee.
In this tutorial, you monitored the traffic between your application and the server, viewing request data, response data, and request times. In the next tutorial, you use the Flash Builder debugger to test and debug your Flex code.
Refer to the following resources to learn more about this topic:
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.