04
Aug
2009

Just got back from our 2nd East Bay CFUG meeting at our new location (New Horizons Computer Learning Center in Pleasanton, CA), and couldn't be happier with the way the meeting went.

My goal with the group is to break away from what I've seen to be the traditional model of people showing up, a speaker speaks for an hour or so (while most people are texting or surfing on their laptops), swag is given out, and everybody goes home.

What I'm shooting for is to engage the audience. To hold interactive, collaborative meetings. Some might be small code challenges where everybody takes a few minutes to solve a particular problem, then shares their solution with the group. Others might be an open discussion on a given topic. Yet others might be hands-on labs to teach a particular technology.

Read More...
Comments (11) | 1362 Views
22
Jul
2009

Yesterday I rolled out a new site, http://www.blitztweets.com. I announced it on Twitter, a few folks retweeted (thanks!), and Ray Camden descended upon it like a vulture descends upon a wounded bunny in the high noon desert heat. Ray's got a knack for finding flaws in CF sites, and I'd be lying if I said I didn't have him in mind during development.

Overall, I think I did pretty well. He found two issues. First, my contact form could be submitted without the user filling in any fields. That was OK. I don't particularly mind if somebody really wants to send me an empty contact form. But the second issue... ooh, that was a doozy, and I'm duly embarrassed by it. He linked me to http://www.blitztweets.com/config/ColdSpring.xml, which proceeded to display the entire contents of the file in my browser window (it's since been fixed). Oops.

Read More...
Comments (12) | 1319 Views
06
Aug
2008

Working on a Model-Glue application, I found myself in a situation where a <cfwindow> would come in handy. It's on a page that displays a list of items that belong to a user. For each item, the user can add a "journal entry". This is simply a plain text field and a time/date stamp. Each entry displayed on the page has a link for "journal" that pops up a cfwindow that shows all of that item's journal entries, along with a form (a simple textarea) allowing the user to add a new entry.

Using <cfform> allows the form submission to stay within the <cfwindow>, which worked great. A standard post allowed the page to refresh after the form was submitted (and the record inserted into the database), so it seemed to be a pretty user-friendly way to allow multiple journal entries to be added to an item. When the user was done adding entries, simply close the cfwindow.

Here's where things got funked up... the first form submission worked great. The form's action page called an event-handler that did the insert, and added a named result to the event to redirect back to the journal.viewJournal event, which (obviously) displayed the contents of the journal. The event needed the concept of a transactionID, so i used the append attribute of the result tag as follows:

Read More...
Comments (1) | 3268 Views
18
Jun
2008

So remember a few months back when I was all like, "I'm going OO, and i'm going to document my progress so maybe other folks will learn what i'm learning"? Yeah, that didn't go so well. For me, my OO journey has been decidedly hit-and-miss (more miss than hit, unfortunately). I think my attempt to document that journey reflected that.

For me, I think the issue is that I wasn't working in OO day-to-day. I'd learn how to do something, but then I'd get confused as to what the next logical step should be. Or, I'd talk to somebody who would suggest that what I had learned wasn't necessarily how they would do it, and I'd step back. What I really needed was a mentor. One person that I had access to during the course of the day, that I could bounce ideas off of. One person that could show me *their* way (regardless of whether or not it was how others did it), and I could journey down that particular road. Later on, I'd hope to have enough of a conceptual grasp that I'd be able to say, "Wait... what about doing it *this* way?".

I may finally be in that situation. Jon Messer recently joined us at Amcom. Jon's somewhat of an OO God, altho he'll try and tell you otherwise (and he'll be terribly embarrassed at reading this). In the few months that Jon's been here, working with him has been a privilege, and one for which I'm very grateful.

Now, this is more than just a "neener-neener-neener-I-have-a-mentor-and-you-don't" post. Jon's very much into helping others learn, and has started a series of his own blog posts in which he's going to attempt to demystify the concepts of building OO applications. I think this series is largely going to be what I was previously attempting, with the significant difference that Jon's already at a point where he can teach what he knows (as opposed to trying to teach what he's learning).

The series comes out of an evaluation that he had done of some of the ColdFusion MVC frameworks, and deconstructs the code that he used.

This promises to be an interesting and educational series. I'd highly suggest that if you're still making the transition from procedural to OO, you sit in. Feel free to post questions, or just a comment to let him know what you think about his approach.

Comments (0) | 1654 Views
30
May
2008

It's not terribly uncommon to have a page that is expecting a particular variable, but the page may not know if that variable will be in the form scope or URL scope. Case in point might be a resultset that does pagination. On the first submit, the variables would likely be in the form scope. As the user pages through the results, it's entirely possible that the variables would be in the URL scope.

The most straightforward way to handle this would be:

<cfparam value="myNewVar" default="" />
	
<cfif structKeyExists(URL, 'myVar')>
	<cfset variables.myNewVar = URL.myVar />
</cfif>
<cfif structKeyExists(form, 'myVar')>
	<cfset variables.myNewVar = form.myVar />
</cfif>

It checks both scopes for the var, and if it finds the variable in either, it assigns it to a new local variable. It's straightforward, but not particularly "clean".

Read More...
Comments (4) | 3878 Views
02
Apr
2008

Last night I downloaded and looked at Transfer, a ColdFusion based ORM, for the first time. To be clear, it's the first time I've looked at any ORM. I'm more than a little unhappy. What the hell is wrong with me that I've never made an effort to use Transfer before? (that's a rhetorical question. there's not enough gigs of storage space on the Internet to answer. k thx).

How did this all finally come about? I'm working on a project that's my first Model-Glue app that actually makes use of objects. I was told to use Transfer by more than a few people, but I didn't want to add any more to the learning curve. It seemed to me that learning Model-Glue, ColdSpring, and OO was quite enough for my little brain.

Read More...
Comments (1) | 2087 Views
02
Jan
2008

I can't imagine this isn't a fairly well known "issue" in the Model-Glue community, but what with being new to Model-Glue, this was a new issue for me. I figure it's worth mentioning, if only to save somebody else the several billion hours of debugging that i lost this afternoon.

Let me point out first that this isn't a Model-Glue issue per se. It's a combination of using Model-Glue with ColdFusion debugging and some JavaScript thrown in for good measure (some of you may already know where I'm going with this).

Read More...
Comments (3) | 1302 Views
07
Dec
2007

hey all. i'm back, and i'd like to officially apologize for going all bermuda triangle on you in the middle of the "going OO" series. i'd like to take a few minutes and reflect on some of what happened, because some of it is actually relevant.

first... the non-relevant bits. we moved (again). i thought it would be a fairly easy thing to do this time around... because unlike the last 2 times it wasn't an across country move (from AZ to FL and then from FL to CA). this time it was from CA (southern) to CA (east bay)... but it still really really sucked. it was just a very draining experience (both physically and mentally) and I never ever want to do it again (but i will).

factor in starting the new job (which is going great so far, thankyouverymuch) and i just haven't even had time to keep up with reading blogs, let alone writing an entry.

but things have settled down (somewhat) so i'm going to try and get back into the swing of things.

So the $64,000 question is... where'm i at with all of this OO stuff? hell of a question. sorta wish you hadn't asked. >sigh< but you did, so...

Read More...
Comments (10) | 2382 Views