NCFUG Model Glue:Unity Preso

So tonight I did a presentation for the Nashville ColdFusion User Group on Object Oriented Development with Model Glue:Unity. This was a preso I was supposed to do last month, but some minor confusion with a new location (and the happy birth of a child a few days prior) had me standing in front of an audience of one. This actually worked out great, because it gave me an extra month to prepare, and allowed Aaron time to figure out the best way to record the presentation via Breeze (or 'Adobe Acrobat Connect Professional', as it is now called.)

This preso covered some "Why should I?" type questions, basic setup of the Unity frameworks and sample application template, as well as a hands on demo of using Reactor to do the grunt work. I need to give a big shout out to Aaron for picking up a really nice Logitech USB Headset w/ Mic the day before, as well as a thanks to all of those who attended either live or via the breeze session.

Once again, you can view the recording that Aaron put together during the presentation, or just go to the Nashville ColdFusion User Group's website. I'm including a FlashPaper copy of the slides with this post (the Download link below), but the hands on demo is in the presentation.

Structures: CF5 vs CFMX

In every project there are gotchas, little unforseen issues that must be worked through as you migrate from development to production. In a previous post I brought up transitioning a Model-Glue: Unity application from a Windows development platform to a Linux platform while using two slightly different versions of MySQL. That would be one example.

Another recent project serves as a case in point as well, creating compliant header/nav/footer includes to be used site wide for a small site. Easy work, three or four files, including the stylesheets, with some example usage templates thrown in and a lot of comments for the developers who would use it. Oh yeah, did I mention it had to work on ColdFusion 5?


Development Lessons Learned

Wow, the things you forget over time. You start to work in a certain environment for so long that you take on bad habits by example of the work you are associated with. Trouble, with a capital 'T'.

Case in point. I was contracted out for a very small job, a friend of my company's Technology Director wanted to put a football pool on his website. Very straight forward, even for a guy like me who has little to no interest in sports. He sent in a hand drawn diagram of what he wanted each screen to look like, and exact instructions on the function of each page.

Easy. Simple. No brainer. So, I quoted him 4 hours of work. I wrote it in Model-Glue: Unity to play and learn, knocked it out over 2 days in about 8 hours (giving for learning curve), and had it fully functional on my server for testing. It worked great, and the client was getting a little more than he asked for in the process.

But then you have to deploy to production. Client's server environment. And this client was with a shared hosting facility. After three hours, and countless phone calls, they finally had all of the cf mappings set up correctly. This was necessary, since their site was not the webroot. I hit the page, and BAM!, error. My flawless little app was not functioning as intended, at all.

At first I thought it might have something to do with folder and file permissions. No dice. I was seeking advice left and right. Finally I asked Ray Camden for his thoughts, and he says "Look at case sensitivity."

Well, it was a Linux server. But, the majority of the pathing code was written by Model-Glue, so I was a little stumped.

And then I really looked at the messages. My version of MySQL was .01 version off of the host's, and mine was on Windows. Then I saw it in their online MySQL administrator, multicase table names.

With my version of MySQL, all table names are lower case, but queries can reference them without case sensitivity. In their version of MySQL, case sensitivity is queen (and a bitch at that), and can cause you great heartache.

You see, Model-Glue and Reactor autogenerate many files from your scaffolds and the Reactor.xml file, and use the same case sensitivity as that of your scaffolds and object setups. I had to recompile the site, page by page, with an adjusted config files, and then re-customize my display templates, plus rename a few thing within my Controller.cfc file.

So, in hind sight, I probably could have just changed the table names to the same case sensitivity as I had used in my files, but I just adjusted all of the files anyway. My overall point is this, always watch your case sensitivity. You may know, from the beginning, where and on what your application will be deployed, but what happens if your client decides to switch hosts the following year? Nightmare, with only yourself to blame. Be case sensitive to everything: paths, db tables and column names, CFC methods and arguments. Everything. You will save yourself a lot of trouble in the long run.

Still Here

OK, it's been a little busy. BlogCFC has had a few updates (which still need to be applied here). One of the nicest updates I've seen is the liquid layouts. I replaced the Alagad image component with Efflare's imagecr3 tag. After extensive testing, I (and my colleagues) have found that the java imageio based tags were just not stable enough, nor was the conversion quality up to par. After looking through our (3,000+ templates) codebase, I wrote a new image.cfc wrapper for the imagecr3 tag, writing functions with names that matched those we were using within the Alagad component. Although the update to our three production servers definitely outlined our need for version control, overall the replacement of the image.cfc worked like a charm.

