The Ortus BlogBox

"Ortus: A rise, beginning, coming into being, born, the origin!"

 

New ColdBox Addons - Transfer Config Factory and Transfer Decorator Injector Observer

Luis Majano
Oct 15, 2008

 

I am releasing today a set of addons for ColdBox-Transfer interactivity:

  1. TransferConfigFactory.cfc : A factory cfc that produces transfer configuration objects based on ColdBox Datasource configurations. This is thanks to Tom de Manincor
  2. TDOBeanInjectorObserver.cfc : A transfer observer based on Brian Kotek's amazing TDOBeanInjectorObserver in his Coldspring Utilities project, used to create rich decorators by injecting them with dependencies from Coldspring and Lightwire.  However, we had to take it a step further, so it can even inject dependencies from the ColdBox Cache.

You can download these tools from here. All you need to do to install them is drop them in the /coldbox/system/extras folder.  This will create a transfer folder that holds these cfc's inside of the extras folder.  That's it. Then you need to configure them via a coldspring.xml or a lightwire configuration object or manually (ohh brave one).  The tools have also been added to the SVN and I will be adding a link to them from the extra downloads section of the website.

Transfer Config Factory

This object is used to create a transfer configuration object based on the datasource information found in the ColdBox configuration file. This idea is thanks to Tom de Manincor and his musings in ColdBox-ColdSpring-Transfer.  This let's you maintain all of your application's configuration in one single location and not create a datasource.xml.  It is meant to be used alongside coldspring but it can be used as a separate object too (You will have to do the wiring).  Anyways, here is a sample coldspring declaration for this usage:

${Setting: TransferDSNAlias not found} ${Setting: TransferConfigPath not found} ${Setting: TransferDefinitionsPath not found}

As you can see, we first define the coldbox factory element and construct a datasource bean element with it.  We then setup the transferConfigFactory.cfc as a coldspring factory bean.  The last step is configuring the transfer factory. We send in a configuration bean and set it up as a call to our transfer config factory with the same parameters we are used to, except that for datasource we use the dsnBean element and have it referenced to the datasource that we want to use, in our case MyDSN, that we defined at the beginning. If you need a refresher on how the ColdBox Factory for IoC works, please read the following IoC Integration Guide. That's it. Simple as that, now you can define all your configurations via the coldbox configuration file and let coldspring do the heavy lifting.

TDOBeanInjectorObserver

This handy tools is based on Brian Kotek's original observer.  I want to say thank you to Brian for his contributions and incredible code. Thanks Brian. 

However, we have modified it to use ColdBox beanFactory plugin to do the autowiring for us.  For those familiar with the ColdBox autowiring conventions, you can do autowiring via annotations using the cfproperty tag or via setter injection.  Not only that, but you can use ColdSpring or Lightwire seamlessly, and to top it off, you can autowire objects from the ColdBox cache.  Here is a sample of some cool autowire annotations:

As you can see from the code we have two dependencies marked by their types: ioc and ocm.  The type of ioc means that this dependency must be injected from the ioc plugin (coldspring/lighwire) and the type of ocm means that the dependency must be injected from the ColdBox Cache.  The scope attribute is also useful as you can define in which scope or pathed scope you would like this dependency injected.  The default value is variables.

The theory behind this tool is to be able to very easily create rich decorators that can be injected with dependencies from the IoC container or the ColdBox Cache.  It is a great way to have your objects be composed of other objects and utilities. So let's see the coldspring.xml, but first, please note that the instructions below are for ColdSpring 1.2 that enables the usage of the lazy-init property. For Coldpsring 1.0, you will have to do some more manual work. (More instructions found in the cfc's themselves).

 

beanFactory true or false onDIComplete true or false

We first define the ColdBox Factory, then the beanFactory plugin we will use.  We then define our Observer with some cool parameters:

  • Transfer : The transfer bean reference
  • ColdBoxBeanFactory : The beanFactory plugin we just defined
  • useSetterInjection : A boolean variable that enables or disabled setter injection in preference of annotations via cfproperty. If enabled, it will do cfproperty annotations first and then look for setters.
  • onDICompleteUDF : The name of the UDF to call in your decorators once they have been injected with their dependencies.  The default value used is onDIComplete.  This means that you create a method in your decorators called onDIComplete or whatever you like and when the bean factory injects the dependencies, it will call this method afterwards. You can use this to do configuration or object setup.
  • debugMode : This boolean variable is part of the bean factory plugin. If set to true, it will log to the logging facilities all the interactions when trying to autowire the objects.

