Adobe 38000827 Evaluator Guide - Page 28

Debugging Rich Applications with ColdFusion MX and Macromedia Flash MX

Page 28 highlights

Macromedia® ColdFusion® MX Evaluator's Guide ColdFusion MX resources. Using this new capability, Macromedia Flash developers can execute queries against a database, preprocess data before sending it to the client, or invoke web services via a URL. Using ActionScript on the server is virtually the same as using client-side ActionScript. The only difference is that server-side ActionScript includes several functions not found in traditional ActionScript. For instance, CF.query allows developers to perform queries against ColdFusion data sources. As a result, developers can create functions for querying databases or interacting with other server-side resources. The sample code below defines a function for retrieving a list of department names from the HR database. function getDepartments() { theSQL = "SELECT DISTINCT DepartmentName FROM tblDepartments"; qTest = CF.query({datasource:"HR",sql:theSQL}); return qTest; } Once a function has been defined on the server, it can be called from any Macromedia Flash client using the Flash Remoting Service, which automatically handles the interactions between client and server. Debugging Rich Applications with ColdFusion MX and Macromedia Flash MX Macromedia Flash MX provides a powerful tool for debugging applications that use the Flash Remoting service, and this tool is tightly integrated with the ColdFusion MX environment. The NetConnect Debugger monitors calls between ColdFusion MX, the Macromedia Flash Player, and the Macromedia Flash application - providing a unified view of application behavior from within the Flash MX authoring environment. By monitoring calls as they are processed, developers can easily trace the flow of data and quickly correct any errors that may occur in the application. Together, Macromedia Flash MX and ColdFusion MX dramatically simplify the process of developing and testing rich Internet applications. 28

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38

Macromediafi ColdFusionfi MX Evaluator°s Guide
ColdFusion MX resources. Using this new capability, Macromedia Flash developers can
execute queries against a database, preprocess data before sending it to the client, or
invoke web services via a URL.
Using ActionScript on the server is virtually the same as using client-side ActionScript.
The only difference is that server-side ActionScript includes several functions not found in
traditional ActionScript. For instance, CF.query allows developers to perform queries
against ColdFusion data sources. As a result, developers can create functions for
querying databases or interacting with other server-side resources. The sample code
below defines a function for retrieving a list of department names from the HR database.
function getDepartments()
{
theSQL = "SELECT DISTINCT DepartmentName FROM tblDepartments";
qTest = CF.query({datasource:"HR",sql:theSQL});
return qTest;
}
Once a function has been defined on the server, it can be called from any Macromedia
Flash client using the Flash Remoting Service, which automatically handles the
interactions between client and server.
Debugging Rich Applications with ColdFusion MX and Macromedia Flash MX
Macromedia Flash MX provides a powerful tool for debugging applications that use the
Flash Remoting service, and this tool is tightly integrated with the ColdFusion MX
environment. The NetConnect Debugger monitors calls between ColdFusion MX, the
Macromedia Flash Player, and the Macromedia Flash application ± providing a unified
view of application behavior from within the Flash MX authoring environment.
By monitoring calls as they are processed, developers can easily trace the flow of data
and quickly correct any errors that may occur in the application. Together, Macromedia
Flash MX and ColdFusion MX dramatically simplify the process of developing and testing
rich Internet applications.
28