Stay tuned. I'm hoping, this week, to post another installment to my tutorial on "the View", where I'll begin to get in to making the templates dynamic. We might also talk about the use of <cfinclude> inside of CFCs and UDFs (some things to be aware of).

The New CF IDE

OK, what are Damon Cooper and the Adobe crew up to? There a post on Damon's Blog on What's Your Ultimate ColdFusion IDE? This has gotten some very interesting responses. Overwhelming support for CFEclipse, with suggestions on what to extend in it's feature set (everyone says 'Debugging').

And then Damon makes this cryptic remark:

Guys, thanks for the feedback this far. Much appreciated. We've heard you all loud and clear, and I, at least, realize now more than ever from this small sampling of feedback that our suspicions were correct.

I sincerely hope we can both pleasantly shock and awe you with what we have on store.

I will say this: the solution we come up with may not be what you're expecting, but it may be what just what you've wished for :)


Wow, do these people know how to tease us or what? I know that I saw at least two comments telling them to hire Mark Drew (and mine was one of 'em). I also saw quite a few things mentioned that I believe the CFEclipse crew is already working on (at least in R & D). Tell me, what do you think?

(CF) Eclipse RDS Plugins: First Impressions

OK, been quite a few posts out there, within the CF community, about how you can download the ColdFusion RDS plugins for Eclipse (Well, CFEclipse). Now, if you have Flex Builder 2.0 then you already have it. At least I think you do, it might be an option during install, but either way it's available to you with Flex Builder 2.0. But, you can also go to that first link in this post to download it by itself. Install is pretty cut and dry, but you kind of have to search a little to find out what to do next.


Making the View: Pt 3

For those of you coming in late, you may reference the related entries to catch up (quick reads, I promise).

Last time we began filling our template and creating our stylesheet. Just some basics, where we defined a primary content area.


Development Tools

More than once I've had someone ask me what I've got in my tool box, what apps and utilities do I use for programming applications. I thought it would be a good idea to post these. Maybe someone will find something interesting, or useful. Maybe I'll look back on it in a dozen years and laugh. Here's the listing. How does yours compare?

  • Internet Explorer -
    Yes, I know. We hate it. But 88% of the users of the sites I develop use it, so I must test in it.
  • FireFox -
      Browser of choice (and champions), along with a few extensions:
    • All-In-One Sidebar
    • ColorZilla
    • DOM Inspector
    • FireBug
    • HTML Validator
    • Tabbrowser Preferences
    • View Formatted Source
    • View Source Chart
    • Web Developer
  • Eclipse + Callisto + CFEclipse
  • Photoshop CS2 or Fireworks (just depends)
  • Thunderbird (yes, email counts in development)
  • ColdFusion (6.1 converting to 7 at work, 7 on most side work)

But my most important tools? Books and Blogs. Here is some current reading:

Somewhere down the line I hope to throw the Flex Builder into that Eclipse. At work I use MSSQL, but on most side work I use MySQL. I use BlogCFC for this blog). I love Model-Glue, though I've worked with Mach-II, and I hope to look at Fusebox 5 real soon (never really liked the earlier implementations much, though).

Pretty simple. I throw some other things in when I need to. I like the "find" functionality of Dreamweaver better than that of CFEclipse (note to self: drop Mark a ticket in the bug tracker). I use Flash at the office, but mostly to troubleshoot issues (we have a bang up Flash designer who is also learning ColdFusion).

Making the View: Pt 2

Ok, before we continue lets's pick apart our template a little.

view plain print about
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
3<html xmlns="">
4    <head>
5        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
6        <title>Untitled Document</title>
7    </head>
9    <body>
11    </body>

We defined the doctype of our page as a transitional XHTML 1.0 document with english as the language. The doctype declaration is a required element of any well-formed XHTML page, and references the appropriate DTD (document type definition) for the content of the document.

From W3Schools:

DTD is used by SGML applications, such as HTML, to specify rules that apply to the markup of documents of a particular type, including a set of element and entity declarations.


Making the View: Introduction

Years ago, when I returned to development after a short haiatus developing business automation systems, I began re-learning web development. Things had changed a little. HTML 2.0 was now HTML 4.0. New tags were available, old tags had been deprecated, JavaScript had matured, and this new thing called CSS was just beginning to catch on. And, oh yeah, I was also learning ColdFusion (4.0 at the time).

Over the years I've seen a trend. There are a lot of designers who've learned some development, but fewer developers have learned design.


Previous Entries