That's it folks. Once application starts up, coldspring will create and register this observer for you. So when transfer objects are created and have autowire dependencies, they will be wired up.

ColdBox MVC, Tutorials, Tutorials 0

Early Bird Pricing on ColdBox Training ends in 4 days!

Luis Majano
Oct 15, 2008

 

The early bird pricing for the ColdBox Training Seminar ends in 4 days, so get to it and register online.

ColdBox MVC, News, Training 0

Some ColdBox Forums Data Lost!

Luis Majano
Oct 15, 2008

 

I had a huuge scare today when my hosting provider's raid system fell and I got corruption on my databases. They where able to recover about 95% of my data, but I lost about 10 days worth of data on the forums and other applications. Although unfortunate, it was not tragic. If you created a forums account or posting since july 20th, please note that they are in limbo now!! Sorry for the inconvenience

ColdBox MVC, News 2

ColdBox Eclipse Plugins Updated

Luis Majano
Oct 15, 2008

 

A new update version 1.0.4 is now online at the eclipse update site. So please update your ColdBox Eclipse plugins to get the latest and greatest. If you don't know how to update your plugins, just head to the Eclipse Plugins Installation Guide Thanks

ColdBox MVC, News, Releases 0

Implicit Views in ColdBox

Luis Majano
Oct 15, 2008

 

I really forgot to blog about this, but Tony Garcia has done an incredibly useful post about how to go about setting up ColdBox for Implicit Views. As part of his trajectory I even committed an update to the layout manager due to what he was trying to do. I really recommend that you read this article if you love conventions. Great Job Tony!!

ColdBox MVC, Tutorials, Tutorials 0

Coldbox and the CFEclipse Frameworks Explorer

Luis Majano
Oct 15, 2008

 

I believed that this functionality was already enabled in the distro of CFEclipse, but like Marc Esher confirmed it has been left out. So if you are reading (mark drew), por favor activalo amigo!! Anyways, he wrote a cool guide on how to activate it and it is very simple. Please go to his blog and read this article.

ColdBox MVC, Tutorials 0

Two new members to the ColdBox Team: Tom de Manincor and Ernst van der Linden

Luis Majano
Oct 15, 2008

 

I want to welcome two new members to the ColdBox Team today, Tom de Manincor and Ernst van der Linden.  Their dedication and contributions to the project have been incredible over the years. We are also good friends and best of all we where all in different locations. Tommy is now living in California, but before he was all over the place :).  Ernst is from The Netherlands and talk about world collaboration. I am truly excited that our commitment to this project is strong and growing.  We are producing some very exciting new funtionalities and tools to help developers achieve their goals even faster. The future of ColdBox is bright and shining like ever before.

Let me start with Tommy. I met Tommy at my previous employer and he was one of the pioneers of the first non-public versions of ColdBox. He was involved with project direction and implemented several projects using our first iteration framework. Over the years he has truly become an OO guru and keeps pushing things to the limit.  His New York accent and attitude always comes out and its always funny to talk to.   We are currently working on some cool cluster communications and messaging that will become available for ColdBox in the near future.  Welcome aboard Tommy!!

I met Ernst online, like we all do. He has been a big advocate of ColdBox since day 1 and he produces some incredible software applications with it.  He has been contributing to ColdBox in all areas of development, from testing, bug reporting, sample creations, architectural and design issues and our new top secret project called: Project SideBar, which will be announced in the coming months. So welcome aboard Ernst.

Below are the bios and links:

Tom de Manincor - http://www.tomdeman.com/blog/

I have been working with ColdFusion since 4.5 Express was released. Its been a pleasure to develop in a language that has grown to be so powerful. I had the luxury of working with Luis Majano, creator of Coldbox framework, back in 2004. A great educator and programmer. Who introduced me to another great mentor of mine, Rob Gonda, creator of AjxCFC. Another very talented and knowledgable resource. Like them, I share a passion for my work, and a pride in sharing it with the community. I have developed in mama's spagetti code, a handful of frameworks, and everything in between.

As of late, I have been focusing my efforts on Object Oriented programming with Cold Fusion. I try to learn as much as I can about design patterns, best practices, and new ways to blow my mind with code.

I am currently the Lead Developer with Blush Media, LLC out in El Segundo, California. Developing a number of applications in Coldbox, Coldspring, and Transfer.

