Welcome!

ColdFusion Authors: Greg Ness, Liz McMillan, Pat Romanski, Andreas Grabner, David Strom

Related Topics: ColdFusion, Adobe Flex

ColdFusion: Article

I Don't Hate Dreamweaver

It might be time for a second look

Uttering the dreaded "D" word in front of a room of hard-core ColdFusion developers is a brave act indeed. Hating Dreamweaver and berating its deficiencies has become a popular pastime among ColdFusion purists, so what I'm about to say may get me in all sorts of trouble. But, here goes... I don't hate Dreamweaver. Actually, and now I'm really asking for it... <nervously> I even kind of like Dreamweaver. Really.

Ben and Dreamweaver: A Brief History
Before I begin, let me explain why I'm even writing this now. At MAX 2003, I presented a hands-on session on using Web ser-vices with ColdFusion. The session ran four times, and was more than sold out each time. The attendees used Dreamweaver for all coding, and many expressed surprise that Dreamweaver actually worked for them. In fact, several attendees commented that they liked the features we were using, features they previously did not know even existed in Dreamweaver!

Now I know that some of you are going to assume that, as a Macromedia spokesperson, I have to like and use Dreamweaver. And you'd be wrong. It wasn't that long ago that I was one of Dreamweaver's most vocal critics, both internally and publicly. When Allaire and Macromedia merged, the then Dreamweaver product manager asked me for a quote stating that Dreamweaver is the best tool for ColdFusion developers. I refused. I was not going to say that because, frankly, it wasn't. It wasn't a product I wanted to use, and I don't ever recommend anything that I myself would not use. It's as simple as that.

And then came Dreamweaver MX, and things changed. My biggest objections to earlier versions of Dreamweaver, including all those popup panels, toolbars, and menus that seemed to make little sense, and auto-generation of some of the worst CFML code I have ever seen, had been addressed. The UI was cleaner, I found that I had far greater control over what toolbars and menus and panels were staring at me, and the generated CFML code is actually quite good (the Dreamweaver team even invited me to critique the code generated previously and made lots of changes based on my recommendations).

Not that Dreamweaver MX was perfect; it was not, but suddenly I found myself hating it a whole lot less. Of course, there were still things that bugged me about it. Application load time was appalling, having to define sites for everything was a pain, and the SQL query builder was less than useful.

And then came Dreamweaver MX 2004, and once again things improved. The load time, while still not as snappy as I'd like, is much better, and sites are no longer needed. (The SQL query builder, unfortunately, is still useful only to absolute beginners.) And something funny happened: I actually found myself using Dreamweaver more and more, to the point that I barely use ColdFusion Studio (oops, I mean HomeSite+) anymore. I really have gotten used to Dreamweaver, and have even started to like it!

So, is Dreamweaver MX 2004 the best tool for ColdFusion developers, and if I was asked to say so now would I be able to do so? I think I'd have to answer that with a qualified "possibly." It is probably not the best tool for all ColdFusion developers, but for many it is. Is Dreamweaver MX 2004 a replacement for ColdFusion Studio? Absolutely not (and I know that some Macromedia sales reps spin Dreamweaver that way, and they're wrong). If it was, we'd not include HomeSite+ with every copy of Dreamweaver bought, would we? The reason we provide both products is that there is value in both, and as a ColdFusion developer you get to pick which works best for you, using one or both as suits you best. (Yes, if you are a Windows Dreamweaver user, then you already have a copy of HomeSite+ that you may use too; it's included with Dreamweaver but needs to be installed separately.)

So, Dreamweaver has gotten better, but it is not a ColdFusion Studio replacement. Why use it? Why have I started to like it? Simply because there are Dreamweaver features that I really do like, features that I have come to rely on heavily, features that are uniquely Dreamweaver, features like the ones I'll now describe.

