| By Jeffry Houser | Article Rating: |
|
| February 11, 2005 12:00 AM EST | Reads: |
20,397 |
For as long as I can remember, I've been using ColdFusion Studio to develop my applications. Unfortunately, CF Studio appears to be on its last legs. It is still included with Dreamweaver under the name HomeSite+, but has not gone through any major revisions for quite some time.
The future of Macromedia IDEs lies with Dreamweaver, and if you aren't familiar with it, it's time to start getting up to speed. That is what this article is about. Download an evaluation copy here: www.macromedia.com/cfusion/tdrc/index.cfm?product=dreamweaver.
Setting up the Site
To access many features within Dreamweaver, such as file synchronization, source control integration, and database panel access, you will need to create a site. This is how you do it:
- Create the site: From the site menu, select manage sites. Click the new button, then click site. Or, from the files panel you could select Site --> New Site. The basic wizard. I prefer to use the advanced. Figure 1 shows the advanced tab.
- Local info: On the local info section, you can enter some basic information about the site. You can name the site anything you want. I like to use descriptive names. The local root is the location of the site files on your hard drive. I usually deselect "Refresh Local File Lists Automatically" for performance reasons. You can also specify the default images folder and the HTTP address of the site. The HTTP address is used for the link checker to check links that refer to the site. You can also enable the cache, which speeds up various features.
- Remote info: This section is used to define your remote access to the site. In most cases I have either FTP access or network access. RDS, SourceSafe, and WebDAV are also supported. I will often select the "Upload files to server on save" option. If RDS is an option for you, it will open up some other features in the application panel, such as server bindings and databases.
- Testing server: The testing server section can be used to set the type of server you are testing against (ColdFusion, of course), and how you access it. I'm sure in many cases, the testing server will be your local machine.
- Cloaking: The cloaking section allows you to enable or disable cloaking. Cloaked files or folders will be ignored when doing site operations such as synchronize or a site-wide search.
- Design notes: Design notes are designed to let you share extra information about files with other developers. If you're working in a team these can be useful. Working solo, I will usually disable this feature.
- Site map layout: Allows you to specify how the site map will look. You can view the site map by selecting Map View in the files panel.
- File view columns: This specifies the columns that will be displayed in the expanded version of the files panel. You can expand the files panel by clicking on the expand/collapse button. I usually keep the defaults.
- Contribute: If you want to make your site contribute-friendly, this is the place to do it.
Dealing with Components
One area where Dreamweaver excels is in its handling of ColdFusion Components (CFCs). If you go to the components tab of the application panel, you should see a list of all components on your current server. If you do not have all the proper settings set up in the site, you'll get a list of what you need to correct before components will be displayed.
The component panel also offers a wizard for creating components. Wizards are often much nicer than typing everything by hand. Use these instructions to use the component wizard:
- Start the wizard: Open up the application panel if it is not already open. You can do so by selecting components from the window menu. Click the plus sign (+) on the component panel to bring up the create component wizard.
- Enter component information: Here is where you will enter the attributes of the component tag, such as the display name, the hint, and which component this component is extending. You can also specify the directory that the component will be created in and its file name.
- Enter property information: The properties section is used to specify the cfproperty tag. When using components only within CF, you do not need to specify properties. However, properties are used in conjunction with Web services, so if you want to open up your CFC as a Web service, then you'll need to enter data here. Click the plus sign to create a property. Type in its name, display name, hint, and type. You can remove a property by selecting it and clicking on the minus sign (-) button.
- Enter function information: The function section allows you to specify functions that will be in your component. You can specify the attributes of the cffunction tag, such as name, hint, access, returntype, roles, output, and display name. Using this wizard, there is no place to put your function code. It will only create the shell of the method for you to use. You can always remove a function by selecting it and clicking the minus sign button.
- Enter argument information: The arguments section allows you to specify arguments for each individual method. Select the function from the list of available functions, and then click the plus sign to create an argument. Fill in the argument data, such as the name of the argument, its displayname, the hint, type, default value, and whether it is required or not.
- Complete the wizard: Click the okay button and the component will be created and opened in the Dreamweaver edit window.
- Fill in your functions: Now you can flesh out your functions as needed and fill in any pseudoconstructor initialization code.
You can use the component panel to access Web services in a very similar manner. In the component panel, select Web services from the drop-down menu. Click the add button and enter the Web Service Definition Language (WSDL) location of the Web service. Dreamweaver will parse the WSDL and give you a list of all the methods and their arguments. Just as with components, you can click and drag the method into your cfm page to generate code for calling that component.
Miscellaneous Features
There are a few other features of Dreamweaver that I find helpful in my development. Here they are in no particular order:
- Tag insight: If you've ever written code by hand, I'm sure you'll appreciate how great this is. Start typing the name of the tag, and choose it from the list. Hit the space bar and the tag's attributes are listed for you. For many attributes, the default values are even specified. When you close the tag, the end tag, if applicable, is automatically displayed.
- Hide panels: You can hit F4 to hide all panels on a screen. Then hit F4 again to replace them on the screen. This is very helpful when you want more screen estate for the code portion of your editor window. To hide the side panel bar without affecting the panels on top or below the editor, click the arrow button in the bar between the panel window and the edit window. Clicking it again restores the panel.
- CFML insert bar: From the window menu select insert, then the CFML tab. This gives you access to many commonly used CFML language features, including a cfquery wizard, CFML comments, those pesky number signs, cfoutput, cflocation, and cfinclude. Sometimes it's easier to click a button than to type code from scratch. There is plenty of other nonCF-related stuff on the insert bar that can be useful in many situations.
- Search and replace: I wouldn't last a day without using search (and replace) in some manner. Dreamweaver provides many search or replace options. You can search in a current document, within a selected block of text, across all open documents, across all documents in a site, within a folder, or within selected documents of a site. You can also search within source code, text, or within a specific tag. Regular expressions are supported and you can ignore white space. You can also save search information for later use. Control+F is your friend. (Although, I do wish they had a find previous option in addition to find next.)
- Synchronize: In any given week, I'll cycle through multiple projects at more than one client. Since I do all development locally, the first thing I do when I plug into a client's network is synchronize my local site with the most up to date version of their code. The synchronize process deletes any files on my machine that are no longer relevant and it also updates old versions of files. When I'm done with my development for the day, I can always synchronize right back to them.
- Snippets: Snippets are small blocks of code that you can just click and drag onto your own page. You'll find them in the code panel on the snippet tab; you can also create your own. Some of my own custom snippets include a comment header that I place on every document, a dump of application, and session variables.
I'm sure you'll find that Dreamweaver is a very powerful tool that keeps getting better. If you find it lacking in some area, there are many extensions available to help you expand it. A good place to start looking for extensions is in Macromedia's Developer Exchange at www.macromedia.com/cfusion/exchange/ index.cfm#loc=en_us&view=sn100&viewName=Macromedia%20Exchange&avm=1 . I hope you've found this article enlightening. Let me know which features in Dreamweaver that I didn't cover here help your development.
Published February 11, 2005 Reads 20,397
Copyright © 2005 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Jeffry Houser
Jeffry is a technical entrepreneur with over 10 years of making the web work for you. Lately Jeffry has been cooped up in his cave building the first in a line of easy to use interface components for Flex Developers at www.flextras.com . He has a Computer Science degree from the days before business met the Internet and owns DotComIt, an Adobe Solutions Partner specializing in Rich Internet Applications. Jeffry is an Adobe Community Expert and produces The Flex Show, a podcast that includes expert interviews and screencast tutorials. Jeffry is also co-manager of the Hartford CT Adobe User Group, author of three ColdFusion books and over 30 articles, and has spoken at various events all over the US. In his spare time he is a musician, old school adventure game aficionado, and recording engineer. He also owns a Wii. You can read his blog at www.jeffryhouser.com, check out his podcast at www.theflexshow.com or check out his company at www.dot-com-it.com.
- Oracle To Keynote Cloud Computing Expo
- Contrary Opinion: Why Silverlight is Good for Adobe
- Analytics for Adobe Air Applications
- Adobe’s Aiming ColdFusion at Multiple Clouds
- Eval JavaScript in a Global Context
- Fig Leaf Software to Exhibit at Government IT Conference & Expo
- Is Microsoft as Free as Open Source?
- Cloud Computing Journal: Adobe to Deliver ColdFusion in the Cloud
- The Planet Named “Bronze Sponsor” of Cloud Computing Expo
- Adobe Reader Sued
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Adobe Enters Cloud Computing with LiveCycle
- Oracle To Keynote Cloud Computing Expo
- Social Media Terrorists
- Adobe Flash Media Server on iPhone
- Contrary Opinion: Why Silverlight is Good for Adobe
- Adobe Flash Based GetJar Surpasses a Half Billion Downloads
- Adobe ColdFusion 9 and ColdFusion Builder Public Betas Now Available
- Adobe Tries Commercializing Its Online Software
- Adobe Open Sources Flash Initiatives
- The Next Programming Models, RIAs and Composite Applications
- Where Are RIA Technologies Headed in 2008?
- Constructing an Application with Flash Forms from the Ground Up
- AJAX World RIA Conference & Expo Kicks Off in New York City
- CFEclipse: The Developer's IDE, Eclipse For ColdFusion
- Personal Branding Checklist
- Adobe Flex 2: Advanced DataGrid
- Has the Technology Bounceback Begun?
- Building a Zip Code Proximity Search with ColdFusion
- i-Technology Viewpoint: We Need Not More Frameworks, But Better Programmers




































