Welcome!

You will be redirected in 30 seconds or close now.

ColdFusion Authors: Yakov Fain, Jeremy Geelan, Maureen O'Gara, Nancy Y. Nee, Tad Anderson

Related Topics: ColdFusion, Adobe Flex

ColdFusion: Article

ColdFusion To Flex Super Wizard

Building Cool Applications

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:

  1. Windows XP Home Edition (the operating system I am using)
  2. Java2Runtime Environment Std Edition 1.4.2.12 (needed to run Eclipse)
  3. Eclipse SDK 32win32 (the tool we will be using to develop in)
  4. 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.

  5. 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.

  6. 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.
  1. 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
Once everything is installed, we are ready to use the CFFlex Wizard to create an application. This application demonstrates how you can use the CFFlex Wizard and Flex Builder 2.0 to "automatically" create a Master, Detail, and Master/Detail page to create, read, update, and delete artist information along with their specific pieces of art. As you will see, the CFFlex Wizard will generate Flex, Flash and ColdFusion pages for you. Read on and be amazed!

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).


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.

Comments (1)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


IoT & Smart Cities Stories
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
Bill Schmarzo, Tech Chair of "Big Data | Analytics" of upcoming CloudEXPO | DXWorldEXPO New York (November 12-13, 2018, New York City) today announced the outline and schedule of the track. "The track has been designed in experience/degree order," said Schmarzo. "So, that folks who attend the entire track can leave the conference with some of the skills necessary to get their work done when they get back to their offices. It actually ties back to some work that I'm doing at the University of San...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
Chris Matthieu is the President & CEO of Computes, inc. He brings 30 years of experience in development and launches of disruptive technologies to create new market opportunities as well as enhance enterprise product portfolios with emerging technologies. His most recent venture was Octoblu, a cross-protocol Internet of Things (IoT) mesh network platform, acquired by Citrix. Prior to co-founding Octoblu, Chris was founder of Nodester, an open-source Node.JS PaaS which was acquired by AppFog and ...
The deluge of IoT sensor data collected from connected devices and the powerful AI required to make that data actionable are giving rise to a hybrid ecosystem in which cloud, on-prem and edge processes become interweaved. Attendees will learn how emerging composable infrastructure solutions deliver the adaptive architecture needed to manage this new data reality. Machine learning algorithms can better anticipate data storms and automate resources to support surges, including fully scalable GPU-c...
Cloud-enabled transformation has evolved from cost saving measure to business innovation strategy -- one that combines the cloud with cognitive capabilities to drive market disruption. Learn how you can achieve the insight and agility you need to gain a competitive advantage. Industry-acclaimed CTO and cloud expert, Shankar Kalyana presents. Only the most exceptional IBMers are appointed with the rare distinction of IBM Fellow, the highest technical honor in the company. Shankar has also receive...
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...