Saturday, May 17, 2008    
Home My Books Blog ColdFusion About Me Back    

Calendar
<< Jan 2008 >>
S M T W T F S
    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    

Search

Categories
 • Adobe (61) [RSS]
 • AdobeMAX06 (45) [RSS]
 • AdobeMAX07 (59) [RSS]
 • AdobeMAX08 (6) [RSS]
 • AIR (96) [RSS]
 • Appearances (105) [RSS]
 • Books (66) [RSS]
 • CFEclipse (14) [RSS]
 • ColdFusion (1081) [RSS]
 • Flash (91) [RSS]
 • Flex (319) [RSS]
 • Jobs (81) [RSS]
 • JRun (12) [RSS]
 • Labs (27) [RSS]
 • LiveCycle (12) [RSS]
 • MAX (141) [RSS]
 • Regular Expressions (12) [RSS]
 • SQL (36) [RSS]
 • Stuff (492) [RSS]
 • Tips (CF Studio) (80) [RSS]
 • Tips (CF) (795) [RSS]
 • Tips (Dreamweaver) (91) [RSS]
 • Tips (Flex Builder) (2) [RSS]
 • Using CF (131) [RSS]
 • Wireless (96) [RSS]

Other BLOGs
 • Ray Camden
 • Tim Buntel
 • Sean Corfield
 • John Dowdell
 • Steven Erat
 • Brandon Purcell
 • Charlie Arehart
 • Full As A Goog

RSS Feeds
 • Feed
 • Subscribe

Join my mailing list and find out about new books and other topics of interest.

Thoughts, ideas, tips, musings, and pontifications (not necessarily in that order) by Ben Forta ...
NOTE: This is my personal blog, and the opinions and statements voiced here are my own.

Viewing By Month : January 2008 / Main
January 30, 2008

Seeking ColdFusion 8 Case Studies

ColdFusion Product Marketing Manager Kristen Schofield is looking for ColdFusion 8 customers with cool stories to tell for future case studies.

January 29, 2008

Have Us Visit Your School Armed With Flex, AIR, And Pizza

You probably know that Flex Builder is free for students. But did you know that we could drop by to present Flex and AIR? If you organize a school event with a minimum of 200 students, we'll come and present Flex and Adobe AIR at your school, and pay for the pizza and drinks. See the flex.org - Flex for Students and Faculty page for details.


Case-Study: The Alpha School System And ColdFusion 8

The Alpha School System (TASS) is an Australian browser-based administration and portal application for K-12 schools. It includes modules for enrollment; student, parent, and teacher records; timetables; fundraising information, and financial accounts. It also offers online community portals for students, parents, and teachers, as well as web-based student grading tools. The application was built using ColdFusion 8 and Flash CS3, and uses ColdFusion 8 PDF generation and integration features extensively. A case-study has been posted on Adobe.com.


Summarizing Grouped Data With Flex 3 AdvancedDataGrid

Last week I showed how to use the new Flex 3 AdvancedDataGrid to group data (that example used ColdFusion data returned as a query, although the example could also be applied to other back-ends, too). Grouping creates a tree within the data grid, so that groups of data may be collapsed and expanded as needed.

Now let's take the example a step further, this time adding summary data. For example, suppose you were displaying sales orders, grouped by customer and then by order number. When collapsed the tree would list all customers, but no details. When a customer was expanded the tree would list all orders for that customer, but no details. When a specific order was expanded, then the details for that order would be displayed. That's how basic grouping works.

But what if you wanted to show summary data for groups? For example, customer rows could show total of all orders for that customer, regardless of how many orders there were, and whether or not the customer group is expanded or collapsed. And then order rows could show order totals. You get the idea. And yes, this functionality is built in to the Flex 3 AdvancedDataGrid.

As before, this is a ColdFusion powered example using the default database tables that come with ColdFusion 8. Here is the simple CFC method which just returns several columns from three tables:

<cfcomponent>

   <cffunction name="getOrders" access="remote" returntype="query">
      <cfset var result="">

      <cfquery datasource="cfartgallery" name="result">
      SELECT orders.orderid,
            artname, orderitems.price,
            customerlastname || ', ' || customerfirstname AS customer
      FROM orders, orderitems, art
      WHERE orders.orderid=orderitems.orderid
         AND orderitems.artid=art.artid
      ORDER BY customer, orders.orderid
      </cfquery>

      <cfreturn result>
   </cffunction>