Cool Feature #1: CFC Introspection
The Dreamweaver Application panel hosts four tabs, two of which are incredibly useful (sorry, the Bindings and Server Behaviors tabs do nothing for me personally). The Databases tab functions just like the ColdFusion Studio Databases tab - it displays defined data sources, and allows drill-down to see tables and schemas (and stored procedures for some DBMSs). Just like in ColdFusion Studio, the Databases tab requires RDS support (but unlike ColdFusion Studio, viewing data won't try to retrieve every row, effectively killing your machine).

 But Databases is not the tab I'm most interested in. The fun one is the fourth one, the one labeled Components. This tab exposes all available ColdFusion Components in a nice tree control (as seen in Figure 1). The list is built dynamically, returned to Dreamweaver by ColdFusion, and features the following:

  • Right-click on any CFC and select Get Details to see the name, path, and inheritance information.
  • Right-click on any CFC method and select Get Details to see the name, access level, return type, and more.
  • Right-click on any method argument to see the data type, whether or not it is required, and the default value (if there is one).
  • Right-click on any CFC and select Get Description to see the ColdFusion generated HTML docs for the component.
  • Double-click on any CFC or method to open the file for editing.
  • Drag any method into your code and auto-generate the complete <CFINVOKE> call (with any needed <CFINVOKEARGUMENT> tags).
The CFC browser is incredibly useful for individual development, and even more so for team development (write a CFC and anyone else on the team can easily find and use it). I've so grown to depend on this feature that this alone has made it difficult for me to go back to ColdFusion Studio.

Cool Feature #2: SOAP Support
Web services are fun, and occasionally useful (okay, I'm being facetious, they're very useful, but most of their use thus far seems to be for playing and for proving that they work; thankfully this is starting to change).

ColdFusion makes Web service invocation easy, and Dreamweaver makes ColdFusion Web service invocation even easier. That same Application panel Components tab lets you switch between ColdFusion Components and Web services. If you select the latter, Dreamweaver displays a list of known Web services in a tree control (seen in Figure 2), allowing you to browse methods, look at parameters, and even auto-generate CFML invocation code by simply dragging methods into your code.

 

How do you add a Web service to the list? Simply click the + button and you'll be prompted for the WSDL URL (as seen in Figure 3). Enter the URL, and Dreamweaver will obtain it, parse it, and add it to the menu for you. It's that simple.

 

Cool Feature #3: the CFC Wizard
I've been writing constantly about ColdFusion Components (CFCs) since we first introduced them in ColdFusion MX. I firmly believe that CFCs are the most important core CFML language enhancement since, well, since the creation of CFML.

Creating CFCs requires working with a series of nested tags to define the component, the methods, any method arguments, and the details of each. This is not a terribly difficult process, and it is one that can definitely be done by hand. But why would you want to?

Dreamweaver features a Create Component wizard that can build the entire skeleton CFC for you. Click the + button at the top of the Components tab (make sure that ColdFusion Components is selected, not Web services) to display the wizard (shown in Figure 4). Then:

 
  • In the Components section, define the name (this will be the CFC file name; specify just the name, not the .CFC extension) and the directory. If inheritance is needed, select the component to be inherited from the Extends list.
  • In the Functions section, click the + button to define each of your functions (methods). For each you'll be able to specify the name, the access level, the return type, the output flag (which should generally be "false"), and more.
  • In the Arguments section, select the functions one at a time, and for each, click + to define the method arguments. For each argument you'll be able to specify the name, the data type, whether or not it is required, and more.
  • When finished, click OK, and Dreamweaver will generate a CFC file based on your selections, save it, and update the ColdFusion Components list so that you can start using the new CFC right away.
This is a really nice feature, and one that few users even know exists.

Cool Feature #4: Debug Output
The last feature I want to share is also a little-known one, and very useful. We all use ColdFusion debug info, that output appended to the end of generated pages (or displays in an associated popup window). We've all gotten used to how that information is presented, but the truth is that the data presentation is far from ideal.

If pages are executed in Dreamweaver (by clicking the Server Debug button), then Dreamweaver grabs that output and displays it in its own tab in the Results panel (as seen in Figure 5). Debug data is cleanly presented in a tree control and the interface is even interactive. Click on a debug entry and the appropriate <CFQUERY> will be located and highlighted in the editor; click on any included file listed in the Template Stack and that file will be opened, and so on.

 

The data displayed in the Server Debug tag is the same information as is usually displayed at the bottom of generated pages, but the output and interaction is much cleaner, it takes far less space, and does not interfere with generated output at all.

Conclusion
If you've gotten this far, then I have to assume that I have successfully piqued your interest in Dreamweaver. I've only listed my four favorite features. There are others worth looking into too, including amazing CSS support (probably the best in any product on the market); integrated browser validation and compatibility testing; built-in basic image manipulation (via embedded Fireworks technologies); support for secure FTP; and an extensibility layer that's even more capable than that of HomeSite.

If you're a ColdFusion Studio (or HomeSite+) user, don't throw away that tool yet; you'll likely still want to use it. But at the same time, you may want to take another look at Dreamweaver; not only is it now a decent editor, it also boasts features that may actually make you more productive. The best of both worlds, that's a good thing.

More Stories By Ben Forta

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

Comments (8) View Comments

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.


Most Recent Comments
Fernando Lopez 03/12/04 11:07:32 AM EST

I have to agree with ALex Hubner and the file window style used in CFStudio. MX takes a lot of real state on the screen for all the tabs it uses. A practical solution that I have found through Hardware was to use a dual monitor setup. I know the solution may not be applicable to everybody, but one has to use one of these setups to really understand how useful they can be. You may not use a single monitor again(unless you do most of your work from your laptop).
The cost, in my case at least, was less than $70. I went to a second hand computer store bought a 17 inch CRT monitor for $40 and a decent PCI video card for about $20.I also bought a VGA extension cable for about $10.
Since Windows 2000 MS has included support to dual monitors so the installation was a snap. Now I have my code window in one screen (left monitor) and all the tabs (the file window included) in the right monitor.
Probably not the best solution but truly a good one. I find myself having two windows open, one for the coding one for the testing, one in each monitor and I dont have to cover my code to see what the pages would look like.
An added extra feature: I have a VGA card that has a TV input so I can see the news on the right monitor while working on the left one.
no 29 inch monitor required :)

Alex Hubner 01/18/04 08:07:16 PM EST

