Photo from Chile

Presenting at cf.Objective() in May

When I started blogging seriously, around 9 months ago, I had my reasons. I wanted to give something back to the ColdFusion community, from which I had received so much. I wanted to learn about new and interesting ideas and techniques, and quickly discovered that the best way to learn about something is to attempt to write about it. I wanted to solicit feedback for my ideas so that I could verify and improve upon them. And I had one goal.

I had just returned from cf.Objective() and had had the time of my life (OK, maybe that's exaggerating a bit). I had attended excellent presentations during which I learned a lot of new and useful things. But more importantly, I had a chance to meet and mingle with some of the nicest and smartest ColdFusion developers one could ever hope to meet. I made some friends, had some very enlightening conversations, and drank a beer or two as well. There was no doubt in my mind that I'd be returning year after year. In my mind it was the ColdFusion Conference to attend.

Having a background in training, and enjoying the challenge of teaching people, I thought to myself, "Self, wouldn't it be cool to present at cf.Objective()?" So that became my goal. It didn't have to be next year - it could be two or three years down the road, but my goal was to eventually speak at a cf.Objective() Conference.

So you can imagine how pleased I was to hear back from the cf.Objective() Steering Committee yesterday that they had accepted two of the topics that I submitted for their approval. I am delighted to announce that I will be presenting the following sessions at cf.Objective(), in May:

  • An Object Oriented Approach to Validations
  • Building an Object Oriented Model

I'll undoubtedly provide more details on those sessions in the future, and I'm sure that a summary will appear on the sessions page in the not too distant future as well. In addition to achieving my personal goal, I am honoured to be among the group of speakers whose ranks are filled with those whose work I greatly respect. I strongly encourage anyone reading this to make an effort to attend. In my opinion it is truly the best ColdFusion conference available.

Single-Table Inheritance with Transfer

I want to talk about object inheritance, which may sound a bit enigmatic, so I'm going to start with an example:

Let's say I have a number of types of Employees that I'm trying to model. I have Developers, who have attributes such as favouriteLanguage and enjoysDeathMetal and behaviours such as code() and test(). I have Designers, who have attributes such as favouriteColour and toleratesDevelopers and behaviours such as makePretty() and makePrettier(). And I have Analysts, who have attributes such as levelOfAttentionToDetail and totalPagesOfRequirementsProduced and behaviours such as ask() and tell().

In addition to those specific attributes and behaviours, all of these employee types also share some common attributes, such as userName, firstName and lastName and also have common behaviours such as startDay(), takeBreak() and askForRaise().

This is an example of inheritance, a form of one-to-one relationship. We can say that a Developer is an Employee, a Designer is an Employee and an Analyst is an Employee. It is not an example of composition. We would not say that a Developer has an Employee or that an Employee has a Developer. The terms that are commonly used to describe this relationship between classes are Supertype and Subtype. Employee is a Supertype, while Developer, Designer and Analyst are all Subtypes of Employee.

So, the question is, how do I implement this model using Transfer?

[More]

How I Use Transfer Today - A Gateway MapFactoryBean

I left something critical out of my last post about how I'm using Transfer (an ORM for ColdFusion) these days.

If you've been following along you'll know that I'm using an Abstract Transfer Decorator, which all of my concrete decorators extend, and that I'm using Brian Kotek's most excellent Bean Injector to load singletons into my Transfer objects. This raises an interesting issue: How to inject the appropriate Gateway Object into my Transfer Object.

[More]

How I Use Transfer Today - Encapsulating Database Access

I've been meaning to follow up on my How I Use Transfer series, as I've made a few changes to the way I write my ColdFusion code since that series was written. One of the biggest changes was to encapsulate all database access in my Gateway components.

Now I say biggest not because it took a lot of time and effort to make the change, in fact the opposite is true. I say biggest simply because it represented a significant shift in the way I'm designing my model. Let me start with the rationale for making this change.

[More]

The First Post to ValidateThis!

I'm excited to say that the Google group that I set up as a discussion forum for my object oriented validation framework for ColdFusion has received its first post. And it was a doozy. Some really great ideas, and I, in my usual fashion, posted a response of an appropriate length ;-)

So I'd like to invite anyone interested in becoming part of the conversation, or interested in just listening in, to join the group. I'm not necessarily going to blog about everything that comes up in the group, and judging by this first post/response, there is bound to be some pretty interesting stuff going on.

For anyone who's interested but doesn't want to add yet another source of email to their inbox, I can confidently say that the volume of traffic will be negligible. And first post moderation is active, so spam should be pretty much non existent.

Click here to join the party.

Paul Marcotte on Transient Factories

Just a note to say that Paul Marcotte has written an interesting blog post describing a ColdFusion component which is an implementation of a Factory Pattern. This component can be used to centralize creation of transient objects in your model. He has included a description of the usage of the component that he wrote (with a tiny bit of input from me), as well as a download of that component. I am using this Transient Factory inside my own validation framework and have found it to be very useful.

I believe the component will also be available on RIAForge in the not too distant future.

I Don't Care What An ORM Is!

There have been some postings recently about the state of the ORM landscape in ColdFusion, and while I have found this conversation interesting, I have not found it particularly useful.

There exists a group of ColdFusion developers, myself included, who would like to improve the way that we write and structure our code. We have been encouraged to adopt a more object oriented approach to our development, and I, for one, have found it to be of great benefit.

One of the things that has made this transition easier for me is the existence of these "ORMs" for ColdFusion. I started off with Reactor, and now use Transfer, and I have found that not only do these "ORMs" do a lot of the more menial tasks for me, but they also encourage me to "think in objects". Sure, the objects that I'm working with are closely tied to the physical database structure, but they're still objects. I still get the benefit of encapsulation, and through the use of Transfer decorators I feel that I am able to give my objects meaningful behaviour, thereby creating rich business objects.

I know from experience that when a developer is starting down this path it can be quite daunting, and we often look to those with more experience than ourselves for guidance. I hope that someone in that boat would not be "turned off" the existing set of "ORMs" for ColdFusion because they are not considered to be true ORMs.

This brings me to the title of this post, which was inspired by a post by Peter Bell. I find Transfer to be an indispensable tool for building OO-like applications with ColdFusion, and can only encourage people to investigate and use it. It may not be a true ORM, but that doesn't make it any less useful. Let's not throw the baby out with the bath water.

Previous Entries / More Entries