jQuery – A Love Story

Over the past year or so, I’ve been endeavoring to learn jQuery. I put it off for a long time. I’ve always been a fan of JavaScript, and have been used to writing it for as long as I can remember. I couldn’t justify taking the time to learn a new way to do something that I already knew how to do.

But little by little and more and more I kept hearing people espouse the virtues of jQuery. I finally resigned myself to sit down and give it a fair shake.

At first, yes it was a little daunting. I think I was still subconsciously resisting this new way of doing things. But little by little I started to see the power of jQuery. It isn’t that it’s just a different way to do something that I already know how to do… but it’s a quicker and easier and more powerful way.

Read More»

Software Engineering Explained

Not new, but one of those things where every time I think about it and want to show it to somebody, I have to hunt it down. For my convenience, and your pleasure, I present you with “Software Engineering Explained”

Software Engineering Explained Graphic

Add Twitter to BlogCFC

Twitter LogoI’m pretty close to being done with my latest re-skinning effort of BlogCFC, and wanted to add a Twitter Pod to display my most recent tweet.

I’ve done some work recently with the Twitter API for blitztweets.com, so I didn’t think it would be too difficult of a task.

I added a method to blog.cfc, added an application variable with the last update date/time (so as to only update every ‘n’ minutes and avoid potentially hitting the rate limit), and then created the pod itself (aptly named twitter.cfm).

After reinitializing the blog, everything looked good. I waited a few minutes, made a new tweet, and reloaded the page. Unfortunately, it didn’t update.

Read More»

East Bay CFUG – Overcoming Objections to Using Frameworks

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»

Securing Your XML Config Files

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»

Book Review – Becoming Agile in an Imperfect World

I have a confession to make. I don’t know what “Agile Programming” is. At least, I didn’t before reading “Becoming Agile … in an imperfect world” by Greg Smith and Ahmed Sidky (In the interest of full disclosure, I was fortunate enough to receive an advance copy from the publisher).

I’d heard the term before, but I didn’t really know what it meant to be an Agile programmer. What comprises Agile? Is it an abstract concept or are there explicit steps to take in order to “get there”. How do you know when you’re “there”? More importantly, is it worth investing the time to become Agile?

I got as far as page 4 before two of my questions were already addressed (What components comprise Agile development, and how do I know that I’ve achieved Agile development?). I took that to be a good sign. A sign that the authors know who their audience is, and will do their best to deliver the answers that their readers are looking for.

Read More»

ColdFusion 8 Docs on AIR

Today in the #coldfusion channel on IRC (DALnet), somebody asked about a downloadable version of the ColdFusion documentation. I first suggested that he look at his local system since you can include the docs as part of your CF install, but he apparently didn’t choose this option.

I did a quick Google search to see if they could be downloaded easily, since it’s really just static HTML files, and came across a pretty neat AIR app by Brian Love, appropriately titled CFDocs on AIR.

The project looks to be about a year old, and according to Brian, was originally a project that he undertook in order to play around with AIR. It was a heck of a choice, because not only did he get some exposure to AIR, but he put together something that has a good deal of value. The application shows an alphabetical list of all of ColdFusion 8′s built-in tags and functions, shows tags and functions by category, and is searchable.

When I posted this to the #coldfusion channel in response to the original question, a couple of people commented that they hadn’t seen this yet and also thought it was a worthwhile effort. Since it seems to have flown under the radar since its release, I thought it’d be worthwhile to get the word out and mention it here.

Nicely done, Brian. Thanks for making this available.

Download CFDocs on AIR.

Awesome Customer Service – Java4Less

On one of my current projects, I needed to barcode a document (via CF) and subsequently read the barcode (again, via CF). The documents would be sent via fax and rerouted to the CF server.

Because of its durability, my client wanted to use a data matrix barcode. As luck would have it, Ryan Stille had already gone through the trouble of putting together a CFC for reading and generating data matrix barcodes (Thanks, Ryan!).

The CFC is a wrapper for some Java libraries that read and write barcodes. In the docs for the CFC, Ryan suggests a company called Java4Less.com. I grabbed evaluation versions of the appropriate libraries to ensure they’d work, which they did. I then instructed my client to go ahead and make the purchase and told him which 2 libraries we needed. Now, Java4Less offer up a few components and I’ve been a bit sleep deprived and long story short, one of the libraries that I told the client to purchase was not the correct library.

Read More»

<cfajaxproxy> – The Other White Meat

Over the past few weeks, I’ve had the opportunity to start playing around with some of the AJAX functionality built into ColdFusion 8. cfajaxproxy makes me happy.

In a nutshell, cfajaxproxy creates a “bridge” between client side JavaScript and a ColdFusion CFC. It’s nowhere near the full blown AJAX framwork that jQuery is, but rather reminds me of JSMX, which is a very lightweight AJAX framework that does little beside facilitating communication between client and server. While it allowed you to pass data from the client to the server, and receive data back, it assumed that you would write the corresponding code to manipulate the client based on the data that was sent back from the server. I’m pretty comfortable with JavaScript, so I was OK with that. cfajaxproxy is essentially the same thing. No bells-and-whistles per se, but as far as I’m concerned, that’s perfectly OK.

Read More»

More cfwindow Fun (Model-Glue, too!)

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»
Page 4 of 6« First...23456
© Copyright Charlie Griefer