</cfcomponent>

I saved this component as art.cfc in a folder named test beneath the web root. You can save it wherever you like, but of course you'll need to adjust the path in the MXML accordingly. (If you tried the previous example, you could just add this getOrders() method to the existing CFC.

Now for the MXML:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
         layout="vertical" width="100%" height="100%"
         creationComplete="initApp()">


   <mx:Script>
      <![CDATA[
         // Init
         public function initApp():void
         {
            // Get data
            svc.getOrders();
         }
      ]]>
   </mx:Script>


   <!-- Define CFC -->
   <mx:RemoteObject id="svc"
            destination="ColdFusion"
            source="test.Art"
            result="gc.refresh()" />


   <!-- Button bar -->
   <mx:ApplicationControlBar width="100%">
      <!-- Expand all rows in data grid -->
      <mx:Button label="Expand All"
               click="adg.expandAll()" />

      <!-- Collapse all rows in data grid -->
      <mx:Button label="Collapse All"
               click="adg.collapseAll()" />

   </mx:ApplicationControlBar>

   <!-- The grid -->
   <mx:AdvancedDataGrid id="adg"
         width="100%" height="100%">


      <!-- Define grouping in dataProvider -->
      <mx:dataProvider>
         <!-- Convert flat data to group -->
         <mx:GroupingCollection id="gc"
               source="{svc.getOrders.lastResult}">

            <mx:Grouping>
               <!-- First group by customer -->
               <mx:GroupingField name="CUSTOMER">
                  <!-- Calculate total per customer -->
                  <mx:SummaryRow summaryPlacement="group">
                     <mx:fields>
                        <mx:SummaryField dataField="PRICE"
                                    operation="SUM"
                                    label="Total"/>

                     </mx:fields>
                  </mx:SummaryRow>
               </mx:GroupingField>
               <!-- Then group by orderid -->
               <mx:GroupingField name="ORDERID">
                  <!-- Calculate total per orderid -->
                  <mx:SummaryRow summaryPlacement="group">
                     <mx:fields>
                        <mx:SummaryField dataField="PRICE"
                                    operation="SUM"
                                    label="Total"/>

                     </mx:fields>
                  </mx:SummaryRow>
               </mx:GroupingField>
            </mx:Grouping>
         </mx:GroupingCollection>
      </mx:dataProvider>

      <!-- The grid columns-->
      <mx:columns>
         <!-- Empty colume for tree -->
         <mx:AdvancedDataGridColumn />
         <!-- Query columns -->
         <mx:AdvancedDataGridColumn dataField="CUSTOMER"
            headerText="Customer" />

         <mx:AdvancedDataGridColumn dataField="ORDERID"
            headerText="Order"/>

         <mx:AdvancedDataGridColumn dataField="ARTNAME"
            headerText="Item" />

         <mx:AdvancedDataGridColumn dataField="PRICE"
            headerText="Price" textAlign="right" />

         <!-- Column for calculated totals -->
         <mx:AdvancedDataGridColumn dataField="Total"
            headerText="Total" textAlign="right" />

      </mx:columns>

   </mx:AdvancedDataGrid>

</mx:Application>

I am not going to explain the basics of invoking the CFC method via <mx:RemoteObject>, populating the GroupingCollection, and refreshing the <mx:AdvancedDataGrid>. That was covered in the previous post. Rather, let's look at what has changed.

First of all, to make it easier to expand and collapse the tree within the <mx:AdvancedDataGrid>, I added a <mx:ApplicationControlBar> containing two buttons, one to expand all rows and one to collapse all rows.

As before, <mx:GroupingField> is used to define the grouping levels. In the previous example a single level of grouping was used, here two are used (to group by customer, and then by order id within customer). In the previous example <mx:GroupingField> had no child tags, because simple grouping was used. Here, <mx:SummaryRow> has been added to each <mx:GroupingField> so as to summarize data by those groups. <mx:SummaryRow> can display summary data at the group level, as well as at the first or last member within the group, as specified by the "summaryPlacement" attribute. A <mx:SummaryRow> contains one or more fields to be summarized. Here a single <mx:SummaryField> is used for each <mx:SummaryRow> to "SUM" the total of that group, putting the result in a column named "Total". The "operation" attribute specifies the summary to be performed, and AVG, COUNT, MAX, MIN, and SUM are all built-in and ready for use. It is also possible to perform your own calculations, specifying an ActionScript function to be called instead of one of the built-in operations.