My main problem with DWMX (and MX2004) is the lack of a smarter way to deal with the files in the "resources window". Since the launch of DWMX (the one that people claimed the "substitute" of ColdFusion Studio) I don't understand why Macromedia droped one of the most visceral properties of CFStudio: the file window style, small, simple and effective. Adobe's law suit?

You might take a look on my critics:

http://www.cfgigolo.com/files/cfstudio_dwmx.htm

Mike Rankin 01/15/04 03:48:01 PM EST

Wow! I've been looking for the split screen trick since I started using DW.

Now if only I could get the column position...

Chris Phillips 01/15/04 11:40:11 AM EST

Firstly, on the split screen issue. It's sorta in there. Next time you have a file open hit F10. That'll bring up the "Code Inspecter" which you can dock below the code window. Then just drag up on the tab between and down to resize the 2 windows.

Secondly, there is one setting that seriously effected my DWMX2K4 perfomance. Go to Edit/preferences. Select he "Invisible Elements" and at the bottom you'll see "Server-Side Includes". UNCHECK THIS. I'm not sure whether you have to restart dreamweaver of not to get this to take effect. But, it made a dramatic effect on my dreamweaver performance. Like sometimes it used to take 20 seconds to save a file. Now - instantanious.

PS. Tell me if it helps.

Jason Epperson 01/15/04 09:08:56 AM EST

Well, I am still mixed...

We haven't really moved into MX and CFC's all that much yet but are gearing too, and I hope to see the advanced benefits of doing so.

However, my biggest question on DMX2K4 is why is it so drastically slow compared to the CFStudio core in actual file operations. CFStudio was for opening, saving, and migrating thru file directories just amazingly fast. I find with Dreamweaver it's often a long wait.

I also very much MISS my "SPLIT SCREEN" view. Can we add this in a Dreamweaver update or something?

Chris Gaelic 01/15/04 04:42:05 AM EST

I attended a CFMX presentation by Macromedia when it was first launched almost 2 years ago and enthusiastically bought the upgrade from CF5 and Studio5. I tried using Dreamweaver and Homesite+ for 2 or 3 days before giving up in disgust.

Macromedia did a great job of catering for brochure-oriented website developers and totally ignored the needs of CF application developers, in the process moth-balling a tool that Allaire had been fine-tuning through 5 versions.

However, cfmx had some really cool new capabilities, like cfcs, webservices and flash remoting. Unfortunately it's only now, after 18 months of major aggro, that I have finally got a stable cfmx server. At last I have started to take advantage of some of those neat new capabilitites.

What Ben describes sounds just like what I'll need. However, I presume from his description that it's only available in Dreamweaver and not Homesite+. If that's the case, I have to ask why?

For any Macromedia developers who might get to read this - I DON'T WANT A GRAPHICS ORIENTED DEVELOPMENT ENVIRONMENT - it doesn't suit what I do.

Provide all the same functions that were available in Studio5 and add in some of those neat new features that Ben described above and I will finally consider paying for an upgrade.
I'll then use Homesite+ and my daughter can play around with Dreamweaver.

In my books Macromedia get an A+ for catering for brochureware developers and a D- for what they've done for application developers.

Everardo Trujillo 01/15/04 02:18:29 AM EST

I've used ColdFusion Studio for a long long time... and when Dreamweaver MX was launched, I tried it... for about a day! Could not get used to it, did NOT like it, as a WYSWIG tool its awesome I applaud it.

When Dreamweaver MX 2004 was launched, I did not even bother with it... until I attended the one day hands on class at Macromedia MAX 2003. I have to say, I was impressed, especially with all the features that Ben mentions in this article.

I now use both DW MX 04 and CF Studio 5, but there are still some features in ColdFusion Studio 5 that I'd like to see in DW, maybe they exist but cannot find them?:
Ability to split the screen.
Ability to "hide" lines of code.
Access to the 'expression builder'.
This one other feature in CF Studio (that I do not know what its called), you select a begin tag e.g. then you press Ctrl + M and it will position the cursor at the end tag

Anyway, it is getting better, but not quite there yet... still, great job Macromedia!!!

Pablo Varando 01/14/04 10:07:02 PM EST

You know, I have always loved ColdFusion Studio 5 to code all my ColdFusion Appplications. However I recently began a new career with a company in FLorida (RecruitMax.Com) and they have implemented a standard coding environment with Dreamweaver MX.

At first I was shocked to hear that I would have to use dreamweaver.. I mean anyone who's ever spoken to me or knows me knows that Dreamweaver to me is the spawn of Satan (no hard feelins Macromedia).. :)

Now, I installed Dreamweaver and at first, I'll admit I was a bit over run with all the areas and all the things it had (not ina good way either)... but after giving it a shot with an OPEN MIND I have to agree with Ben on this one... I still love and use ColdFusion Studio 5 and am transitioning over to Dreamweaver slowly... but I do like some of the things I am seeing..

Dreamweaver, is not as bad as I originally thought and I think it just might have a chance in my STRICT requirements for a good editor...

Good job Macromedia on the newest release of DW... I am getting more amazed everyday I use it...