Hands-on with ColdFusion Builder 2

collectivemodernSoftware and s/w Development

Jun 30, 2012 (5 years and 4 months ago)

412 views

© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Hands-on with ColdFusion Builder 2
Ram Kulkarni (Sr. Computer Scientist)
Josh Adams (Sr. Solutions Engineer)
Rakshith N (Product Manager, ColdFusion & ColdFusion Builder)

TAs :
Brian Rinaldi
Kev McCabe
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Agenda

Objectives

Software Requirements

Lab Assets

Activity List

ColdFusion Builder Views

Setting up ColdFusion Builder 2

ColdFusion Builder 2 Features – Exercises

Resources


2
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Objectives

Learn how to setup ColdFusion Builder 2

Set up ColdFusion server in ColdFusion Builder 2

Create project


Get familiar with the new features in ColdFusion Builder 2

Code Formatter

Advanced Find & Replace

Editor Features

Custom Keyboard Shortcuts

Code Folding Enhancements

Task Management

Start Page


3
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Software Requirements

ColdFusion 9 (RDS required)

https://www.adobe.com/cfusion/tdrc/index.cfm?product=coldfusion



ColdFusion Builder 2
https://www.adobe.com/cfusion/tdrc/index.cfm?product=coldfusion_builder



ColdFusion Builder Extensions

Apptacular (From Demo Assets)

Adobe CFC Generator
4
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lab Assets

Lab workbook - BL2262_Kulkarni.pdf


Extensions - BL2262_Kulkarni_BL2262_Kulkarni_Extensions.zip

System Requirements-Hands-on with ColdFusion Builder 2

Apptacular.zip

Adobe CFC Generator.zip

(Unzip extensions zip file and keep extensions ready for installation)
5
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Activities in the session
1.
Before BYOD Session : Install ColdFusion 9 and ColdFusion Builder 2

Make sure you enable RDS while installing ColdFusion 9

Preferred configurations for this lab

Install ColdFusion 9 locally (not using VMWare)

Install ColdFusion Builder 2 standalone

2.
Set up ColdFusion Builder 2 for this lab

3.
ColdFusion Builder 2 Exercises

4.
Optional – Using Adobe CFC Generator to generate ORM CFCs


6
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
ColdFusion Builder Views (used in this Lab)
7
Navigator
Servers /Server
Manager
Editor
Extensions
RDS Dataview
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Setting up ColdFusion Builder 2
1.
Configure ColdFusion Server in ColdFusion Builder
a)
Start ColdFusion server if not already started
b)
Ensure that status of the server in Server Manager of ColdFusion Builder is ‘Running’
Right click and refresh server if you started the server outside ColdFusion Builder

2.
Install Apptacular extension in the server that you added

3.
Create ColdFusion project (at default location in the workspace)
a)
Create MAX2011Lab folder under wwwroot of your server
b)
Link the lab folder in the project

4.
Create Apptacular application in MAX2011Lab folder
We will use code generated in this application for all our exercises

8
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lab - Setting up ColdFusion Builder 2
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Using Code Formatter

ColdFusion Builder supports formatting of CFML, HTML, JavaScript, and CSS code


Use CTRL+SHIFT+F (CMD+SHIFT+F) to format a file


Understand preference settings for the Code Formatter. You can set

Tag and attribute case

End tags with />

Indentation preferences (tab/spaces, size etc.)

White space and new line settings

Line wrapping settings

Placement of curly braces in script style code


Exercise : Format meetings.cfm. Create new formatting preferences, modify formatting settings and reformat the file.
10
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lab - Using Code Formatter
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Using Advanced Find & Replace

ColdFusion Builder has customized search and replace options for CFML code

Specify search scope – Current Document, Open Documents, Projects, Workspace, Local
Directory, FTP Location, RDS Location, or Working Sets


Search text or tag

Narrow tag search criteria based on conditions such as tags having attribute, not having attribute,
containing/not containing text, etc.

Specify replace action on matched tag results, for example, set attribute, replace/remove tag block, add
text before/after tag block, etc.


‘Find All’ action shows search results in a view


Exercise : Find all occurrences of tag ‘h2’ and add a CSS style attribute to it
12
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lab - Using Advanced Find & Replace
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Using the New Editor Features

Quick Fix

Create function definitions from function calls

Creates function arguments too from function call