And as before, <mx:columns> is used to list the columns within the <mx:AdvancedDataGrid>. But here, two non-database columns have been added. An empty column has been inserted at the front of the list. This forces <mx:AdvancedDataGrid> to display the tree in its own column, rather than in the actual data column (and this technique can be used whether or not summary data is being displayed). In addition, a row named "Total" has been added to the end of the column list to display the summary totals. The <mx:SummaryField> tags point to the "Total" as the destination for calculated summary data. This is optional, the "Total" column could have been omitted (both from the <mx:columns> list and from the <mx:SummaryField> tags) in which case the summary values would have been displayed within the field being summarized (in this example the "PRICE" column).

As you can see, adding summary data to an <mx:AdvancedDataGrid> is not at all difficult once grouping has been implemented.

One last note, the example data used here is not ideal, as each customer has a single order, and only one order (for customer "White, Sue") has more than one item. You may want to add some data to the example tables to better demonstrate how summary data works. Or just use your own data.


The Digital Media Dude Interview Posted

The Digital Media Dude (aka Marcelo Lewin) interviewed me for his Meet The Experts Podcast series. That interview is now online. Thanks, Marcelo!

January 28, 2008

DZone On Flex 3 / AIR Pre-Release Presentation

DZone has posted a write-up on my presentation in Raleigh last week. Thanks, guys!

January 25, 2008

ColdFusion Positions In CA, NC, And MA

6 ColdFusion positions this week:
  • Amcom (San Ramon Valley, CA) is looking for a senior ColdFusion developer. Requirements include 8+ years of software development experience, expert with ColdFusion 7, and familiarity with frameworks and design patterns. Flex familiarity preferred. Details posted online by Tariq Ahmed.
  • Carolinas HealthCare System (Charlotte, NC) is looking for 4 ColdFusion developers for 4-6 month contracts, and the potential to convert to full-time positions. Requirements include 4+ years of experience with ColdFusion, proficiency with ColdFusion 6.1 or later, SQL Server experience, and strong JavaScript and CSS skills. Experience with Ajax, Flex, and Spry is a plus. Please contact one of the following agencies: Nathan Zientek at Ettain Group 704-731-8035, Michael Norton at Insight Global 704-357-3177, C.J. Comer at Pelican Technology Partners 704-543-1590, Paige Chappell at Quick Solutions 704-329-7277, Ryan West at Revolution Technologies 910-332-4126, Chris Seitz at Sherpa 704-374-0001, Jonathan Tucker at Tek Systems 704-357-4628.
  • Vertex Pharmaceuticals (Cambridge, MA) is looking for a ColdFusion development. Requirements include a bachelors degree in computer science or a related field, 5+ years of ColdFusion experience, and strong JavaScript, CSS, AJAX and XML skills. Details posted online.

January 24, 2008

Flex 3 / AIR Pre-Launch Tour Slide Deck Posted

Many of you have been asking for the slide deck we've been showing on the Flex 3 / AIR pre-launch tour. A PDF version is now online.


Raleigh Was Amazing, Next Up Is Nashville

I am in Memphis, waiting for my connecting flight to Nashville for tonight's Flex 3 / AIR Pre-release presentation.

Last night's presentation in Raleigh was incredible! Almost 120 attendees packed the room (many had to stand or sit on the floor), and the event run for close to 3 hours! A lively crowd, great questions and feedback, excitement and enthusiasm - the one was lots of fun.

There are still lots more presentations and lots more venues, so be sure to check the complete location list.

January 23, 2008

Case Study: voeveo Using ColdFusion 8

A case-study on how voeveo is using ColdFusion 8 has been posted to the Adobe site. This one is worth a read.

January 22, 2008

Checking In From Atlanta

Last night's Flex / AIR Pre-Release Tour presentation to the Adobe Developers of Greater Orlando group went really well. And tonight we do it again in Atlanta (well, I am in Atlanta, but others on the team are presenting in Zürich, Paris, Philadelphia, Phoenix, Portland, and San Jose - all today). Right now I am parked in one of my many regional offices (aka Starbucks). The full tour location list is online.


WebManiacs 2008 Registration Open

Building on the success of last year's FlexManiacs, the new WebManiacs is 3 events in one - CFManiacs, FlexManiacs, and AIRManiacs. The WebManiacs 2008 conference schedule has been finalized, and registration is now open. Early bird pricing ends January 31st, 2008. With over 70 speakers and 130 distinct topics (including several hands-on sessions), WebManiacs looks to have the most comprehensive coverage of ColdFusion, Flex, and AIR, at the lowest price.


