ColdFusion Builder for Dreamweaver Shops

I was asked on Facebook today: “Hi, is this builder applicable if
you are a DreamWeaver shop? Looks interesting. I see it uses eclipse.
I’m trying to see the value in looking at it.”

This is a great question, and like most the answer is: it depends.

If you are a Dreamweaver shop because Dreamweaver has
traditionally included ColdFusion support, and is a more capable solution
then other actively developed ColdFusion editor choices to date, then
ColdFusion Builder is definitely for you. We definitely go beyond what
Dreamweaver can offer in terms of ColdFusion support. If Dreamweaver is
simply “good enough” for your ColdFusion development, but you don’t
leverage all of the HTML GUI goodness that Dreamweaver has to offer,
then ColdFusion Builder is definitely for you.

If you are doing complex DOM manipulation in your front-ends
and really need to be able to drill into those manipulations or if you
use Design view a great deal in your development process then
Dreamweaver may still be the product for you.

Here’s a little feature comparison chart to help you out.

ColdFusion Builder ID Comparisons

Update:  The origianal version of this chart failed to recognize that Homesite had FTP support.  Sorry about that. I thought I had fixed that.  Also Homesite had a way of being extended via VTML. Dreamweaver is extensible via JavaScript.  However neither are/were extensible via CFML.

Apptacular ColdFusion Builder Extension – Working with Flash Catalyst and Flash Builder

For my next Extension trick, I want to show how to use Apptacular to jump start your Flex development. Apptacular by default creates remote services that are compatible with Flex. Flash Builder 4 has a new tool called “Data/Services” that makes working with ColdFusion remote services simplistic. Too simplistic. “Oh crap, what happens if my boss finds out I have all of this free time now” simplistic.

This demo will take you from a Flash Catalyst driven front-end to a Flex application back-ended by Apptacular created ColdFusion services.

http://vimeo.com/moogaloop.swf?clip_id=8227342&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1

Apptacular ColdFusion Builder Extension – Flash Builder and Flash Catalyst from Terry Ryan on Vimeo.

Apptacular ColdFusion Builder Extension – Aesthetics

My last post and video dealt with how Apptacular could scaffold together your application. This post and video will talk about making that application look more like you want.

First off, everything has a display name. That display name is altered in the data model tools of Apptacular or in the XML directly. Then you might want to alter what column gets used when your table shows up in another table’s interface because of a relationship. This is called a foreign key label. This is also editable in the configuration. After you get all of your labels done right, you want to order all of your columns correctly. You guessed it; it’s done in the configuration tools. Finally, you might want to make up columns to use in your various labels. Apptacular has the concept of “virtual columns”, which will allow you create custom getters for things like concatenated or formatted columns.

Once you get past interface issues, you may want to change application structure, move code around, or fine tune choices. This is done through the Application configuration. You can also detect obsolete code and have it removed automatically. Finally, if you are so inclined, Apptacular includes a login piece that can add an easy authentication form to your application.

So still a work in progress, hopefully this creates a good starting place for applications. My next post will talk about integrating this back-end into a Flex front-end.

http://vimeo.com/moogaloop.swf?clip_id=8175252&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1

Apptacular ColdFusion Builder Extension – Aesthetics from Terry Ryan on Vimeo.

Apptacular ColdFusion Builder Extension – Scaffolding

Scaffolding against a database has been done to death. But I wanted to take on some of the harder challenges. How do you act towards relationships? How do you handle one to many, many to one, and many to many relationships? How do you detect these relationships? This is especially important with the ORM features in ColdFusion 9. If we can detect these, and model our CFCs correctly we can save a lot of time by generating these CFCs with relationships included. Then if we scaffold on views that take these relationships into account, we can really turbo charge development.

I also wanted to take on a few key issues like paging and performance. Basically, I wanted paging to be easy. That meant wiring it up from the get go. I wanted performance to be usable. That meant writing common needs like column counts automatically in HQL for optimal performance.

So that’s some of what I’ve set out to do in Apptacular. I have a video below that shows off these features:

  • Scaffolding
  • One-to-many relationships
  • Many-to-one relationships
  • Many-to-many relationships
  • Paging
  • Counts

http://vimeo.com/moogaloop.swf?clip_id=8123992&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1

ColdFusion Builder – Apptacular – Scaffolding from Terry Ryan on Vimeo.

Apptacular ColdFusion Builder Extension

I’ve been working on a code generation ColdFusion Builder Extension for awhile –

Hey wait, where are you going? Okay, I know, code generation is so passé, but stick with me here I have some cool stuff for you.

So. Code generation. Okay, I have a ColdFusion Builder Extension named Apptacular. It’s an application scaffolder that builds an application from a database. Pretty standard stuff. But I wanted to do something cool with it.

I started with how I handle overriding. Every scaffolder can create a default application, but where they start to fall down is when you want to override the defaults. A good example of this is form labels. The database field is “first_name” but you want the form label for that control to say “First Name.” Different scaffolders solve this in different ways. I went with the tried and true XML configuration file route. My previous experience with this type of development tells me that people NEVER edit the XML. It’s a pain. Okay, fair enough, but I’m using ColdFusion and ColdFusion Builder. I can create interfaces that allow you to edit your configs without looking at the XML. I’ve done that.

This feature allows me to do all sort of tweaks to the application. I can change label, sort order, and foreign key label fields. I can also change aspects of the application like where the CFCs are stored, how the services are created, etc. It uses XML, but you don’t. (Unless you want to.)

The next thing I tried to do is make the interface for the entire set of configuration tools look a little better than the default. I used the ColdFusion Builder Extension APIs ability to display a URL as an interface to handle this. So I sprinkled in a little HTML, CSS and images to make a pleasing, branded, interface for my extension.

