Adobe Flash Builder 4, formerly known as Flex Builder, has simplified the integration of Adobe ColdFusion with the Adobe Flex framework to create SWF applications. You can now use simple wizards to import ColdFusion components (CFCs) into your projects and access data through service calls to the CFC functions. You can also easily populate Flex UI controls with the returned data by simply clicking-and-dragging the data object onto the control.
In Part 1, you will learn how to set up a ColdFusion data source. In Part 2, which is optional, you will generate the ColdFusion components (CFCs) using ColdFusion Builder. In Part 3, you will set up a Flash Builder data service project with ColdFusion for use with the Fictitious Sales Planner sample application.
Download the sample database archive file
In this section you will download the F4CF_FictitiousSalesPlanner database archive file. This database contains the employee sales data for the Fictitious Sales Planner sample application, which is used in other tutorials of the Flex and ColdFusion mini learning center.
- Download the f4cf_fictitious_db.zip sample file if you haven't done so already.
- Unzip the file to the \ColdFusion9\db directory and review the contents:
- The \ColdFusion9\db folder now contains the F4CF_FictitiousSalesPlanner folder which contains the control files and sample data for the Derby db.
- Start the ColdFusion server.
Create the Apache Derby data source
In this section, you will use the ColdFusion Administrator to create an Apache Derby Data Source to access the FictiousSalesPlanner data.
- Log on to the ColdFusion Administrator.
- Expand the Data & Services left hand navigation and Click on Data Sources.
- Enter F4CF_FictitiousSalesPlanner as the Data Source Name and Select Apache Derby Embedded from the Driver drop down menu as shown in Figure 1.
Figure 1. Add a New Apache Derby Data Source.
- Click the Add button.
- Click the Browse Server button next to the Database Folder, and navigate to the ColdFusion9\db\F4CF_FictitiousSalesPlanner folder. Click Apply. The Data Source definition panel will appear as shown in Figure 2.
Figure 2. The Data Source definition panel.
- Click the Submit button.
- You should now see the F4CF_FictitiousSalesPlanner Data Source listed under the Connected Data Sources as shown in Figure 3.
Figure 3. The F4CF_FictitousSalesPlanner Data Source has been added.
You will be using the F4CF_FictitiousSalesPlanner data source in Part 2 and Part 3 of this series.
Where to go from here
You have learned how to set up a ColdFusion data source and Flash Builder project. In Part 2, which is optional, you will generate the ColdFusion components (CFCs) using ColdFusion Builder. In Part 3, you will set up a Flash Builder data service project with ColdFusion for use with the Fictitious Sales Planner sample application.