Professional Documents
Culture Documents
#90
Get More Refcardz! Visit refcardz.com
CONTENTS INCLUDE:
n
n
Introducing Adobe ColdFusion Builder
Installing Getting Started with
Starting a New Project
n
Connecting to Servers ® ® ™
n
Introduction to Views
n
Working with Code and more...
By Terry Ryan
• Give your project a name: SampleProject
INTRODUCING ADOBE COLDFUSION BUILDER • Uncheck the Use Default Location check box
• Hit the Browse button and navigate to your
ColdFusion Builder is Adobe’s new IDE designed to deliver
ColdFusion webroot
truly rapid application development using its ColdFusion server
• Create a new folder named SampleProject
product. It is the first IDE dedicated specifically to ColdFusion
• Make sure it is selected and click Choose
since Macromedia turned out its last release of ColdFusion
Studio back in 2001. ColdFusion Builder is based on Eclipse, • Click Finish
and not the previous tool. Therefore it works easily with
Adobe® Flash® Builder™ and other Eclipse plugins.
INSTALLING
Plugin
The plugin version requires you to have Eclipse already setup
on your machine. It installs itself as a plugin into that copy.
Getting Started with Adobe ColdFusion Builder
So all of your screens will still say Eclipse, and ColdFusion will
just be another perspective. This can be any version of Eclipse
you have pulled down from eclipse.org, or a packaged Eclipse To start experimenting with ColdFusion Builder we will need a
install like Flash Builder. ColdFusion file, called a “template”.
ColdFusion Builder wants to know about the servers that ColdFusion Builder’s tooling is divided into several forms
you develop on. By having that information it can allow you called views.
to manage the servers through the IDE, get extra logging
information and browse datasources and file systems on Navigator
the server. It also allows ColdFusion Builder to provide The Navigator is a basic view that comes with Eclipse. It allows
“code insight” which means that the IDE knows about the you to see and organize your projects and files.
components, methods and variables that you are currently
One of the overlooked featured of this view is the concept
working with.
of “Working Sets.” They allow you to group various projects
It’s recommended that you do your development against a together and then selectively show or hide groups. This is very
locally installed version of ColdFusion on the same workstation effective when you have tens of projects split amongst many
as ColdFusion Builder. We’re going to assume you have a clients. This can allow you to only see your current projects
default install of ColdFusion running the ColdFusion Web without having to go through the trouble of archiving and
Server. If you are using your own Web server like Apache or IIS removing projects that you aren’t working on but could pick up
your settings may vary. at any moment.
Servers the Outline view, filter for functions, and then sort alphabetically.
We used the Server view previously to add a server. However it
RDS Views
can do more. Through this interface you can do the following:
RDS stands for Remote Development Services in the
• See current status ColdFusion world. It allows developers to access key pieces of
• Start/Stop/Restart Server information about a remote server. It has be be setup as part
• Launch the Administrator of your ColdFusion server install. Be aware that it is perfectly
• Launch the Server Monitor reasonable to have installed on your local install of ColdFusion,
but it is discouraged on public facing or shared hosting
machines due to the large amount of information it makes
available.
RDS Dataview
RDS Data view allows you to see and interact with datasources
that you’ve setup on your ColdFusion server. It allows you
to see tables, views, columns, and column definitions. Using
Console context menus from this view you can activate the RDS Query
When you start your ColdFusion server via the Servers view, the Viewer.
Console output for the server is printed here. This can be very
useful for seeing errors occur in real time. Also content that
is written to the main application log for your server will show
up here. So you can use CFLog to make content appear in the
Console.
Tail View
Tail View allows you to see the contents of a file updated in
real time. This is very useful for targeting the error log of your
ColdFusion server. However it’s important to note that you are
not limited to ColdFusion logs. Any text file on your system
can be seen this way, like your Web server logs, or mail logs.
Service Browser
The Service Browser shows you all CFCs that are installed
under a ColdFusion server’s webroot. It allows you to inspect
all of the methods, see arguments, and filter for access.
DZone,
DZone, Inc.
Inc. || www.dzone.com
www.dzone.com
4
Getting Started with Adobe ColdFusion Builder
▪ Trigger Text: qd
▪ Start Block:�
<cfoutput>#DateFormat(Now())#</cfoutput>
▪ Click Ok
You should now have a snippet named “Quick Date” in your
Snippet View.
Code Insight
While code assist is about knowing what the language is
capable of, Code Insight is about knowing what the code you
are writing is doing. This will allow you to make references
to scopes, variables, and components that you have written,
and get drop down lists of variables, and methods in those
structures.
To use a Snippet:
To see Code Insight in action:
• Open index.cfm • Open and delete any code in index.cfm.
• Double Click “Quick Date” in the Snippets View • Type <cfset test = New
• Date code should appear • Hit Space and wait.
However we can do that even faster. Delete that quick date in • A drop down list of components should appear
index.cfm. • Type Sam; the drop down list should now only have
SampleProject.utility().
To use Trigger text:
• Hit Enter
• In index.cfm type “qd” • You should have <cfset test = New SampleProject.utility()
• Now hit CTRL + J • Close it up with >
• Date code should appear • Type <cfset date = te and wait
• A drop down list with just test should appear
WORKING WITH CODE • Hit Enter
• test should appear
The ColdFusion IDE main purpose is to write ColdFusion code. • Type . and wait
There are a number of features that make the possible. • getToday() should appear
Code Assist � • Close it up with >
Code Assist refers to ColdFusion Builder knowledge about • Type <cfdump var =”#date#”/>
the CFML and CFScript languages. When you are typing • Preview the page with the browser tab
out ColdFusion language constructs, it can prompt you with
attributes speeding up your coding. Those dropdown lists for both component and methods were
the Code Insight feature in action.
To see Code Assist in action:
• Open and delete any code in index.cfm.
Refactoring
Refactoring encompasses a lot of things. In ColdFusion
• Type <cfmail
Builder this feature was installed with only one of those things,
• Hit Space and wait
method renaming. This allows you to rename a method, and
• A drop down list of attributes should appear have references to that method also be renamed, without
• Type su; the drop down list should only have subject having to manually find and replace those references.
in the list
• Hit Enter To Rename methods:
• You’ll have subject=”” with your cursor between the • Open index.cfm.
quotation marks. • If you have just done the Code Insight Example,
continue, if not delete the contents of index.cfm, replace • Click Adobe CFC Generator.zip and click Open
and save with this code: • The Extension wizard will open
• Click Next
<cfset test = New SampleProject.utility()>
<cfset date = test.getToday()> • In Select Server choose localhost
<cfdump var =”#date#”/> • Click Finish
• When you are notified of success, click Ok
• Now open utility.cfc and highlight function name
getToday() Using Extensions
• Right Click and choose Refactor > Rename ColdFusion Builder extensions can be used in a variety of ways.
• For New Name type getCurrentDay They can generate code. They can analyze code. There’s even
• Then Click Preview one that will translate content in your editor window from one
• You should see a list of all of the changes that written language to another, using the Google Translation API.
will be made In short they can do anything ColdFusion can do.
• Click Ok
The Adobe CFC Generator is a basic code generator.
#82
CONTENTS INCLUDE:
■
About Cloud Computing
Usage Scenarios Getting Started with
n
Aldo
■
Cloud#64Computing
■
Underlying Concepts
Cost
by...
■
Upcoming Refcardz
youTechnologies ®
Data
■
t toTier
brough Comply.
borate.
Platform Management and more...
■
Chan
ge. Colla By Daniel Rubio
tion:
dz. com
tegra ternvasll
ABOUT CLOUD COMPUTING one time events. TEN TS
INC ■
HTML LUD E:
us Ind Anti-PPaat
Basics
Automated growthHTM
ref car
nuorn
■
Valid
ation one time events, cloud ML
connected to what is now deemed the ‘cloud’. Having the capability to support
ul M.
computing platforms alsoulfacilitate
4 Open the gradual growth curves
n an
Page Source
o
■
s
Vis it
C
faced by web applications. Tools
Core
By Key ■
Elem
atte
has changed substantially in recent years, especially with Structur
E: al Elem ents
INC LUD gration
NTS
P the entrance of service providers like Amazon, Google and Large scale growth scenarios involvingents
specialized
and mor equipment
rdz !
HTML
CO NTE Microsoft. es e... away by
(e.g. load balancers and clusters) are all but abstracted
Continu at Every e chang
m
About ns to isolat
relying on a cloud computing platform’s technology.
Software i-patter
space
Adobe Catalyst
rdz .co
■
n
Re fca
e Work
Build
riptio
and Ant These companies
Desc have a Privat
are in long deployed trol repos
itory web applicationsge HTM
L BAS
■
to mana
Patterns Control
■
that adaptDeve
lop softw
and scale to
n-con
large user
a versio bases,ng and making them In addition, several cloud computing ICSplatforms support data
les to ize mergi
ment
rn
Version e... Patte it all fi minim le
tier technologiesHTM
Manage s and mor e Work knowledgeable in amany
ine to
mainl aspects related tos multip
cloud computing. that Lexceed the precedent set by Relational
space Comm and XHT
■
ref ca
Build
re
OUS
Flash Builder 4
chang
ding code Level
as the desc
the ima alt attribute ribes whe
www.dzone.com
a Task
ive data pt. Server-s
ce
NTINU of buil tr what it is a cloud computing es as platform can offer your ut web output e in clien ment.
T CO cess ion con it chang e witho likew ide lang t-sid e ge is describe re the ima
ise use mec hanism. fromAND
e name CLOUD COMPUTING PLATFORMS
the pro ject’s vers applications. and subm sourc
ABOU (CI) is
with uniqu are from web
The eme pages and uages like Nested
unavaila s alte ge file
rd z!
Maven 3
reposit ed via particul tions that e Pay only what you consume
tagge or Amazon’s cloud you cho platform
computing
the curr isome
heavily basedmoron fine. b></ ed insid
anti e imp a></
For each (e.g. WAR
ent stan ose to writ
lain the t
es more e
not lega each othe
and x” solu b> is
be exp text) to “fi duc Web application deployment ge until
nden a few years
t librari agonmen was similar app ortant,
ns are to pro packa t enviro industry standard
that will softwaredardand virtualization
e HTM technology.
Mo re
DZone, Inc.
ISBN-13: 978-1-934238-70-7
140 Preston Executive Dr. ISBN-10: 1-934238-70-8
Suite 100
50795
Cary, NC 27513