rss
twitter
    Find out what I'm doing, Follow Me :)

My CFUnited Code and What Lesson I Learned

If you are reading this and you attended my session at CFunited, I have great news: I fixed the issues with my code! If you did not attend my session, read on anyway. Here is what the problem was:

After I had done one final round of testing, I wanted to clean up the database so all the data I just entered would not be seen. Rather than going through and manually deleting the records, I decided I was gonna be smart and just replace my local database files with the ones stored in my Subversion repository. What I had neglected to remember was that I had not committed a recent copy of the database back to the repo, so I overwrote my database files with a very old version of the database - one that was not 'in synch' with the ORM code I was using.

This explains the issues I had anytime I tried to save something, but what about the Model Glue issues? Well, when I looked at my controller.cfc file for the Model Glue version of the application, it was just about empty. So this got me thinking, maybe when I pulled over the database files from the repo, that I included controller.cfc as well - which also had not been committed recently. I was able to revert back to a previous version of that file and everything now works, in all versions of the application.

I have attached a zip file if my slide deck, as well as the sample code so you guys can see that it really does work - you can get it here.

Now, what did I learn? Well, a couple things:

  1. After you have verified that the code for your presentation works, don't make ANY changes...at all.
  2. If you are going to go through the trouble of setting up a Subversion repository for your demo code, use it and use it correctly. i.e. - commit early and often!

I would like to thank everyone who attended my session (the room was pretty full) and I apologize again for all the issues. A lot of those in attendance have come up to me since and said that they enjoyed presentation and learned a lot even with the technical difficulties. I really hope that is true, and they were not just being nice to the stupid guy who borked most of his code.

If you are still at CFunited on Saturday, I am giving the presentation again at 2:330 PM. Stop by, if for no other reason to see if the carnage will continue.

3 comments

(Comment Moderation is enabled. Your comment will not appear until approved.)
Lola LB said...
Enjoyed it, anyway . . .
Demian Holmberg said...
It was as great presentation with or without working code! :)

But thanks for posting the working example.
Sean Corfield said...
I know how you feel. My FW/1 preso at cf.Objective() crashed and burned on the LitePost example (the primary one I use to show structure, services, bean factories and page-specific layouts) because I had made a small change to my *environment* (not my code).

As my CFUnited preso approached I went thru the demos obsessively and discovered the night before that one demo didn't work (due to a recent update in FW/1) so I got that fixed. Then just minutes before the preso I ran through every demo again and found a combination that wouldn't work due to a new caching option in the very latest Railo build (which matches the new CF9 component path caching). The issue was identical between CF9 and Railo (same mapping in different apps to different folders) but CF9 lets you turn that cache off and Railo doesn't yet so I had to rollback the latest patch (luckily just a single click in the admin).

It seems that it doesn't matter how well prepared you are, gremlins can always get you!

Sorry I didn't get to see your talk - I really wanted to and I heard good things about it! - but I got caught up in hallway conversations so often and missed many talks I wanted to see.