Photo from Chile

Become a ColdFusion ORM Ninja in Just Two Days!

I've mentioned previously that Mark Mandel, the mastermind behind Transfer ORM, JavaLoader, ColdDoc, and now the lead developer of Coldspring, and I have developed an intensive, two-day, hands-on workshop on ColdFusion's new ORM features. We will be delivering that workshop, Developing Applications with ColdFusion 9 Object Relational Mapping, in Minneapolis, MN on April 20-21, 2010 which are the two days immediately preceding the cf.Objective() conference.

Really? I Can Master ColdFusion ORM in Two Days?

You bet you can! This is an extreme hands-on workshop. We won't be lecturing at you, we'll be working with you. For each concept that we cover we'll be writing code together, both the instructor and the students, working towards building a single, working application. Then, once we've done that together, you'll be let loose on your own to practice the concepts again on your very own project, which is yet another application which will be built incrementally using the concepts that you just learned. This means you'll have lots of chances to practice your newfound skills, and, more importantly, to make your own mistakes. You'll either figure out how to fix your mistakes yourself, with the help of one of your fellow students, or with the help one of the two instructors. You'll learn by doing, and what's more, you'll leave the class with lots of examples of working code that you wrote yourself.

This is why we say that we can help you master ColdFusion ORM in just two days. Not only will you be ready to start using it in your next project, but you'll also be in an ideal position to teach it to your fellow developers.

About the Instructors

I've been working with Transfer ORM for a few years, and have been working with ColdFusion's ORM integration since early in the product beta. I've blogged about it extensively, delivered a number of one-hour presentations on the subject and have created and regularly contribute to a Google group (cf-orm-dev) dedicated to discussing some of the more advanced and esoteric topics around ColdFusion's ORM integration.

As for Mark, in addition to creating his own ColdFusion-based ORM (Transfer), he's also worked extensively with Hibernate (the ORM that is integrated into ColdFusion 9) and is considered by many to be the foremost expert in all things ORM in the ColdFusion community. This therefore represents a unique opportunity to learn about this new, exciting and productivity enhancing technology from two people who know it very well, and have real-world experience developing with it.

Do I Have to Be an OO Guru to Attend?

Definitely not! We assume no prior knowledge of ORMs or Object Oriented programming, and the techniques that we teach can be used, if you wish, in a totally procedural application. So you neither need to know OO to join in, nor do you need to learn OO in order to use what you learn in your own work (although we would encourage you to do so). Some experience working with CFCs would be helpful, but we can get you up to speed pretty quickly even if you lack that.

Where is the Workshop Being Held?

As mentioned above, the workshop is running as a pre-conference training session at cf.Objective(), and will take place from April 20 - 21, 2010 at the conference hotel, which is the Hyatt Regency in Minneapolis, MN.

How Much Does it Cost?

We have made the early-bird price into a permanent discount, so although the original price was listed at $1200 for the two days you can now enroll for just $1000.

How Do I Sign Up?

You can register for the training via cf.Objective()'s registration form.

Can Anyone Attend?

Although the workshop is being offered as a cf.Objective() pre-Conference class, you don't have to attend cf.Objective() in order to enroll. So if you've having trouble getting your boss to pony up for a trip to cf.Objective(), perhaps you can convince him or her to at least send you to these two days of invaluable training.

What Topics Will Be Covered?

Here's a summary of the topics that we'll be covering:

  • Introduction to ORM
  • Introduction to Hibernate
  • Configuring ORM
  • Working with Objects
    • Creating an Object
    • Retrieving an Object / Lists of Objects
    • Updating an Object
    • Deleting an Object
    • Arrays of Objects vs. Queries
  • Mapping Objects
    • Ids and Properties
    • Many-to-One Relationships
    • One-to-Many Relationships
    • Many-to-Many Relationships
    • Formulas
    • Collection Mapping
    • Inheritance
    • Cascade Options
  • Hibernate Internals
    • Hibernate Sessions
    • Session Flushing
      • How It Works
      • How to Control It
    • Working with Transactions
    • Hibernate Object State
      • Transient, Persistent and Detached
      • How Objects Move between States
  • Lazy Loading
    • Overview
    • How it Affects SQL
    • Dealing with Detached Objects
  • Concurrency
  • HQL
    • What is HQL?
    • Basic Queries
    • Criteria / Parameters
    • Joins
    • Pagination
    • Bulk Updates
  • Application Architecture
    • Using a Service Layer with ORM
    • Using an Abstract Service
  • Caching
  • Event Handling
  • DDL (Database) Generation

Truly a Unique Opportunity

Although we do have plans to make the course available at other venues in the future, Mark and I live on opposite sides of the planet, and it just so happens that we'll both be attending cf.Objective() this year. It's likely that future classes will feature either Mark or I as instructors, as it's a rare occurrence that we're both in the same place at the same time, so don't miss this unique opportunity.

Looking for More Information?

I think I've covered most of what you need to know about the course in this post, but if you're looking for even more information about it please visit our web site at www.ColdFusionORMTraining.com.

ValidateThis 0.92 - Easier to Extend, More Object Support, and more

