Category Selected:

tutorials

Blog

Tip of the Week: AOP Simple Interceptions in Handlers

Brad Wood |  September 05, 2012

 

ColdBox handlers all support these simple AOP-style methods that require no configuration to get running:
  • preHandler 
  • pre{Action}
  • postHandler
  • post{Action} 
  • aroundHandler
  • around{Action}

 

 

Read More

Tip of the Week: Action Arguments in Your Handlers

Brad Wood |  August 23, 2012

The methods in your handlers (actions) have always accepted the "event" object, which is the request context for that event and contains things like the request collection and private request collection.

Read More

Tip of the Week: The ForgeBox Community

Luis Majano |  August 15, 2012

 

We want to build a strong community around the ColdBox family.  That's why we have the ForgeBox source directory.  What is ForgeBox?  I'm glad you asked.  ForgeBox is a public collection of internal and community-contributed plugins, modules, widgets, interceptors and more that you can download and drop into your application to save you time and effort if the wheel you need has already been invented.  
 
Read More

Tip of the Week: Using Your customErrorTemplate Setting

Brad Wood |  August 09, 2012

 

ColdBox gives you several ways to deal with unhandled exceptions in your application such as the exceptionHandler event and the onException interception point to name a couple.  With either of those approaches, you can redirect the request to a different event.  If you don't redirect or abort the request though, ColdBox will eventually display the contents of your error template.  
 
By default the error template is /coldbox/system/includes/BugReport.cfm.  This file has the familiar "Oops! Exception Encountered" header.  While BugReport.cfm is chock-full of juicy error details (including the SQL of queries that errored), it isn't the kind of information you want to be revealing to the general public.  
 
This is where your customErrorTemplate setting from the ColdBox config file comes in.
Read More

Tip of the Week: View Caching

Brad Wood |  July 10, 2012
Do you have slow views whose output rarely or never changes? You can get an easy boost in performance by caching those views so they are not re-rendered on every request.

The following code shows two ways to cache the output from a view for a given number of minutes.
Read More

Tip of the Week: Using Implicit Views

Brad Wood |  July 03, 2012

Everyone should be familiar with the setView method in the event object which is used for a handler's action to tell the framework which view file should be used to render the event:

 

event.setView(view="general/index");

 

What you may not realize is that calling setView() is optional.  If you don't explicitly set a view file, ColdBox will then look for the view according to the executing event's syntax.

Read More

Tip of the Week: Using singletonReload for Development

Brad Wood |  June 27, 2012

Many of you using models in your ColdBox app are familiar with how easy WireBox makes it to use the Singleton Pattern for components that are only created once in the life of your app.  

This can also be a bit of a pain when you are working on the code inside your singleton objects.  Any changes require you to re-create the singleton object which typically involves a reinit of the framework.  ColdBox has a handy setting for you to use on your development environment called singletonReload.  

Read More

ColdBox Validation Engine for v3.5

Luis Majano |  February 26, 2012

Just a quick announcement that we now have finally implemented a validation engine and aggregator in ColdBox for 3.5 release.  And in true professional open source style, fully documented: http://wiki.coldbox.org/wiki/Validation.cfm.  It has an embedded validation engine but it also allows you to use ANY validation framework within ANY ColdBox application as long as it satisfies a few interfaces.  Check out our documentation page but here is a little teaser:

Read More