Coder's Revolution

Do you want a revolution?

Category Filtering: 'commandbox'

A Peek Inside the New TestBox Watch Command

CommandBox

So this is a short one to just showcase how one of our new features in the CommandBox 3.7 beta works.  What does it do?  The new command is testbox watch and it will stay running in the foreground and monitor your app for any file changes.  When a file change it detected, it runs your tests from the console and outputs the results so you can get instant feedback on save as to whether you just broke something.

0

Why writing CLI scripts in CommandBox is better than Node

CommandBox

So this post is a response to some blog comments on this post I made today extolling the features of creating native CLI scripts in CFML with CommandBox.  I mentioned in passing that Node is a popular tool for this, but I felt CommandBox had improved the mousetrap so to speak. I also acknowledged by bais as the lead developer of CommandBox, but I stand by my comments. Adam Cameron, in his eternal quest to keep me honest was a little incredulous though, and wanted to see some better proof of my claims.  Instead of elaborating in the comment section, and since I'm well into the "opinion" territory, I decided to respond in a blog post on my personal blog.  

3

Using a ForgeBox Playground with CommandBox

CommandBox, General

Here's a quick post on a somewhat-undocumented feature of CommandBox.  I say "somewhat" because if you type "config set" and hit tab from the interactive shell, we'll auto-suggest this setting, so it's not impossible to find but I've not put it in the official docs.

So, here's the setup.  You can pretty much do anything you want with the ForgeBox website entirely through the CLI.  That includes creating accounts, logging in, publishing packages, updating packages, listing packages, and searching packages.  This is made possible by our nice (Coldbox-powered) REST API that's part of the ForgeBox site that the CLI interfaces with.  

Sometimes you may wish to play around and try out the commands to create users and packages, but you hate to create a lot of dummy data that clogs up the database or shows on your profile.  The fix is to point your local CommandBox CLI over to our staging instance of ForgeBox.  This is as simple as setting a single config setting from the command line and the change takes instant effect for all your ForgeBox interactions.  Just remember, this setting is remembered until you change it back so don't forget.  

0

CommandBox Multi-Server Support Now In Beta (v3.1.0)

ColdFusion, CommandBox, Lucee, Railo, Server Administration

I've been just giddy testing the new Multi-server support in our latest CommandBox 3.1.0 beta.  I never knew starting up a ColdFusion 9 server could be so exciting.  Well it is when you just have to type:

CommandBox> start [email protected]

That's it. You don't need a single thing installed prior other than CommandBox.  Everything necessary will be downloaded and, depending on your internet connection speeds, you'll have a new server running in less than 60 seconds.  Don't worry, it's not limited to ColdFusion 9.  We also are supporting Adobe ColdFusion 10, 11, and 2016 as well as Railo Server 4.2 and Lucee Server 5.0 rc!

5

Exciting New Features In The CommandBox 3.1.0 Bleeding Edge

ColdFusion, CommandBox, Lucee, Railo
Hi all, we've been hard at work on ForgeBox 2.0 and the corresponding CommandBox CLI features that focus on your productivity in publishing packages and keeping them up to date as well as tracking all the versions of your dependencies.
 
For starters, the ForgeBox 2.0 isn't published yet in production.  If you download the bleeding edge of CommandBox (3.1.0) you will be pointing to our stage server.  it's a recent backup of production data, but since the new ForgeBox site is a rewrite on top of an updated data structure, it needs to be a separate database.  So, feel free to use it, but remember you're not going to be installing or publishing to the live ForgeBox site yet until we roll out this release.
0

Coming To dev.Objective()? Attend My Sessions!

CFML, CommandBox

I'm super excited for dev.Objective() coming up in a week.  I originally only had one dev.Objective() session, but due to a cancellation I was able to get a second.  My first session will be 

GO COMMANDO, WITH COMMANDBOX! CLI + REPL + PACKAGE MANAGER FOR CFML

This will be similar to what I gave at CF Summit last year, but with a lot of new and exciting additions. If you're not familiar with CommandBox or not using it, this will be a great session to get started with.  

My second session (the late addition) is

RASPBERRY PI A LA CFML

A Raspberry Pi is a $35 credit card-sized computer that runs Linux.  I have been playing around with running CFML on a Pi which has resulted in a Pi-hosted CFML blog as well as some fun CFML-controlled hardware.  I'll be showing how to easily and quickly get CFML running a Pi as well as demoing some of my projects.  

Ortus will also be giving away a Raspberry Pi at our booth during dev.Objective() so please stop by.  I'm looking forward to seeing everyone!

2

CFML & CommandBox, Tools Of Biblical Proportions

ColdFusion, CommandBox, Lucee, Railo, Technology

In the beginning was the Web, and the Web was with CFML, and the Web was CFML. It was with CFML in the beginning. Through it all websites were made; without it no websites were made that had been made. In it were tags, and those tags were the productivity of all programmerkind. The productivity shone in the darkness, and the darkness did not overcome it.

