New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Start learning with our library of video tutorials taught by experts. Get started

ColdFusion Builder Essential Training
Illustration by
Watching:

Using code completion


From:

ColdFusion Builder Essential Training

with Daniel Short

Video: Using code completion

The heart of any good development IDE is its code completion engine. As you saw on the previous chapter, you can do a ton of customization around how CF Builder writes your code. So, let's put some of that to use, by working on a simple login application. In the Chapter 5 folder, I'm going to take these three files from the begin directory and we'll put them in the Chapter 5 directory. Open up these files and take a quick look at what we're starting with. First off, my Application.cfc.
Expand all | Collapse all
  1. 7m 48s
    1. Welcome
      59s
    2. Installing ColdFusion Builder
      2m 20s
    3. Installing ColdFusion Builder as a plug-in
      3m 18s
    4. Using the exercise files
      1m 11s
  2. 17m 42s
    1. Workspace overview
      2m 25s
    2. Organizing your workspace
      6m 19s
    3. Adding and selecting workspaces
      2m 53s
    4. Installing and managing plug-ins
      6m 5s
  3. 12m 12s
    1. Creating projects
      2m 11s
    2. Importing projects
      2m 48s
    3. Creating project working sets
      2m 23s
    4. Managing projects
      2m 22s
    5. Linking folders
      2m 28s
  4. 23m 2s
    1. Configuring and managing ColdFusion servers
      6m 26s
    2. Using the Services Browser
      4m 15s
    3. Using RDS Dataview and Fileview
      4m 52s
    4. Using FTP
      7m 29s
  5. 18m 10s
    1. Creating editor profiles
      2m 6s
    2. Using Code Assist
      5m 43s
    3. Setting code coloring
      4m 5s
    4. Using shortcut keys
      3m 5s
    5. Working with outlines and syntax checking
      3m 11s
  6. 37m 40s
    1. Using code completion
      7m 25s
    2. Using snippets
      9m 23s
    3. Using SQL editing and the Query Viewer
      5m 55s
    4. Working with components
      7m 27s
    5. Working with variable mapping
      2m 14s
    6. Navigating code and documents
      5m 16s
  7. 13m 12s
    1. Getting set up
      3m 50s
    2. Using the ColdFusion debugger
      5m 37s
    3. Watching logs with Tailview
      3m 45s
  8. 13m 8s
    1. Installing extensions
      4m 5s
    2. Using the CFC Generator extension for ColdFusion 8
      4m 52s
    3. Using the CFC Generator extension for ColdFusion ORM
      4m 11s
  9. 34m 5s
    1. Building a simple contact form extension
      3m 42s
    2. Creating user interfaces
      8m 55s
    3. Packaging the extension
      3m 55s
    4. Building the handler
      8m 10s
    5. Using the Builder extension
      9m 23s
  10. 25s
    1. Goodbye
      25s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
ColdFusion Builder Essential Training
2h 57m Beginner Mar 22, 2010

Viewers: in countries Watching now:

ColdFusion Builder, based on the Eclipse workbench, is Adobe’s first dedicated development environment for programmers of ColdFusion-based Internet applications. ColdFusion Builder Essential Training, with author Dan Short, is designed to teach both new and experienced ColdFusion developers how to configure servers and services, generate data-aware components, and create custom extensions. Exercise files accompany the course.

Topics include:
  • Installing ColdFusion Builder
  • Customizing the ColdFusion Builder workspace
  • Managing assets within a project
  • Setting up ColdFusion servers
  • Coding with Code Assist, code coloring and syntax checking
  • Using code snippets
  • Working with components and variable mappings
  • Creating custom Builder extensions
Subjects:
Developer Web
Software:
ColdFusion Builder
Author:
Daniel Short

Using code completion

The heart of any good development IDE is its code completion engine. As you saw on the previous chapter, you can do a ton of customization around how CF Builder writes your code. So, let's put some of that to use, by working on a simple login application. In the Chapter 5 folder, I'm going to take these three files from the begin directory and we'll put them in the Chapter 5 directory. Open up these files and take a quick look at what we're starting with. First off, my Application.cfc.

I just have an onApplicationStart method and an onRequest method, which we'll fill out as we continue on through this video. My index page is where I'm going to keep all of my trade secrets about my Art Gallery. On my login page, I have the start of some code of a cfparam at the top and I've started my login form. I have my username field. I just need to add the password field. Now to begin, let's go to the Application.cfc and we'll finish up this file. The first thing I'm missing in my Application.cfc is the cfapplication tag.

So, I'm going to start by adding that tag here at the top and I can just start typing cfap, and as I type, the code hints will eliminate tags that don't match what I'm typing. So, I've got cfap and I only have cfapplet and cfapplication as valid selections. I can then click on the tag that I want, or use my arrow keys, select it and press Enter and CFBuilder will add a space after the tag and close it for me and immediately pop up all of the attributes available for that tag.