I've just released version 0.92 of ValidateThis, my validation framework for ColdFusion objects. I'm very pleased to say that I received a large code contribution from Adam Drew, most of which made it into the framework. I also finally got around to adding John Whish's changes to the bundled ColdBox plugin. Here's a summary of all of the enhancements, followed by the details for each one.

  • ServerRuleValidators can be located anywhere.
  • Business objects with an abstract getter are now supported.
  • New DependentFieldName parameter for conditional client-side validations.
  • Fix to future-proof ColdBox plugin.
  • Fixes for Groovy conditional validations.

The latest version can be downloaded from the ValidateThis RIAForge site. Details of the enhancements follow:

[More]

Using the Mura FW/1 Connector Plugin

Several months ago Pat Santora of Blue River and I developed a Mura plugin that would allow a developer to take an existing FW/1 application and deploy it within a Mura page. I was interested in this as I saw a need for a lightweight framework that I could use for my plugins, and by coincidence Pat happened to be working on something similar. So we joined forces and the FW/1 Connector Plugin was born.

The plugin was finally released yesterday so I thought it prudent to author a post about how to use the plugin.

Overview

The FW/1 Connector plugin can be used to incorporate an FW/1 application into Mura. Each plugin can be assigned to an individual FW/1 application. As long as each FW/1 application has a unique applicationKey, you can have as many FW/1 applications running inside Mura as you please.

[More]

ValidateThis 0.91 - Now with Groovy and ColdFusion on Wheels Support

I've just released version 0.91 of ValidateThis, my validation framework for ColdFusion objects. Here's a summary of the enhancements, followed by the details for each one.

  • VT can now be used to validate Groovy objects.
  • VT can now be used to validate ColdFusion on Wheels objects.
  • getVersion() is now available.
  • VT source code is now being housed at GitHub.

The latest version can be downloaded from the ValidateThis RIAForge site. Details of the enhancements follow:

[More]

Extending Mura CMS with Plugins - Part V - Handling Plugin Errors

Here's a quick Mura Plugin tip: You can handle errors in your plugin via an onError() event in your event handler. Here's what mine looks like:

<cffunction name="onError" output="true" returntype="any">
<cfargument name="event">

<cfif arguments.event.getConfigBean().getDebuggingEnabled()>
    <cfdump var="#arguments.event.getValue('error')#" />
<cfelse>
    <cfset arguments.event.getServiceFactory().getBean("MuraService").SendErrorEmail(arguments.event.getValue("error")) />
    <cfinclude template="../displayObjects/util/dspPluginError.cfm" />
</cfif>

</cffunction>

What's going on in there?

First I'm checking to see if debugging is enabled in the global config by checking the value of event.getConfigBean().getDebuggingEnabled(). If debugging is enabled I want to display the information about the error on the page, so I'm dumping the contents of the error key from the event. If debugging is not enabled, then I want to send an email to the site administrator, which is done by invoking a method on my MuraService object, which is defined in my Coldspring config. After that I want to display a friendly error message to the user, so I simply include a template from the displayObjects/util/ folder of my plugin. This allows the plugin itself to control what sort of message is displayed to a user when an error occurs.

Pretty simple, eh?

ColdFusion ORM Gotcha - Non-String Struct Collection Keys

Here's another tricky issue when working with collections of child objects that are stored as structs. Just like last time, we'll look at a Department object with a one-to-many property that holds a collection of Users which is stored as a struct. The difference this time is that we'll use a numeric property as the key to the struct, rather than a string property:

component persistent="true" output="false" entityname="Department" {
    property name="DeptId" fieldtype="id" generator="native";
    property name="Name";
    property name="SIN" ormtype="int";
    property name="Users" fieldtype="one-to-many" type="struct"
        cfc="User" fkcolumn="DeptId" singularname="User"
        structkeycolumn="SIN" structkeytype="int" cascade="save-update";
}

The nice thing about having the collection of Users in a struct is that we can access them individually. For example, if we have a Department object and we know we want the User in that Department with a SIN of 12345, we could simply write:

Department = entityLoad("Department",1);
User = Department.getUsers()[12345];

If you're like me you'd probably think that would work, but it doesn't.

[More]

Running Multiple Copies of ColdFusion MultiServer with Apache on OS X

I've been trying, on and off, for nearly six months to get two versions of ColdFusion, CF 8 and CF 9, running in a MultiServer install of CF with JRun on my Mac. I've read all of the documentation that is available, as well as a good number of blog posts, but I always seem to get stuck at the point of deploying my CF9 EAR into my existing copy of JRun (which was installed during the MultiServer install of CF8). Everything I've read suggests that auto-deploy should work - you just copy your exploded EAR into a folder under JRun/servers/ and JRun will deploy CF9 for you. Well, for whatever reason, that simply does not work with my setup. I also tried to manually deploy (in spite of there seeming to be zero documentation on how to do that), but still could not get my instance of CF9 to start up in JRun.

After walking through all of the steps yet again yesterday, and coming up with the same result, I asked someone who in my mind is the most knowledgeable person about this topic, particularly when it comes to OS X, Sean Corfield. We discussed the steps I had taken, and he suggested that auto-deploy with JRun can be problematic. He then suggested a solution that worked perfectly for me, so I'm going to share it with you here.

[More]

More Entries