Posted in Development, ColdFusion | Posted on 11-11-2008 | 4,996 views
I've been using Dreamweaver CS4 for ColdFusion editing the past few weeks. This is mainly due to some writing I'm doing for Adobe and that Eclipse has been a bit cranky for me lately due to other plugins I need for work.
Last night while updating my employee directory application for my latest Transfer post I noticed something rather cool about Dreamweaver. I had added a custom tag named adminlayout. All of a sudden, the next time I typed cf_, check out what the auto-suggest provided:

I guess Dreamweaver noticed the first time I did cf_foo and added it to the autosuggest list. I also assume it is site based (I would hope so).
Anyone know if this is new to CS4?


Have you noticed that it fails to recognise CFPDF? Usually autocomplete kicks in and also shows the attributes you can use, but DW CS4 does neither.
As a coder I haven't found anything new yet that's worth the upgrade from 8 to CS4, except that it loads up a lot quicker which is a welcomed improvement.
I really wanted the ability to mark certain lines of code and use a hotkey to jump between them (like in TextPad) - a godsend if you're working on a file that's several pages long. No such luck, even though I suggested it ages ago.
Very handy.
Even better... the new YUI and JQuery Dreamweaver Web Widgets available in the exchange.
Did CS4 just automatically pick it up because you used it somewhere, without you having to add it through the tag library function?
Two solutions to your problem:
1: Control + G. Jumps directly to any line number. You may already do this and just not be satisfied with it.
2: Control + F. Absolute quickest way to get around in large files. Type the very beginning of the code you're looking for or add some identifier (! is a good one) and just hit enter over and over to cycle through all of your 'mark points'. If you've taken the leap to mostly keyboard interaction this'll be SOOO quick for you. Much better than any sort of mouse marker equivalent. The best part? It doesn't have to be syntactically valid. You can drop your ! anywhere you want as long as you don't plan to run the file before coming back to it.
I love DW for designing but it will never be a good coder's editor until they add the things that coders are asking for. It will take a DW developer just a few hours to add my suggestion so there must be some product manager who doesn't understand the benefit of it. I'd even settle for a split screen code view like MS Word where you can view and edit two parts of the same document at the same time.
That's why in my opinion the best approach is to type the beginning of some distinct part of the code you're looking for. This is how I get around large files, and it's virtually instant. I don't have to place or manage markers, and I always get to the exact point in the code I'm looking for. Even if you happen to choose a find criterion that's only semi-distinct (a variable name that's only used in a few places, one of which is the code you want), remember that it's only a few enter presses away to step down to the correct instance.
That said, I realize that not everyone types 120 WPM with their eyes closed.
If you did want to use the ! method though, remember that the "replace all" functionality is just an Alt + A keystroke away. To run the code with your markers intact you'd just Ctrl + F (the ! would probably even already be there), Alt + A, Ctrl + S, and run. Then, to get all of your markers back just execute the correct number of Ctrl + Z strokes (usually just 2-3 I'm assuming).
Dreamweaver can maintain as many undo steps in memory as you have RAM. I have mine set to 5000, and on Vista 64-bit all Dreamweaver actions with the exception of FTP file browsing and transfer are lightning.
To repeat: Put ! markers on the lines you'd like, disregarding where they are syntactically. Before running, Ctrl + F, Alt + A, Ctrl + S. Done. To replace the markers: Ctrl + Z * x.
Window > Code Inspector
Drag and position that any way you'd like.
Enjoy.
http://www.adobe.com/support/coldfusion/downloads....
For example, I'd bet that the majority of the developers reading this blog entry on Dreamweaver didn't even know about:
Its super tight, in-editor integration with the official ColdFusion documentation right down to copy and paste-able usage examples (select any tag or function in your code and press Shift + F1). Not to mention its fantastic integration into the various embedded O'Reilly reference books depending on what you have selected (SQL, CSS, HTML, Javascript, XML, XSLT, PHP, ASP, so on).
Its ability to process ColdFusion in-editor if you configure a testing server correctly.
Its ability to display ColdFusion debugging information in-editor in its own panel (Server Debug panel).
Its built-in Javascript step debugging and PAUSING with realtime mutating code view (much better than Firebug, SOOOO timesaving for AJAX development).
Its ability to seamlessly connect to your server and introspect CFCs including metadata.
Its ability to do incredibly powerful granular searching across various types of source code on a per document, document session, folder, site, or drive level.
Its ability to connect through a ColdFusion datasource to the underlying database and display draggable-to-code versions of its tables, stored procedures, and even views.
It's best-in-class browser compatibility detection engine and integrated validation features.
My favorite feature, however, is that it's not ugly.
In reality, Dreamweaver gets a pretty bad rap in the ColdFusion community today, because a lot of statements and assumptions are never actually challenged or tested.
In reality though, of all of the developers I've ever seen, most of which have at least 3 or 4 more years experience with ColdFusion than I do, I've never seen any of them go nearly as fast with CFEclipse as I do with Dreamweaver. Outline view or no outline view. And yes, I was paid by Adobe to write this comment (kidding).
That can get really powerful when you want to start doing things like unordered lists etc..
Dreamweaver CS4 Essential Training
Dreamweaver CS4 Getting Started
Dreamweaver CS4 New Features
And although DW 8 it still has some good stuff about setup:
Dreamweaver 8 Dynamic Development
No results found
However, there is a dedicated repository for most of the official and commissioned stuff, and it's top notch.
http://www.adobe.com/devnet/dreamweaver/
View > Split Code
The powers that be didn't think it was worthy of a button on the toolbar, but the code is still in the toolbars.xml file if you care to uncomment it.
I realize he was asking for something primarily for experienced CFers who might want to learn what DW can offer, but I want to point out resources that may help them and also newcomers to CF who may choose to use DW.
First, there are some very short video-style presentations in the CF Getting Started Experience that show using DW with CF (http://examples.adobe.com/cf8gettingstarted/experi..., see the "ColdFusion and Dreamweaver Development Overview" and "Steps for Building Dynamic Pages".
Beyond that, though, and for those already experienced with CF, there are several longer user group-style presentations given by many folks as listed at my UGTV site (carehart.org/ugtv/). You can see the results of a search for dreamweaver as a keyword, at:
http://www.carehart.org/ugtv/list.cfm?search=dream...
Finally, though it's not a video, I'd note that the CF docs themselves do talk about using DW with CF quite a bit, and especially one that many never notice, "Getting Started Building ColdFusion MX Applications". Sure, it's geared toward newcomers to CF, but even experienced folks might pick up tips in its showing how to use DW with CF. Sadly it was not updated for CF8, so it only available in the CF7 docs, in print or online at http://livedocs.adobe.com/coldfusion/7/. The DW help and docs also discuss the CF integration features, but again check out the recorded presentations above for people showing them in use.
[Add Comment] [Subscribe to Comments]