Today I was getting ready to send a file from my app to the browser for the user to download. I was all set to use cfcontent to do this, but knowing ColdBox I thought I would do a quick check to see if the framework had any nice convenience methods for me to use to make life easier and sure enough... sendFile() in the core Utilities plugin.
getPlugin("Utilities").sendFile(file="test.txt");
So, this post is just a quick word of advice. Don't reinvent the wheel. If you are doing something, anything common, check the docs and see if ColdBox can do it for you. You will be amazed at whats available in the core plugin set already for you to use.
Plug IT IN
Here are just a few I use commonly.
ORMService - generic ORM Service helper for Hibernate
QueryHelper - all sorts of goodies in here, sorting queries is one of my favorite. Or the querySim.
Validator - all sorts of standard validation methods here. checkEmail and checkIPAddress are my favorites.
FileUtils - This is a utilities library that are file related. Lots of fun methods here.
Utilities - A good mix of a variety of handy methods, like todays gem sendFile()