Blog

CommandBox and URL Rewrites Made Easy

Brad Wood |  March 02, 2015

Once you start using the embedded server for your development projects, you may wish you enable URL rewriting. Rewrites are used by most popular frameworks to do things like add the index.cfm back into SES URLs.

You may be used to configuring URL rewrites in Apache or IIS, but rewrites are also possible in CommandBox's embedded server via a Tuckey servlet filter.

Read More

Attention: MessageBox is Now a Module

Scott Coldwell |  February 27, 2015

The beloved MessageBox plugin has been a staple of the ColdBox platform since the beginning. With ColdBox 4.0 it's still available, but if you don't need it, you have the freedom to leave it out.

<...
Read More

Package Wizard

Luis Majano |  February 27, 2015

One of my personal favorites of CommandBox is the introduction of step-by-step wizards for some complication creation processes like a new package or a new ColdBox application.  It will take you by the hand and never let you go :) Here is the way to initialize a new package with our nice wizard:. First let's go into our interactive shell by typing box or opening the box binary.

Read More

Intro to box.json

Nathaniel Francis |  February 26, 2015

In ForgeBox package management, the box.json file contains data related to your package. This post covers a good base for what minimum attributes to include to get your package loaded up to ForgeBox and make it CommandBox friendly.

Read More

ColdBox 4.0 Removed Plugins

Brad Wood |  February 26, 2015

ColdBox Plugins have graduated to become just models. The plugins convention has been removed and all references to plugin injection or DSL's are gone. You must now place all your plugins in your models directory and request them via getInstance() or getModel() calls.


Plugins are an old ColdBox convention but their baggage doesn't really serve a purpose now that we have modules for easy packaging of libraries and WireBox for easy creation of CFCs. Neither of those existed back when Plugins were birthed. It's time to say goodbye to the concept of plugins, but all their functionality will still be here, just with a slightly different (and more standardized) way of creating them.

Read More

CommandBox Embedded Server

Brad Wood |  February 25, 2015

One of the most useful features of CommandBox is the ability to start an ad-hoc server quickly and easily. Any folder on your hard drive can become the web root of a server. To start up the server, cd into a directory containing some CFML code, and run the start command. An available port will be chosen by default and in a few seconds, a browser window will open showing the default document (index.cfm).

CommandBox> cd C:\sites\test
CommandBo...
						
						
					
Read More

The UDFLibraryFile setting is now "applicationHelper"

Scott Coldwell |  February 25, 2015

If you have a ColdBox config setting UDFLibraryFile, then you'll want to change it when upgrading to ColdBox 4.0. It functions the same, but is now called applicationHelper.

applicationHelper is an optional setting where you can declare the path to a UDF template to load for usage in the views, layouts and event handlers. You can use relative paths to your application's root or ColdFusion mappings.

For example if I have my udf templat...

Read More

Developing for CommandBox - When are Errors a Good Thing?

Gavin Pickin |  February 24, 2015

CommandBox is a whole system in itself, and when developing for CommandBox, like you would other applications, debugging is important. By default if you have any errors in your code, CommandBox outputs the error message, and a stack trace to the user in the console… and they will be returned to the prompt. This is great for you as a developer of said command, but its not very user friendly, so how can or should you handle errors in CommandBox.

Read More

Module Bundles in ColdBox 4

Luis Majano |  February 24, 2015

With the advent of so much more functionality in modules, in ColdBox 4 we added the ability to group modules in a single directory we lovingly call The Module Bundle.  This feature became a reality due to a real client's need of being able to logically separate modules into logical buckets.  His application had an extensive amount of modules and he wanted to further segregate them, thus module bundles became a reality.  

 

Read More

Interactive Shell vs Native OS

Brad Wood |  February 23, 2015

There are two ways to run commands via CommandBox: inside the CommandBox interactive shell, or one-at-a-time commands from your native shell.

Multiple Commands

If you open the interactive shell, you will see the CommandBox splash screen (ASCII art) and then you'll be presented with the CommandBox> prompt. You can enter as many commands as you wish in order and after each command is finished executing, you will be returned to the CommandBox prompt. If you have multiple commands you want to execute manually, this is the fastest method since CommandBox only loads once. This is also the only way to make use of features like tab complete and command history.

Read More