Off to the right-hand side, I can see a tooltip that tells me exactly what that attribute does. If I use my arrow keys, I can scroll down through the attributes and the tooltip will change to show me exactly what I need to enter. So, we'll choose name, and once I have the attribute selected, press Enter, the attribute will get added as well as the equal sign and my quotes. I'll type the name of my application, press the arrow key to move past the quote and press the Spacebar again, and all of my attributes pop back up.

But the name attribute is missing since it's already applied to the tag. Now for a login application, I need to enable sessions, so I can keep track of whether or not a user has successfully logged in. So, we'll scroll to the bottom, choose sessionmanagement. CFBuilder adds the equal sign and the quotes for me and then because sessionmanagement is a true or false value, it gives me the two possible entries for that value. I can choose which one I want, press Enter and then CFBuilder adds a space and pops up the attribute code hints again.

So, as you can see, once you get rolling, you can really add tags and attributes very, very quickly, by letting ColdFusion Builder finish your work for you. So, we'll close the cfapplication tag. Now instead of the cfapplication tag, I actually like to use the this scope in my application cfcs. Let's replace the cfapplication tag with this scope variables. I'll press Shift+Enter to move down to a new line and then Command or Ctrl and Shift+= to add in a cfset tag, type this and press the period and CFBuilder will show me all of the appropriate attributes for the this scope, inside of the application.cfc.

You'll notice that I don't get any of the tooltips for the attributes, but I do still get all of the correct attributes. The reason is that CFBuilder sees the this scope as a variable scope and scopes don't have attributes like tags do. With the cfapplication tag, it's looking at tag attribute, so it knows exactly what everything is. Now, let's go ahead and add the name attribute and put in the same thing, CFBEsstCh5, and I forgot to put my double quotes around my name, but if I hold on the Shift key and highlight all of my text, then press Command+Shift+Apostrophe on my keyboard, it will surround the code with the double quotes.

I'll press Shift+Enter. We'll go to the next line, Command+Shift +=, this.sessionmanagement = true, and I can press the Shift+Enter again and go on to the next attribute very, very quickly. Now that we have our application set up, I'll go up to line 3 and I'm going to delete this line by pressing Command+D or Ctrl+D on Windows. And that would delete that line. Now I need to add my onSessionStart method, so that every time a user session begins, I can set a variable that determines whether or not that user has logged in.

So, I'll go to the bottom of my file, and instead of typing out all the code this time, I'm going to use the Tag Wizard, which is right here in the cfml toolbar. So, I'll click Open Tag Wizard. I can choose the version of ColdFusion I'm coding against. In this case, ColdFusion 9, and I'll type in the name of the function, cffunction, press Enter and it shows me my tag right here. I can select my tag and click OK and CFBuilder will show me all of the attributes that are available on this tag. I can just tab through all of the attributes and set the proper values.

In the access dropdown, I'll press the down arrow to get the menu to expand. I'll choose public, press Enter. Tab down to the name. This one is called onSessionStart. Our output is going to be false, returnformat will be blank, the returntype will be void. roles, securejson and verifyclient, we can leave blank and click OK. CFBuilder then adds a cffunction tag for me and leaves all of the blank attributes off of the tag. So, it only added attributes that I actually provided values for.

Now I don't like the way it's formatted, because it's all flush left. So, if I click and drag to select these two lines, I don't have to select the entire line. I can then press Tab and indent both lines. If I click anywhere in the middle of the line and press Tab, it will actually just insert a Tab character. but if I have any text selected in a line, it will indent and outdent by pressing Shift+Tab. So, we have two more things to do. I need to set a variable inside my onSessionStart and I actually need to render my page in the onRequest method.

I'll press Command+Shift and Enter, which will add a new line above my closing cffunction tag and place my cursor at the beginning of the line. Then press Tab, Command+Shift+= to add my cfset Session.Logged = True. Now in my onRequest method, I need to actually render the page that's being passed to the method. So, I'll do cfinclude template. After I press Enter and add the template attribute, I can click on Select File or Folder and actually browse to the file that I want to cfinclude, but in this case, we're actually using an argument passed to the onRequest method.

So, I'll press pound, type Arguments, period and CF Builder will show me all of the arguments for the current function that I'm inside. So, you'll notice it lists target page. I'll just press Enter, then close my cfinclude tag. We now know all the basics of CFBuilder's code completion engine. If for whatever reason you don't see code hints pop-up when you expect them to, you can always press Ctrl+ Spacebar to get code hints to appear. If you find that CFBuilder is doing something you don't want it to do, go back into your Preferences and tweak the settings to get things just the way you want them.

There are currently no FAQs about ColdFusion Builder Essential Training.

 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

join now Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed ColdFusion Builder Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.