ColdFusion Position – Denver

There’s an open position for a ColdFusion Developer at the University of Denver. Details:

The Educational Web Developer reports directly to the Director of the Center for Teaching & Learning (CTL). The Educational Web Developer helps in the development of Coldfusion applications used for instruction, works with other team members to plan changes in technology, writes documentation, provides support for educational technologies, and provides customer service and support to faculty members of the University of Denver community.

For more details go to: https://www.dujobs.org/applicants/jsp/shared/position/JobDetails_css.jsp?postingId=180023

It comes in from Joseph Labrecque who is part of the Adobe Higher Education Leaders program. I get the feeling he’s a pretty good guy to work for.

ColdFusion 9 ORM: Data Mapper versus Active Record

I got a question today:

I was wondering if you could blog on the advantages with CF9 ORM using Hibernate versus something like the Active Record pattern Rails uses? I am not too familiar with Hibernate but go through Rails Envy once in awhile 🙂

This is an awesome question, and I’m going to tackle it, but I’m going to break it into a few sub questions. Before I do that, this is comparing apples to oranges. Active Record is a pattern and Hibernate is an ORM solution that uses a pattern named Data Mapper. I can’t speak to the entire reason for choosing Hibernate, as I’m not one of the engineers, but a quick survey shows it is the leading ORM solution in Java right now, which pushed us that way.

What are the differences between Data Mapper and Active Record?

The underlying one seems to be a philosophical one:

  • Data Mapper looks to the objects to be the definition of the data; the database is just a place to store it.
  • Active Record looks to the database to be the definition of the data; the object is just a way to access it.

     

That’s an oversimplification I’m sure. Data Mapper requires you to map out each table and each column. Active Record by and large will detect things like tables and columns for you and expose them. Implementations of both patterns include the ability to tweak the configuration, but it looks like most Data Mapper implementations need to be configured. (As opposed to Active Record implementations like Rails that prefer convention over configuration.)

A practical consideration that occurs is that Active Record objects handle talking to the database with load, save, and delete methods; while Data Mapper objects get passed back to another object or function to translation back to the database.

There are also issues about performance and mapping. I won’t bother going into these as they are issues with implementation of the pattern and not the pattern itself.

Why did you go with Data Mapper over Active Record?

Two major reasons here:

  1. Hibernate uses the Data Mapper pattern
  2. Because the community (represented on the prerelease site) by and large asked for it.

I don’t remember the entire rationale behind this preference, but I will push responsibility on to the prerelease testers. 🙂 I think it is related to the two next issues.

Is ColdFusion ORM pure Data Mapper?

Not necessarily. Sure you create CFCs with properties. You then use the Entity functions to save them back to the database. You can have those properties actually create and update your database structure. That is clearly Data Mapper in action.

However, you can leave all of the properties in your CFCs blank, and ColdFusion will just populate it from the database. You can leave some of the details of your properties blank and ColdFusion will make assumptions about how they’re typed. These are philosophically Active Record features.

It comes down to ColdFusion making stuff easier, regardless of underlying philosophy. ColdFusion does both, to facilitate both database-focused and object-focused ORM implementations.

Can you create Active Record CFCs with ColdFusion 9’s ORM?

Yes. You can wrap the Entity functions in a CFC like this:

<cffunction name="save" access="public" returntype="void">
 <cfset EntitySave(This) />
</cffunction>

 

Once you do that you can call your objects using the active record pattern of object.save(). In fact Bob Silverberg has started work on an Active Record CFC that you can just have all of your CFCs inherit from called Base Persistent ORM Object (Active.)

So hopefully this answered some of the questions around Hibernate, the Data Mapper pattern and the Active Record pattern in ColdFusion 9.

ColdFusion 9, Mango Blog, and git

I made a few major changes to my site in one fell swoop.

A few people asked me questions about the changes so I figured I would explain.

Why a VPS?

I really like my hosting company, YoHost, but it was still shared hosting. That meant I couldn’t experiment with administrative settings and whatnot. Also I was constrained to my hosting provider’s upgrade schedule. Changing to a VPS meant that I can do whatever I want whenever I want. I like that freedom.

Why ColdFusion 9?

You mean other than that I am an evangelist for it? Well I actually used a few pieces of it. I built an admin piece for my events page using ORM and ColdFusion Builder’s code generation. I also added a page that pulls in my presentations from SlideSix. To not tax their servers too much, I used the new caching features of ColdFusion. So I’m not just using ColdFusion 9 to use it, I’m leveraging some of the features.

Why Mango Blog?

