| By Mary McDonald | Article Rating: |
|
| October 31, 2006 10:15 AM EST | Reads: |
16,112 |
ColdFusion Extensions for Flex, included in ColdFusion MX 7.0.2, enable Flex Builder 2.0 developers to automate the more mundane tasks like CRUD (creating, reading, updating and deleting records) by creating ColdFusion components, ActionScript class files, and code to invoke a Web Service.
In this article we will use the ColdFusion/Flex Application wizard to automatically generate Master, Detail and Master/Detail pages that will let the user create, read, update and delete artist information supplied from a database. The application will include ColdFusion Components, Flash ActionScript classes, as well as Flex MXML pages. Special thanks to Damon Cooper and Dean Harmon for helping me better understand the CF/Flex Super Wizard.
First we have to make sure we have all the software we need to make our software writing jobs easier.
The following software will be used in this example:
- Windows XP Home Edition (the operating system I am using)
- Java2Runtime Environment Std Edition 1.4.2.12 (needed to run Eclipse)
- Eclipse SDK 32win32 (the tool we will be using to develop in)
- Flex Builder 2.0 with Charting (this contains the CFFlex Wizard)
Please see my previous article "My First Flex App" in September CFDJ (Vol. 8, Issue 9) for instructions on how to install Flex Builder and Eclipse.
- ColdFusion MX 7.0.2 (contains the ColdFusion Extensions for Flex Builder)
To install the ColdFusion Extenstions for Flex Builder (in Flex Builder):
A) Select Help > Software Updates > Find and Install.
B) Select the Search for New Features and Install option, click Next.
C) Click New Archive Site.
D) Select the ColdFusion_Flexbuilder_Feature.zip file, click Open.
(If you installed CF MX 7.0.2 using the default values, look in the Extras Folder.)
E) When the Edit Local Site dialog box appears, click OK.
F) Ensure the ColdFusion Flex Builder feature is selected, then click Finish.
G) Select the check box next to ColdFusion_Flexbuilder_Feature.zip, then click Next.
H) Accept the terms of the license, then click Next.
I) Click Finish.
J) Click Install All.
K) When the installation is complete, click to restart Flex Builder.
- Lastly, make sure RDS is set up correctly to allow ColdFusion to access the database you will be using. To configure RDS in Flex Builder:
A) Select Window > Preferences > RDS Configuration
B) I will be using the default localhost server in this example:
- Select localhost
- Enter Description
- Host Name 127.0.0.1
- Port Number 8500 (if you are using the built in web server)
- I won't be using the Context Root.
- RDS password
C) To Test the connection, select the server, then click Test Connection.
D) To view files in Flex Builder, select Window > Other Views, RDS, RDS Fileview to select files or RDS Dataview to select data sources.
- Please reference the livedocs for more information on setting up the ColdFusion extensions and RDS in Eclipse to use ColdFusion with Flex: http://download.macromedia.com/pub/documentation/en/flex/2/using_cf_with_flex2.pdf
To Create the application while in Eclipse, select CTRL + N and select the ColdFusion/Flex application wizard (see Figure 1).
Press Next and read through text displayed. Press Next again (see Figure 2).
Since this is a new application we will click Next to specify our settings. (If we wanted to load settings from a previous application, we could just select the "Load ColdFusion/Flex Application Wizard Settings" button instead) (see Figure 3).
Select your RDS Server where your Data Source is located, then select the Data Source being used in your application. Press Next. (ColdFusion uses RDS to get the metadata from your Data Source here) (see Figure 4).
This is where we will define the Page Layout and Design for our first page (see Figure 5).
We will select "Master" for the Master Page Type. This will generate a page that just lists information. Then select the "Edit Master Page" button (see Figure 6).
Select the artists table from the list of tables on the left (see Figure 7).
Select from the artists table the ARTISTID, FIRSTNAME and LASTNAME. Click Save (see Figure 8).
Enter "List of Artists" next to the Name: label to name the page. Select + to Add the next page (see Figure 9).
Name the page Artist Detail and select "Detail" as a Page Type then select the "Edit Detail Page" button (see Figure 10).
Double-click the artists table. This time the wizard automatically ties the artists to the ARTISTID as indicated by the "ID" parameter (see Figure 11).
Next we add the two pages to the Navagation Tree to the left. Select Next (see Figure 12).
Here we can change settings that could affect the Flash Remoting settings; the Web Root URL settings; the Project Name and Web Root Folder, where the Project will be placed; as well as the Wizard Settings. This time we will accept the default settings, so click Finish (see Figure 13).
The wizard makes the ArtExample project, then compiles it! Automatically created is the ColdFusion code (as seen by the ColdFusion components on the left) as well as the Flex code (as seen by the Main.mxml Source code on the right). WOW! That's what I thought when I saw this! (see Figure 14).
Here, we just double-clicked on the List_of_Artists.cfc to look inside at the query (see Figure 15).
Published October 31, 2006 Reads 16,112
Copyright © 2006 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Mary McDonald
Mary McDonald has served the last four years as the Northern Indiana Adobe Users Group Manager (see www.ninmug.org), has attended many conferences including CFUNITED, MAX, MXNorth and TodCon. Out of her 16 years working as a software developer, Mary has worked the last 6 years with ColdFusion, SQL, Flash, and Flex and is a Certified 5.0 ColdFusion Developer. Mary's other interests include music, photography, traveling, dogs, and most recently Tai Chi.
![]() |
CFDJ News Desk 10/30/06 05:26:29 PM EST | |||
ColdFusion Extensions for Flex, included in ColdFusion MX 7.0.2, enable Flex Builder 2.0 developers to automate the more mundane tasks like CRUD (creating, reading, updating and deleting records) by creating ColdFusion components, ActionScript class files, and code to invoke a Web Service. |
||||
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe Reader Sued
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Adobe Flex Developer Earns $100K in New York City
- Adobe LiveCycle Enterprise Suite 2 for Cloud Computing
- Adobe Cans Another 9% of its Workforce
- Adobe Betas Target RIAs and Cloud Computing
- Adobe MAX 2009 Online
- Thinking of Flex in London
- Moyea DVD4Web Converter V2.0 Converts DVD to FLV Fast and Synchronously with Watermarks
- Adobe & Salesforce Cut Cloud Deal
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Is Microsoft as Free as Open Source?
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- Adobe Reader Sued
- The Planet Named “Bronze Sponsor” of Cloud Computing Expo
- Microsoft Expression Web Has Got Game
- Adobe May Cooperate with Apple to Transplant Flash Player to iPhone
- Bruce Chizen Joins Voyager Capital as Venture Partner
- My Top Seven Wishes From Adobe MAX 2009
- Adobe Flex Developer Earns $100K in New York City
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- Constructing an Application with Flash Forms from the Ground Up
- AJAX World RIA Conference & Expo Kicks Off in New York City
- CFEclipse: The Developer's IDE, Eclipse For ColdFusion
- Personal Branding Checklist
- Adobe Flex 2: Advanced DataGrid
- Has the Technology Bounceback Begun?
- Building a Zip Code Proximity Search with ColdFusion
- i-Technology Viewpoint: We Need Not More Frameworks, But Better Programmers
- The Asynchronous CFML Gateway
- Web Services Using ColdFusion and Apache CXF




