ColdFusion Verity Language Pack Available

The ColdFusion Verity language packs and standalone installer are now available for download. Verity Search Packs enable ColdFusion (8, 7, and MX) applications to index and search European and Asian languages. The standalone installer allows Verity to be installed on a machine separate from the server running ColdFusion.

January 21, 2008

InsideRIA Now Online

InsideRIA.com is an online community dedicated to all things RIA. InsideRIA.com is developed by O'Reilly and sponsored by Adobe Systems Incorporated.


Heading Down To Orlando

I am on my way down to Orlando for tonight's Flex / AIR Pre-Release Tour presentation to the Adobe Developers of Greater Orlando group. The full tour location list is online.


Grouping Data With Flex 3 AdvancedDataGrid

The enhancements to the data grids in Flex 3 have been eagerly anticipated, and are greatly appreciated - especially by us ColdFusion developers who spend so much time creating highly data-centric applications. I plan on providing examples of how to use the new data grids with ColdFusion, and here is the first.

AdvancedDataGrid supports group expanding and collapsing within grids, think of it as a grid with an embedded tree control. Multiple levels of grouping are supported (each level becomes a tree branch), but this example uses a single level for simplicity's sake.

The example uses the default database tables that come with ColdFusion 8, and here is the simple CFC method which just returns several columns from two tables:

<cfcomponent>

   <cffunction name="getArtByMedia" access="remote" returntype="query">
      <cfset var result="">

      <cfquery datasource="cfartgallery" name="result">
      SELECT mediatype, artname, description, price
      FROM media, art
      WHERE media.mediaid=art.mediaid
      ORDER BY mediatype, artname
      </cfquery>

      <cfreturn result>
   </cffunction>

</cfcomponent>

I saved this component as art.cfc in a folder named test beneath the web root. You can save it wherever you like, but of course you'll need to adjust the path in the MXML accordingly. Here is the MXML:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
         layout="vertical" width="100%" height="100%"
         creationComplete="initApp()">


   <mx:Script>
      <![CDATA[
         // Init
         public function initApp():void
         {
            // Get data
            svc.getArtByMedia();
         }
      ]]>
   </mx:Script>


   <!-- Define CFC -->
   <mx:RemoteObject id="svc"
            destination="ColdFusion" source="test.Art"
            result="gc.refresh()" />


   <!-- The grid -->
   <mx:AdvancedDataGrid width="100%" height="100%">

      <!-- Define grouping in dataProvider -->
      <mx:dataProvider>
         <mx:GroupingCollection id="gc" source="{svc.getArtByMedia.lastResult}">
            <mx:Grouping>
               <mx:GroupingField name="MEDIATYPE" />
            </mx:Grouping>
         </mx:GroupingCollection>
      </mx:dataProvider>

      <!-- The grid columns -->
      <mx:columns>
         <mx:AdvancedDataGridColumn dataField="MEDIATYPE"
            headerText="Media"/>

         <mx:AdvancedDataGridColumn dataField="ARTNAME"
            headerText="Name" />

         <mx:AdvancedDataGridColumn dataField="DESCRIPTION"
            headerText="Description" />

         <mx:AdvancedDataGridColumn dataField="PRICE"
            headerText="Price" textAlign="right" />

      </mx:columns>

   </mx:AdvancedDataGrid>

</mx:Application>

<mx:RemoteObject> points to the CFC. <mx:AdvancedDataGrid> defines the grid and columns, in much the same way as regular <mx:DataGrid> does. But unlike <mx:DataGrid>, here the dataProvider is passed as a child tag so as to be able to specify additional information. <mx:AdvancedDataGrid> can accept hierarchical data ready to be used for grouping, as well as flat data, in which case a GroupingCollection must be used so that Flex can regroup the data hierarchically. As ColdFusion queries are flat (non-hierarchical), a GroupingCollection is defined using <mx:GroupingCollection>. The GroupingCollection accepts one or more fields to be grouped on, and here a single field is specified using <mx:GroupingField>.

When using GroupingCollections like this, the data grid itself must explicitly be refreshed so that the changes are reflected in the displayed grid. According to the documentation, this example would do this as <mx:AdvancedDataGrid ... initialize="gc.refresh()">, but this does not seem to work. Instead, the refresh() method is specified in <mx:RemoteObject> so that it is called when data is received. (Thanks to Mike Nimer for figuring this one out for me!).

