BF on CF
Blackstone at MAX
The future of ColdFusion
Dec. 14, 2004 12:00 AM
MAX 2004 easily ranked as one of our best conferences ever. Between product announcements, the sessions, increased attendance, and the New Orleans scene, it set a new standard for us to beat next year.
For the benefit of those of you who did not attend (or who were too hung-over to pay attention), what follows is a recap of some of the MAX 2004 highlights from a very Blackstone perspective. (Note: I stated this at MAX and must do so again here. ColdFusion "Blackstone" is in beta, and is not yet a finished shipping product. As such, the features and technologies discussed in this column are subject to change. In other words, I want no flame-wars if stuff does indeed change.)
Blackstone Powers MAX SMS
Blackstone played a very important role at MAX this year, especially a brand new Blackstone feature, the SMS gateway. I'll be covering Blackstone and SMS in detail in a future column, but here are the basics. SMS stands for Short Messaging Service, the service used to send text messages between phones and devices. The Blackstone SMS gateway allows ColdFusion to send SMS messages and to respond to inbound SMS messages. Blackstone's SMS support was used in two ways at MAX:
MAX session schedules were available electronically, allowing attendees to check their schedules as needed. This year the session scheduling application allowed attendees to sign up for SMS notification by providing their phone number (SMS ID). Fifteen minutes before each session, Blackstone sent SMS reminders to attendees letting them know where they needed to be next.
As MAX coincided with the U.S. presidential elections, Steven Elop introduced an application allowing MAX attendees to vote via SMS. During his keynote segment he provided an SMS ID, and asked attendees to text the letter B, K, or N (for Bush, Kerry, and Nader respectively) to place a vote. Blackstone received those votes via SMS, and then passed the data to a Flex application that charted the stats in real time. (And no, the MAX vote did not match the actual election results; at MAX, Senator John Kerry won by a significant margin). About a third of the 2000 present at the keynote voted via SMS, an impressive display of SMS use and of Blackstone's planned SMS support.
The Blackstone Keynote Segment
Last year at MAX 2003 I announced Blackstone for the very first time, and presented a single slide listing the themes for that release. Since that time we have been very busy turning those themes into actual features and technologies. Here are the stats I presented:
- 15 months in development
- Over 20,000 development hours
- Over 2,000 beta testers
- 7 months of customer testing
- Over 15,000 regression tests
This year, with Blackstone now in public beta, Tim Buntel and I used the opening keynote to demonstrate some of what the ColdFusion engineering team has been working on.
Tim started by incrementally building a Flash-based electronic voting application, using just CFML tags. He started with this code:
<cfform format="flash"
action="process.cfm"
width="554"
height="500">
</cfform>
This code created an empty Flash SWF in the ballot page using the existing <cfform> tag with format="flash". He then added a login form:
<cfformgroup type="panel"
width="300"
height="200">
<cfinput type="text"
name="login_id"
value="" label="Voter Registration ID:"
mask="A99-999-9999"
required="yes">
<cfinput type="password"
name="login_password"
value=""
label="Voter Registration Password:"
required="yes">
<cfinput type="button"
name="login_sbmt"
value="Login and Vote!">
</cfformgroup>
The form is enclosed within a <cfformgroup> which defines the group type as "panel", making the login form appear in a pop-up?type panel. Notice also that the login_id field uses a character mask to enforce correct data entry.
Tim then wrapped this page into a tab navigator control using this code:
<cfformgroup type="tabnavigator"
height="450"
style="backgroundImage:'#imageUrl#';">
...
</cfformgroup>
This placed the login screen on the first page of the tab navigator, and then additional pages were added for president selection (using buttons containing pictures of the candidates), ballot initiatives, and a final confirmation page.
When finished, Tim had created an impressive Flash forms application using only CFML tags, demonstrating how Blackstone will help developers build richer, more engaging data-entry forms, leveraging Flash without needing anything more than Blackstone itself.
Then I took over. Electronic voting critics demand a printed paper trail, and printing Web pages is not trivial. I showed how Microsoft Internet Explorer often cannot print Web pages properly, even simple pages (truncating data, losing data, and worse).
To create a printable version of Tim's ballot I simply wrapped his code using the following tags:
<cfdocument type="flashpaper">
...
</cfdocument>
I then voted using Tim's form, and when I was done, Blackstone generated a perfect printable FlashPaper ballot. I also created one other printable page, taking that same Web page that Internet Explorer could not print, and wrapping it in the following code to generate a perfect printable PDF version of the page:
<cfdocument type="pdf">
<!--- Get page using CFHTTP --->
<cfhttp ...>
</cfdocument>
The next thing we needed was a way to run a report on all votes to determine who won the election. To do this I used the ColdFusion Report Builder, a tool that creates report templates (.cfr files) that are then processed by the ColdFusion <CFREPORT> tag. Using the Report Builder I did the following:
- Ran the report wizard
- Used the SQL Query Builder to select data from three tables, using joins and an aggregate function to calculate totals
- Grouped data by candidate and state
- Selected formatting and presentation options
- Embedded a pie chart showing voter breakdown by candidate
I also pointed out an important distinction between the ColdFusion Report Builder and third-party reporting tools in that the ColdFusion Report Builder is incredibly ColdFusion aware:
- CFML expressions (using CFML functions, variables, and more) could be embedded in reports
- Data need not be embedded in a report, and any query could be passed to the <CFREPORT> tag at runtime
Like <CFDOCUMENT>, <CFREPORT> generated both PDF and FlashPaper output.
The last demo in the Blackstone segment showed how a ColdFusion-powered SMS application could be built. Tim fired up the SMS server and gateway (included with Blackstone) and ran the SMS client (a phone emulator). He then wrote a few lines of code in a CFC method allowing him to send a request from the SMS client to obtain voting tallies.
We wrapped up by telling the attendees that every one of them had a copy of Blackstone Beta 2 in their bags.
Meet the ColdFusion Team BOF
BOF stands for "Birds of a Feather," informal chats or panel discussions. This year I once again moderated the "Meet the ColdFusion Team" BOF, and a standing-room only crowd used the opportunity to interrogate the ColdFusion engineering, QA, business, and marketing teams. Here are some of the questions and answers:
- What will the Blackstone upgrade cost? And how will features be packaged and editioned? Sorry, we can't discuss that yet.
- Will subscription customers get the Blackstone update? Yes!
- How can CFML code be executed asynchronously? Via the new CFML gateway in Blackstone.
- Will ColdFusion support null? JavaCast() in Blackstone makes it possible to pass null to Java calls, but support for null throughout CFML is on the wish list, but not implemented at this time.
- What application events are supported by the new application event model? OnApplicationStart, OnApplicationEnd, OnSessionStart, OnSessionEnd, OnRequestStart, OnRequestEnd, OnRequest OnError.
- Will the new spell checking in Verity support custom dictionaries? That is not necessary, Verity (in Blackstone) performs heuristic matching against text in indexed data, and does not actually use a dictionary at all.
- Can the Blackstone beta coexist with CF5 or CFMX? Yes, absolutely, we designed Blackstone so that it can live alongside current versions, so there is no reason not to try the beta.
- What must we do to use the Blackstone beta CD provided to all MAX attendees? Install it, agree to the terms, and provide us with feedback.
There were lots more questions too, but unfortunately I did not take notes.
Summary
MAX 2004 was a blast, and if you did not attend, don't make that same mistake next year. Blackstone played a prominent role in this year's conference, both as a product and as the power behind the scenes. I can best sum it up by sharing the following statement extracted from an e-mail I received from a very happy (and tired) attendee: "I no longer have any doubt about the future of ColdFusion, and of Macromedia's commitment to the product. My only complaint is that I want Blackstone now!"
About Ben FortaBen Forta is Adobe's Senior Technical Evangelist. In that capacity he spends a considerable amount of time talking and writing about Adobe products (with an emphasis on ColdFusion and Flex), and providing feedback to help shape the future direction of the products. By the way, if you are not yet a ColdFusion user, you should be. It is an incredible product, and is truly deserving of all the praise it has been receiving. In a prior life he was a ColdFusion customer (he wrote one of the first large high visibility web sites using the product) and was so impressed he ended up working for the company that created it (Allaire). Ben is also the author of books on ColdFusion, SQL, Windows 2000, JSP, WAP, Regular Expressions, and more. Before joining Adobe (well, Allaire actually, and then Macromedia and Allaire merged, and then Adobe bought Macromedia) he helped found a company called Car.com which provides automotive services (buy a car, sell a car, etc) over the Web. Car.com (including Stoneage) is one of the largest automotive web sites out there, was written entirely in ColdFusion, and is now owned by Auto-By-Tel.