Saturday, July 16, 2011

02 Installing ColdBox

I will not explain all the different ways to install ColdBox.
One way is enough to get you started, and once you are familiar with the framework you can explore the ColdBox Wiki for other ways to install it. Obviously this is not for your production server! It is just a way to get you started on your development machine.

Plain and simple:
  • Download the latest code: ColdBox Bundle
  • Unzip the file to a folder named "coldbox" in your webroot
That is it! Your development server is now ColdBox enabled.

I could now tell you to get the latest MXUnit code and unzip it to your webroot, but you don't need it to get started with ColdBox. I will save
that for a later blog when we dive into Unit Testing.

What I will advise you (and show you) is to download some plugins for Eclipse, ColdFusion Builder 1 or ColdFusion Builder 2. (don't worry, they all use the same plugin; just the method of installing will be slightly different for each IDE).

Those plugins will make your life easier AND I will be using them for my studies/tutorial.

Prepare ColdFusion Builder 1 for ColdBox development

I am still using ColdFusion Builder 1 so I will show you how to install the plugins for my IDE, but there's ample tutorials out there on how to install it on the other IDEs. In fact, I struggled to get things working on CF Builder 1 as most tutorials handle CF Eclipse or CF Builder 2.

Using the plugins in the three IDEs above is pretty much the same (as all three are Eclipse based) so folowing the study/tutorial will be possible regardless of the IDE you are using.

Lets be prepared and download everything we need:
  • ColdBox Platform Utilities
  • ColdBox CFBuilder Syntax Dictionary
  • ColdBox CFBuilder Snippets
Download it at ColdBox Extra Downloads.
The Platform Utilities are the same for CFEclipse and CFBuilder.
Where the Dictionary and the Snippets are concerned, you will find separate files for CFEclipse.

Step 1 - ColdBox Platform Utilities

In CFBuilder select the menu item Window - Show View - Other...


In the popup select ColdFusion - Extensions and click OK.


In the extension window, click the plus sign to add a new extension.
As you can see I am cheating because I already have the extension installed...


After clicking the plus sign you can browse for the ColdboxPlatformUtilities.zip file and you are good to go. CFBuilder 1 now has some super duper ColdBox 3 capabilities.

Step 2 - ColdBox CFBuilder Syntax Dictionary

Locate your ColdFusion Builder installation folder, go to plugins, then com.adobe.ide.coldfusion.dictionary_x.x.x.xxxxxx and finally dictionary.

You may have multiple com.adobe.ide.coldfusion.dictionary_x.x.x.xxxxxx folders, just take the most recent one. This is due to an update of CFBuilder and bad clean-up afterwards. (I suspect)

In my case:
D:\Program Files (x86)\Adobe\Adobe ColdFusion Builder\plugins\com.adobe.ide.coldfusion.dictionary_1.0.0.274293\dictionary

Copy the coldbox.builder.xml file that is in the cfbuilder_dictionary.zip archive you just downloaded into that folder.

Next edit the dictionaryconfig.xml to let CFBuilder know about the new dictionary, and whoosh, CFBuilder now has code completion for ColdBox features.

Step 3 - ColdBox CFBuilder Snippets

In the cfeclipse-cfbuilder-snippets.zip archive you downloaded you will find a readme file that states:

Just place the ColdBox snippets folder under your snippets directory of your CFEclipse or CF Builder installation.

To find your snippets folder do the following:

Click on Window > Preferences > ColdFusion > Snippets

On the right panel, you will see the snippets directory. There is where you place these files.

This was written by the one and only 'daddy' of ColdBox: Luis Majano

Do that and paste the content of the snippets folder from the archive into the folder you have just found.
In case you already had some snippets that you assigned hotkeys to, don't overwrite the KeyCombos.properties file. Rather open it with any text editor and paste the content of the one in the archive into your existing file.

And that's it, now you have some cool snippets at your disposal.

Last and maybe least

You can enable ColdBox help and References in your CFBuilder by clicking Help - Install New Software

In the popup window type the URL: http://www.coldboxframework.com/distribution/eclipse/

Check the Help & Reference box and click next. Follow the instructions and you are done!

Congrats, you now have a killer of a ColdBox IDE. Enjoy the benefits!

Now lets use these tools and create a ColdBox project.

No comments:

Post a Comment