Exercise : Add a function call ‘handleList()’ in authors.cfm and create function definition using Quick Fix


Code Navigation

Use code navigation keyboard shortcuts to navigate through code faster

Move between functions, cfif-cfelse/if-else, cfswitch-cfcase/switch-case using
CTRL/CMD+SHIFT+UP/DOWN

Move between function parameters and tag attributes using CTRL/CMD+]/[

Exercise : Use above keyboard shortcuts in authros.cfm to navigate between functions, cfcase and function parameters

14
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Using the New Editor Features (Continued …)

Code Assist enhancements

Separate code assist proposals for component, java, COM, and CORBA

Context-specific code assist for CFLOOP

Cyclic code assist

Filtering code assist proposals by ‘containing’ text

Type-aware code assist

Exercise : Try above code assist improvements in a new file


Tag Block Selection

Select the entire tag block using CTRL/CMD+ALT+B shortcut

Works in script style code too

Exercise : Try tag block selection in autors.cfm
15
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Using the New Editor Features (Continued …)

Jump to Matching Tag

Use CTRL/CMD+ALT+M to jump between start and end tags

Works in script style code too

Exercise : Try this feature in authors.cfm


Hover Help

Hover mouse over built-in tags/functions or UDFs to display help

Exercise : Try hover help on tags and functions in authors.cfm
16
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lab - Using the New Editor Features
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Custom Keyboard Shortcuts

You can add custom keyboard shortcuts in Preferences > ColdFusion > Profile > Keys

Type key binding and text to be inserted when key binding is invoked in the editor

You can set caret position after inserting the text by specifying $${CP}


Exercise : Add keybinding for ALT+H+2 to insert h2 tag. Invoke this key binding in a new file
18
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lab - Custom Keyboard Shortcuts
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Code Folding Enhancements

You can create custom code folding in ColdFusion Builder 2

Select a block of code and press CTRL/CMD+ALT+F

New custom folding icon appears in the left-margin and the code is folded

Note that if the start line of the selection already has code folding, then additional code folding
does not work.

Code foldings are persisted.

When you close a file, all foldings and their state are saved. When you reopen the file, the
persisted foldings are restored


Exercise : Add custom code foldings in authors.cfm. Close and reopen the file and observe that foldings and their state are
restored.
20
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lab - Code Folding Enhancements
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Task Management

Task tags are used in comments in CFML for tracking, for example things to do or fix in the code

ColdFusion Builder 2 is configured with two default tasks TODO and FIXME

Can add more tags in Preferences > Profiles > Editor > Task Tags

Tasks are updated in the Task View only after you save the file

Tasks appear in the Task View only after you open the file (for the first time) in the editor

Double-click the task to go to the location in the code

Can remove the tasks by removing the tasks comment


Exercise : Add TODO task in a new file. Create a new task in preferences.
22
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lab - Task Management
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Start Page
24
ColdFusion Builder 2 has a Start Page that
provides a rich getting started experience:

Three ‘Getting Started’ videos

Create ColdFusion page, project, or
component

Open recently closed files

Download and install featured Extensions
from RIAForge


Latest ColdFusion News from the product
team

Learning resources
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Lab – Start Page
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Resources

Installing Adobe ColdFusion Builder 2.0


ColdFusion Builder Installation Guide

Using ColdFusion Builder 2.0


ColdFusion Builder User Guide

What's new in ColdFusion Builder 2


In this article, Ramchandra Kulkarni provides an overview of the ColdFusion Builder 2 features, to help you take full advantage of all the
productivity tools provided in ColdFusion Builder 2.

Getting started with ColdFusion Builder 2

In this Adobe TV video tutorial, Adobe Platform Evangelist Terry Ryan shows you how to use the newest features in ColdFusion Builder 2.

ColdFusion Builder team blog


Provides latest news, updates, and other helpful information from the ColdFusion Builder team.

Set up a project and configure webserver in ColdFusion Builder


Movie tutorial that helps you set up a project and configure web server

Editor Enhancements in ColdFusion Builder 2


Movie tutorial that walks you through the editor enhancements in the release.

Debug ColdFusion applications using ColdFusion Builder


Movie tutorial that helps you with debugging applications



26
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Thank you

rakulkar@adobe.com

Twitter : @ram_kulkarni
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
© 2011 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
28