And there you have it, a really simple data grid with expand/collapse grouping.

January 18, 2008

ColdFusion And Flex Positions In FL, OR, CO, AL, And MI

5 ColdFusion and Flex positions this week:
  • ADP Dealer Service (FT Lauderdale, FL) is looking for a ColdFusion developer. Requirements include 7+ years of ColdFusion, SQL Server, HTML, and JavaScript. Framework experience is also required, Mach-II is preferred. Contact Rubi Herlambang.
  • Mentor Graphics (Wilsonville, OR) is looking for a ColdFusion / Flex developer. Requirements include a bachelors degree in a related field, 4+ years experience in ColdFusion application development (including use of Object Oriented design practices), and 1+ year producing web sites with advanced technologies including Flex and ActionScript. Details posted online.
  • Melco (Denver, CO) is looking for a Flex developer. Requirements include 3+ years web / interactive development experience, ActionScript expertise, Flash Remote experience, and OOP proficiency. Contact Jay Lane at recruiter Tri-Worth Solutions.
  • Avocent (Huntsville, AL) is looking for a Flex developer. Requirements include 3+ years web and Java development, experience with graphics manipulation and rendering, and knowledge of MVC. Experience with Flash/Flex a plus. Details posted online.
  • Michigan State University, The Eli Broad College of Business (East Lansing, MI) is looking for a ColdFusion developer. Requirements include a bachelors degree, and 3+ years of experience with ColdFusion, Microsoft SQL, and JavaScript. Details posted online (search for job posting 1980).


Reminder: cf.Objective() Early Bird Pricing Closes On Sunday

cf.Objective() has firmly established itself as the only ColdFusion conference that focuses solely on Enterprise-level and high-end ColdFusion development. cf.Objective() is bargain priced at $629 for the full 4-day event. But, if you register by Sunday January 20th, you can still receive the Early Bird price of $499. So, if you have not yet done so, register now!

January 17, 2008

Using New Flex 3 Features With ColdFusion 8

Flex 3 introduces some important new controls to Flex. Some of these, like the Advanced Data Grid, will be of real interest to us ColdFusion developers. But, if you run the project wizard in Flex Builder 3 Beta 3, and select ColdFusion as the server technology and check the option to use Flash Remoting, you may find that Flex 3 controls are not available to you. Why? Because when the wizard sets up the project, it may point to an older version of the SDK, the one that ColdFusion is aware of.

The solution? Either of these two options should work:

  • Run the wizard, select ColdFusion as the server technology, but don't check the option to use remote object access service. Then, open the project properties dialog, go to the Flex Compiler page, and add compiler flag: -services "C:\ColdFusion8\wwwroot\WEB-INF\flex\services-config.xml" (obviously changing the path as appropriate). This flag is what gets set by the wizard when you opt to use Flash Remoting.
  • Run the wizard as you usually do. Then, open the project properties dialog, go to the Flex Compiler page, and change the Flex SDK version to use the Flex 3 SDK. (Although, I think the prior option is the safer one).

January 16, 2008

Duane Nickull's Web 2.0 Design Patterns Presentation

Fellow evangelist Duane Nickull has posted the slides from his Web 2.0 Design Patterns, Models and Analysis presentation:


InfoQ On Flex Frameworks

InfoQ has published a roundup of Flex framework projects.


Yahoo! Blog Remix Powered By AIR

Blog Remix is an experimental desktop application from Yahoo!'s Media Innovation Group that lets you remix your favorite MP3 blogs. And it is built in AIR.

January 15, 2008

Blog Subscription Enabled

Several people have recently asked me about subscribing to this blog. So, I've added support for subscriptions via FeedBurner. In addition, I've changed the feed URL, so you may want to update your readers (although the old feed URL will still work).


Boulevart Talks About The Google Analytics AIR Application

Belgian multimedia company Boulevart discusses the Google Analytics AIR Application in this video.

January 14, 2008

Two More ColdFusion Surveys

As part of our "Centaur" planning, please fill in the ColdFusion 8 Features Used survey and the ColdFusion Platform And Vendors survey. And the more respondents the better, so forward these URLs to every CF developer you know.

More Entries

  © Copyright 1997-2008 Ben Forta, All Rights Reserved