Ernst Van der Linden - http://evdlinden.behindthe.net

A software architect: primarily using ColdFusion and Java in combination with SQL databases.

Began programming in 1988 on a Commodore 64 and started with Coldfusion in 1996. He has designed applications for companies such as General Electric, Philips and Shell.

In 1999 Ernst van der Linden launched his own software company BehindThe.net which builds HR Management Software for multinationals.

ColdBox MVC, News 4

ColdBox Training Early Bird Extended

Luis Majano
Oct 15, 2008

 

We have extended our Early Bird Pricing until August 31st, 2008 to allow time for other people to benefit from this great price. You can register online by visiting http://www.coldboxframework.com/index.cfm/support/training and clicking on the Register Now Button.

ColdBox MVC, News, Training 0

Over 3000 ColdBox downloads already!!

Luis Majano
Oct 15, 2008

 

I was really impressed and happy to report that there are over 3000 ColdBox downloads since the new website a couple of months ago. It seems that the downloads keep increasing and so does the documentation :) I just want to thank the entire ColdBox team for their work and perseverance in this great project. Keep up the good work guys!!

ColdBox MVC, News 2

ColdBox Platform Training Outline and More

Luis Majano
Oct 15, 2008

 

Below you can see our press release dealing with ColdBox training. It covers our early bird pricing and Course Outline. So remember that you can register online now.

ColdBox Platform Training
training@coldboxframework.com
http://www.coldboxframework.com/index.cfm/support/training

ColdBox Platform Training Seminars Releases October 2008 Outline and Extends Early-Bird Special Pricing

Rancho Cucamonga, CA, August 5, 2008 - ColdBox Platform Official Training Seminars today released the Course Outline for their October 2008 ColdBox Platform 101 seminar to be held in Dallas, Texas, and also announced that the Early-Bird Special Price of just $1,195 has been extended through August 31, 2008. Registrants can take advantage of this $200 savings over the full seminar price of $1,395 by completing their registration before 5PM (Pacific Daylight Time) on August 31, 2008.

Course Outline

Unit 1

  • Course Introduction
  • ColdFusion Components
    • Overview
    • Best Practices
  • Effective Web Application Architecture
    • MVC Architecture
    • What is a Model?
    • Domain Modeling
    • Service Layers
    • IOC
  • ColdBox Platform Introduction
    • What is a framework
    • Why use a framework
    • What is ColdBox
    • ColdBox Application Request Life Cycle
      • ColdBox's Front Controller
      • Event Driven Framework
      • SES routing overview
      • MVC Request Life Cycle
      • Remote Request Life Cycle

Unit 2

  • ColdBox Installation
  • Reference & Development Tool Installations
  • ColdBox Dashboard
  • A ColdBox Application Field Trip
    • ColdBox Debugger
    • Directory Structure & Conventions
    • ColdBox's Main Components

Unit 3

  • The ColdBox Configuration File
  • URL Actions
  • The ColdBox Setting Structures
  • The Request Context Object

Unit 4

  • Pretty URLs SES Routing
  • Framework Super Type
    • Understanding the basic Framework class
    • Reserved Words & Methods
  • Event Handlers

Unit 5

  • The ColdBox Layout Manager
  • ColdBox Plugins Architecture
  • Core Plugins
    • Storage Plugins
    • Utilities Plugins
    • Visual Plugins
    • Internationalization
    • RSS/Feeds

Unit 6

  • ColdBox Interceptor Architecture
  • Core Interceptors
    • SES
    • Environment Control
    • Autowire
    • Security Interceptor: Securing your application

Unit 7

  • ColdBox Proxy
  • ColdBox-Ajax Integrations
  • ColdSpring/Lightwire Integration

Unit 8

  • ColdBox Event Handler Unit Testing
  • ColdBox Best Practices

The ColdBox Platform 101 Seminar is a 2-Day Introduction to ColdBox and ColdBox Platform Application Development providing 16+ hours of intense, hands-on training with ColdBox author Luis Majano and other qualified ColdBox Trainers in an intimate setting with only 15 seats available. Attendees will be guided through a quick overview of ColdBox and then step-by-step instruction on putting ColdBox to work for themselves in their own applications. The skills learned in this seminar can be immediately applied to a developer's daily tasks.

For more information on ColdBox Platform Training or to register, please visit the ColdBox Training web site.

ColdBox MVC, News, Training 0