First off let me just say, I love Ray Camden. I’d go so far as to say I have a non-sexual man-crush on him. That being said, I went to Mango Blog. I’ve been using it in our internal blog that Ben talked about a while back. There are a few things that I completely love. I love the rich text editor. I love the plugin architecture. I love the caching. I love the skinning. It’s fantastic. Those were my big motivators. I felt that even with the changes I made to the default Mango Blog install I could easily keep it up to date, whereas I felt extreme apprehension about updating BlogCFC because of all of the changes I made to code to make it work the way I wanted. To be clear, I had to tweak both, it’s just that my Mango tweaks were mostly in a skin, which won’t get changed by future updates.

Why git?

Because I want to be one of the cool kids who’s all like “Subversion, oh yeah I did that like 8 years ago, I feel so bad for you for using a mature technology that you can rely on.”

Okay maybe not. The big motivator for me for git was online/offline changes. I often work without a good network connection. Being able to work properly, with multiple check ins even without connectivity was killer. I also appreciate the fact that the metadata is in one place. This makes copying the project during a build feasible instead of a network intensive svn export. This reduced my build process for my site from 3 or so minutes to 30 seconds. This means I’m more likely to update more often.

So there you go. This was a very practical upgrade for me, I got a lot out of it, and I have a few reports that the site is even faster then it was before. So except for a little blog barfing on the aggregators it seemingly went well.

ColdFusion Thoughts from a Longtime PHP developer

Serge Jespers is a colleague of mine on the Platform Evangelism team. He’s a longtime PHP developer and has recently dipped his toes into the ColdFusion waters. He recently developed the MAX widget that’s been going around. In fact, he used ColdFusion to power it. Here are his thoughts on the matter:

…I’m fairly new to ColdFusion. I actually first touched CF about a year a go on the On AIR Train Tour through Europe. That was the first time I played around with CF after oh… some 10 years of working with PHP. I looked at CF a few years ago and never really took another serious look at it. I’m sure there are many of you out there in the same situation and I would like to invite you to take another look at ColdFusion. CF has changed and matured a lot since the early days and is just a breeze to work with. With a minimum amount of code, I was able to rapidly code my database calls for the widget. Another cool thing about ColdFusion is that once you write your database code, you can use it in a number of different ways. You can directly call the methods using Flash Remoting in your Flex application, call it as a webservice from a mobile Flash application and/or call it from an HTML page without changing anything in the original code. I surely was pretty impressed when I saw that the first time. If you’re a long time PHP user and want to know more about ColdFusion, I’d like to invite you to my session at MAX. I’m going to talk about the difference and similarities between PHP and CF and also talk about what CF can do right out of the box….

If you want to find out more about his experience with the widget, check out the rest of the article.

ColdFusion Builder Extension Test Creator

When I build or debug ColdFusion Builder Extensions I typically do the following:

  • Alter the extension code to write IDE post contents to file
  • Call extension in IDE
  • Alter the extension code to read IDE post contents from file
  • Debug through the browser

I found my self frustrated with this workflow. Instead, what if I created an extension that could capture the IDE content and write it to the disk for me?

That’s what I did.

I still have to adjust my extensions to read in the file, but I can make that conditional:

So now much less work for me, and if you’re interested, much less work for you. The extension is now up on RIAForge.com: ColdFusion Builder Extension Test Creator.

MAX 2009 Unconference – ColdFusion for the Masses: PHP, Java, Ruby, and ASP Developers

Wow, that’s a long title.

I’m doing a session at the ColdFusion Unconference at Max 2009 on promoting ColdFusion to non-ColdFusion developers. It’s about going into other communities and focusing on the correct arguments for ColdFusion. I want to both share what I’ve learned in terms of winning arguments, and hear what you guys think resonate. So I’ll be presenting a bit, but I’ll also be listening to your experience (if you care to share.)

So sign up for MAX 2009, and check out the Unconference.

This session will be Tuesday October 6th from 1:30 – 2:30.

Also check out my main conference sessions:

Leveraging Exposed Services in ColdFusion Centaur
October 5 at 11:30AM
This session is about the new exposed services or CFaaS we have included in ColdFusion 9. I’ll be talking about how to leverage them in Flex and other languages, and even how to enhance previous versions of ColdFusion with them.

ColdFusion with Microsoft Office, SharePoint, and Exchange
October 5 at 05:00PM
I’ll be talking about how nice ColdFusion plays with Microsoft technologies. While Exchange integration has been around since ColdFusion 8, with 9 we’ve added the ability to interact with SharePoint and Office documents.

 

Student Discount for MAX 2009

I thought I had seen the best discount for MAX a few weeks ago, when I blogged about the educational/governmental/non-profit discount. It seems that I was wrong. There’s an even lower one for students:

  • $199 for a full pass
  • $99 for a day pass

That’s a phenomenal price. If you are a student and want to take advantage of it:

  • Go to the MAX registration page
  • Use the discount code: STU691
  • You’ll have to provide student identification