Ok, maybe I'm overstating CFML a bit, but when it was created it was revolutionary.  It redefined how websites were built and set the bar for other web programming languages.  And though CFML led the pack for a while, there were soon others to follow.  These languages were also productive, came with compelling frameworks, and made building sites fast and fun.  Many of these servers were also free and open source and around them large communities grew.  

3

CFML, Good Discussions, And Misinformation

ColdBox, ColdFusion, CommandBox, General, Java, Object Oriented Design (OOP), Railo, Technology

So this blog is a bit of a spill over from a Twitter conversation I had today with Stefan Mischook, a PHP programmer and maker of all sorts of training videos at www.studioweb.com and www.killersites.com.  A few years ago, Stefan uploaded a video blog to YouTube titled "Should you learn Coldfusion?" (sic) where he presented a not-so-glowing review of ColdFusion through the lens of circa 2003.  I've seen the video before come up in YouTube searches.  Part of that is a testament to the pathetically small amount of actual CFML content on YouTube.  While I've recorded a number of screencasts and webinars that are posted online, they're all on Vimeo or Adobe Connect so alas I'm not contributing to that specific site.  

15

CommandBox Documentation Now On GitBook

CommandBox

Luis and I are moving forward with the  documentation as a GitBook.  GitBooks are comprised of markdown files stored in a GitHub repo and can be: 

One of the coolest things is that the community can submit updates and additions to the book via the standard Git pull request process.  Just fork the repo, made edits with the Windows/Mac book editor, commit and pull. Please check it out and provide any feedback:
 
 
Also, please help us spread the word to those interested in CommandBox who haven't tried it yet.  I just finished the Getting Started Guide yesterday:
 
 
And for anyone interested in seeing how it's made, the Git repo for the book is here:
0

How CommandBox Has Changed The Way I Help People On The ColdBox List

ColdBox, ColdFusion, CommandBox

I spend a lot of time answering questions on the ColdBox Google Group.  Perhaps too much time, since it's all volunteer, but alas I enjoy helping people.  Often times people can't get something working in their site like they want.  It may involve optional ColdBox libraries, specific handler setups, or modules.  The best way to help them is to actually create  their setup locally on my PC and try it out.  Of course, this can be a prohibitively time-consuming process just to answer a question.  

Boilerplate Drudgery 

I do most of my development on Railo, and setting up a new site consisted roughly of the following:

  1. Add hostname to hosts file tat resolves to localhost like myProject.dev
  2. Create a folder somewhere on my hard drive to host the root of the site
  3. Add new context to Railo's server.xml using the same hostname and web root
  4. Add site to Apache w/permissions and reverse proxy and rewrites
  5. Restart Railo and Apache

Now, if this was a ColdBox site, I would also need to:

  1. Visit the coldbox.org download page
  2. Download the necessary version of ColdBox
  3. Unzip it into the web root
  4. Grab an application template, or use the ColdBox platform utilities in CFBuilder IF I have a project set up for this site.

Wow, NOW I'm ready to start replicating the user's issues.  That's a lot of work for a one-time site I'm going to delete in 20 minutes.  Now, what happens when I want to tell the other user how to set up the same site to test on their end?  I think you get the picture.  To be honest, I usually didn't bother and would just throw out a guess as to what the user's issue was.

Work Smarter, Not Harder

Enter CommandBox.  This is a CLI, Package Manager, and REPL and comes with an embedded server and a growing list of generator commands.  This means I  can open up a console and in a few SECONDS have a brand new site created in a folder of my choice with ColdBox installed, an application template generated, modules or handlers installed, you name it.  And then I just type "start".  That's it.  About 3 seconds later a browser window opens and I'm using my new test ColdBox app.  

Let's take a look at the commands I used earlier today to test URL routing to two different handlers with the same name in different subdirectories.  

mkdir myTestSite
cd myTestSite
coldbox create app myApp --installColdBox
coldbox create handler event userlists
coldbox create handler pdt\real\ldr\ldr_nm\ldr_portal\ldr_agt\event userlists
start --!openBrowser --force
server open URI="/index.cfm?event\=event.userlists"
server open URI="/index.cfm?event\=pdt.real.ldr.ldr_nm.ldr_portal.ldr_agt.event.userLists"

That created an app that exactly matched what the original poster had reported and even opened up the test URLs after starting the server.  What's even better is I actually threw those commands in a recipe file called makeSite.boxr so I could tweak the recipe and run it repeatedly like this:

recipe makeSite.boxr

This is the beauty of making something automatable!  Then, I pasted those commands back into the mailing list so the user could try the same thing I did.  And when I was done, I just stopped the server with the "stop" command and removed the directory.  It's like it was never there.

CommandBox has changed the way I develop.  Admittedly more than I ever thought it would.  Spinning up test sites, installing/uninstalling modules, or even trying out a few lines of ad-hoc code with the REPL is so easy now.  I even use CommandBox for my client work too.  I can start up multiple dedicated servers based on what I'm working on that day, and just stop them when I'm through.

3