Then I put a lot of work into data modeling correctly. I can detect relationships and build the proper ColdFusion ORM CFCs for it. I can get commonly used items like number of related items.

Finally, there are a lot of little features like virtual columns, authentication, and Flex services that I’ve added. I should have a few videos of this in action for you over the next week.

The code is not quite ready to share yet, but I wanted to get it out there for all to see, and if need be, comment.

Instant Code Review ColdFusion Builder Extension

Continuing on my quest to find cool and unusual ways of extending ColdFusion Builder, I stumbled onto this Rube Goldberg contraption of an extension. It came about due to severe jet lag in Sydney and a need to do something cool for cf.Objective ANZ.

So imagine you’re a freelancer who is no longer in an office, able to get instant feedback on a piece of code. I know the feeling. Wouldn’t it be cool if you could do that through the IDE? Well this extension will do that. Highlight a piece of code in your editor window, right click, and choose Instant Code review. A list of your currently online buddies will pop up, and you choose them and write out a comment. Your code and comment will be sent via IM. Your IM buddy can respond to it. That response will get written as a comment in your source code above the selected code. And just because I can, if you are on a Mac, the extension uses text-to-speech to creepily tell you “Your instant code review is done.”

So what’s going on here? Behind the scenes I have an IM event gateway running. You remember event gateways; we added them in ColdFusion 7. They allow you to have ColdFusion be an IM or SMS client among other things. I use that gateway to take code from the IDE and pass it along to your IM gateway. The gateway can also listen for IMs. When it receives the response from your friend, it uses a locally written queue file to match up the response with the file that generated the code review request.

Don’t take my word for it, here’s a video demo.

http://vimeo.com/moogaloop.swf?clip_id=7706690&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1

ColdFusion Builder – Instant Code Review from Terry Ryan on Vimeo.

Now I don’t see this as a completely useful extension. It’s cool, but it might just be a bit flashy. But I wanted to highlight that despite the fact that we added a lot of features to ColdFusion 9, it still has all of the coolness of previous versions.    

Like what you see? Then check it out at RIAForge: Instant Code Review ColdFusion Builder Extension.

Thanks to Raymond Camden who endured testing this application with me, and spammed his buddy list because of it.

Google Language Tools Extension for ColdFusion Builder

I have become obsessed with ColdFusion Builder Extensions. I am convinced that no other single feature of the IDE is as valuable as this. (And I love the rest of the features too, so I’m saying a lot here.) The ability to leverage ColdFusion know-how and features into tooling is awesome. A lot of the extensions we’ve shown off have been about code generation. I think that’s important, as it is big part of the Builder story. We make you more productive, but you make yourself even more productive. Of late though, I’ve been focused on extensions that do more than just generate code, they use ColdFusion capabilities in non-obvious ways. I’ll be posting them over the next few weeks.

Here’s the first:

I created a language translator that allows you to translate content in the editor window to other languages. As a first pass, it only does English, French, German, and Italian, but as I experiment I will expand them. To use:

  • In the Editor window, highlight the content you want to translate
  • Right-click it to bring up the context menu
  • Choose Google Language Tools -> Translate

That should drop the translated content back into your editor, below the original content.

To build this I used a few different pieces. In the last Public Beta drop of ColdFusion we added the ability to grab highlighted content from the editor window in a ColdFusion Builder extension. I take that highlighted content and pass it to the server. On the server I pass it to a CFC that I wrote that consumes the Google Language API. It’s a JSON-powered webservice, so I used ColdFusion support for JSON to simply get at this data. From there, I can use a feature of ColdFusion Builder called “callbacks” to write the translated code back to the editor window. Specifically, I used the “inserttext” callback, which allows me to insert text at a specific line of code. I can use this to carefully place the translated text.

Possible use cases:

  • Translating HTML content to multiple languages
  • Translating code comments to your native language
  • Creating language packs for your applications

Sound cool? Check it out on Riaforge: Google Language Tools Extension.

CFHTTP equivalent in Java. Really, Java, Really?

I was talking to my boss Kevin, and we were talking about how concise ColdFusion makes certain rote tasks, and he mentioned trying to duplicate CFHTTP in Java. He talked about how it went on for line after line, after line. I figured he was talking about something in the order of magnitude of about 2 or 3 times as much code.

He forwarded me a post on making HTTP GET and POST requests in Java. As the post shows it takes 12 lines of code just to import all of the classes you need. When you’re all said and done it takes about 30 or so lines of code to actually make a GET request. So it takes about 42 lines of Java code to duplicate the functionally that can be called in 1 line of ColdFusion using CFHTTP. I never noticed it was that big a difference. All that versus:

 

 

Now, I’m sure there are easier ways of doing this. And after you build the class and method once, you can just reuse the object repeatedly. But in this day and age of SOA, SOAP, and REST, that seems like something that should be built into the language.

I’m not trying to make this a bash Java post. Really I’m not. Java can do lots of things ColdFusion cannot. In fact Java networking is this verbose because it has more options; it can do low level socket communication. I know, when I’ve needed it in ColdFusion, I’ve dropped down to Java to write it.

But as developers, I think there are lots of places where we don’t add value, but are still forced to work:

  • Getting reporting data out of a database? You add value by writing good complex SQL, but not by writing the database connection code.
  • In basic database applications, you add value by designing the database, but not by writing CRUD code.
  • In a REST and SOAP world, you add value by mashing up services people have thought of combining, not by making the HTTP call to get the data.

I know frameworks, libraries, code reuse, and other encapsulation techniques are ways around this.

ColdFusion as an abstraction layer on top of Java is another way. It’s the way I do it. And because I do it that way, I never have to write more code then I have to for an HTTP GET request, or email, or database connection, or .NET integration, or Exchange call, or Spreadsheet creation, or …