Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / ColdFusion Developer Center /

What's new with extensions in ColdFusion Builder 2

by Raymond Camden

Raymond Camden
  • raymondcamden.com

Content

  • Watch the video
  • Video transcript
  • Where to go from here

Created

3 March 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
ColdFusion Builder 2 2 extensibility

Requirements

Prerequisite knowledge

You should have created your first ColdFusion file CFM file and your first CFC. See the ColdFusion documentation.

 

Additional Requirements

ColdFusion Builder 2 Beta

User level

Beginning

Sample files

  • cfb-extensions.zip

Watch this video tutorial to learn about what's new in using extensions in ColdFusion Builder 2. Raymond Camden presents several extensions he has created in ColdFusion Builder 2 that are powerful and effective coding time-savers. Watch the video tutorial and follow along with the transcript and source files provided in this article.

Note: While this video refers to ColdFusion Builder 2 as "Storm", the code-name for the latest beta, all features described in this tutorial work as described in the most recent release of ColdFusion Builder 2.

Watch the video

cfb2-extensions_thumb
Video: What's new with extensions in ColdFusion Builder 2 (7:02)

Video transcript

If you don't know what extensions are, this is an API within Adobe ColdFusion Builder that allows you to add features to the editor. Typically, adding these types of things within Eclipse requires Java, but within Adobe ColdFusion Builder, you can just use ColdFusion. There's already a great community of free extensions out there. And what's nice is that "Storm" makes this feature better by adding a lot more power to them. Keep in mind that everything I'm showing you here is beta, and things can definitely change between now and the final release date.

So let's start off showing some ways "Storm" provides additional data to your extensions. This additional data can help your extensions run better. I'm going to start off by showing the Mirror extension.

Mirror is an extension I wrote to basically help me write other extensions. All it does is spit back out the XML, that ColdFusion Builder had sent to the extension. It's a good way to debug what the editor is sending along to it.

So, I'm going to right-click and run the Mirror extension. This is the XML packet returned. Now, there's a couple new things here:

  • First is that we actually sent the version number. So what's nice is that I can actually write an extension that supports both ColdFusion Builder 1 and Storm, and going forward, version 3.
  • We also sent the server as well. Now this was something that your extension could kind of sniff via CGI variables, but now it's a bit easier to get at.

Right away we're seeing that "Storm" is basically sharing more data with the Extensions. If your extensions need this type of information, it's a lot easier to get to. Now there's even more stuff you can do. Check out this callbackurl . There's this set of new features where you can request data via the callbackurl. Let me show you an example of that.

I have an extension right here—this is a handler. And what I've done is I've gotten a URL on line 5 of test.cfm , and then I have constructed some basic XML. This XML is going to ask ColdFusion Builder for the data sources see right there on line 9 . All I do is send that XML to the callbackurl . Now I'll get a nice set of XML data back. You see I'm looping over that in lines 18-20. So I will run this extension real quick and you will see I get all the data sources that are defined within my editor. There are a lot more commands you can run. You can get tables, you can get detailed information about a particular table, and so forth.

One of the cooler ones though, and I'll show it running and then explain how it works. I can right-click in my "fancy" CFC file, and run that. You can see that Storm was able to parse this file and tell me all of the variables and all of the functions. If I go in here and just add on line 4, a variable for name2 with a value of "Jacob" and save it and run the extension again, and we'll see that it picked up on the new variable. Again, there's a whole set of commands that can provide a lot of data to your extensions to make them more powerful.

Let's look at another cool feature—out of the box ColdFusion Builder has Code Assist. So if you're using any ColdFusion function like imageNew , imageResize , or whatever, ColdFusion Builder can provide syntax and information about those functions. But what if you had something custom? What you see here on line 1 is event.LinkTo , that is a Model Glue function that's used to create links to events defined within an XML file. Wouldn't it be cool if Storm could actually get my Model Glue application, tell me what events are available, and actually provide that? Check this out. I'm going to go into my function, and ask for the Code Assist, you can see I have a list of events provided that I can pick from. How does this work? In this example, what I did was hard-coded some results back. Normally what this would need to do is look at your Model Glue XML and figure out the events in there. Luckily, ColdFusion makes XML parsing really easy, so it's not a big deal.

On the configuration side, all this Extension did was say, "you know what, when there is this variable called 'event', I can provide some assistance for that." All that it's doing is saying, "run this handler." That goes back to the file I just showed. Normally this would be dynamic. You can imagine all the frameworks out there that can provide support like this. So now the Code Assist is not just saying that "the first argument takes a string…" but actually provides you what the string value could be. I think that's really darn neat!

Now let's look at another example. One of my favorite extensions is the VarScoper. This allows me to right-click a folder, and find out what files are not properly "varscoped" are not properly scoped as variables . As you can see here, here is the report. I see we have 11 unscoped variables. Now the problem with this particular extension is that if I want to start working on it, if I start trying to click back in the editor, I can't. It's because this is a Model dialogue window. It's above everything else. But what's nice is that Storm allows you now to create views.

Now, run the same Extension, but a new version. And you will see, that we have a "view" version of that same extension. So what's nice is that I can now start working on these files, make corrections, and then simply re-run that view version of that same extension to see that I'm updating and fixing problems. You can create views on the fly, you can also create extensions that have the "find views" show up in your window, by going to Window > Show View menu. You can also do toolbars for these as well.

So that's it for now, though, there are more things coming, for example being able to register how a CFM should run, what the start page is, and again, this is still in beta, so we might expect Storm to have a bit more when it gets released. I hope this gets you excited about Storm, and I hope to see you when it is released.

Where to go from here

  • What's new in ColdFusion Builder 2, an article by Ramchandra Kulkarni
  • Getting started with ColdFusion Builder 2, a video from Terry Ryan

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

More Like This

  • What's new in ColdFusion Builder 2.0.1
  • Getting started with RESTful web services in ColdFusion
  • HTML5 WebSockets and ColdFusion -- Part 2: Coding a Hello World sample and extending it into a chat application
  • Getting started with ColdFusion Builder 2

Tutorials & Samples

Tutorials

  • Using Axis2 web services with ColdFusion 10
  • Serving HTML5 videos with ColdFusion 10
  • HTML5 WebSockets and ColdFusion -- Part 2

Samples

ColdFusion Blogs

More
07/06/2012 Adobe ColdFusion 10 on CIO.com
06/22/2012 Elishia Dvorak Joins as ColdFusion Solution Consultant and Product Evangelist
06/19/2012 Outstanding contributions to the ColdFusion 10 and ColdFusion Builder 2.0.1 pre-release
06/18/2012 CF html to pdf service - consume from node.js using rest api

ColdFusion Cookbooks

More
04/01/2012 Send multiple mails with the adresses from database
07/27/2011 Passing a list with with STRING values
05/27/2011 AUTOMATED SANITIZED Resultset with ColdFusion
03/16/2011 Using Metadata To Add Static Variables to ColdFusion Components

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement