Fun with Coldfusion: BlogCFC, Ant and ACFUG
So, in my "spare time" this week I have been doubling my efforts for completing the changes to the Adobe User Group of Atlanta Web site. The AUGA site uses Coldfusion, naturally, and I am using BlogCFC as the code base of the site and have been trying to extend BlogCFC to allow for event, locations, sponsor, announcement email, rsvp and attendance management. The goal was to be completed before MAX 2006 next week so that I could show some of my fellow user group managers how it works.
I really like Coldfusion. If I had the time I'd learn how to be a good Java programmer. I don't have the time and I am surrounded by Java programmers who I'll never be able to catch up with so I don't try. Coldfusion gives me a way to (gasp!) rapidly develop Web applications without needing a Java developer. We don't use Coldfusion at Roundbox (I get snickered at any time I mention it), but there are times that I need to test some aspects of back-end integration and have no access to a Java developer, so I am trying to use Coldfusion more. I have also been using Coldfusion more in my personal development practice. Coldfusion is pretty awesome.
I wanted to write about some obstacles I've had over the past weeks.
The first problem is Ray Camden. Seriously. The man is like a mad beaver feverishly working on all of his open-source projects making it completely impossible for non-Jedi Knight level developers to keep up. All kidding aside, Mr. Camden's code and character are exceptional. My real problem with extending his BlogCFC code was my work flow. My files were not set up like the BlogCFC Subversion repository and I had no way of tracking changes to the repository and changes/additions that I made to the files. It was driving me crazy.
I asked around the office, since I was obviously not "getting it". Les Hazlewood said, "Leif. It's called Ant." thankfully leaving the Napoleon Dynamite "Gosh!" out of the sentence. How stupid of me to not think of Ant. I've used Ant ever since we moved out of the Flash IDE and into Eclipse for all of our Actionscript development. It is a great way to run automated tasks like moving files around or running command-line applications (yes, I know it does a lot more than that, but I am trying to keep things simple).
Now that I am using Ant inside Eclipse along with the CFEclipse plug-in, this is how I have things set up:
Note: I realize that to some of you Coldfusion folks this may sound pretty simplistic. Humor me.
1) The Repository: I download the BlogCFC Subversion repository from the link that Mr. Camden has made available into a folder named, for simplicity sake, "leifwellsBlogCFC". This means that any time there is an update to BlogCFC all I need to do is run and update to get the code. The code will either merge with my changes, or I will get a conflict that I will need to sort out.
2) The Ant Task: I have a build.xml file in the root of the "leifwellsBlogCFC" folder that contains a task that allows for me to create a "build" folder and dump all of the source files from BlogCFC into their proper places. In my case the task copies all of the code from the "client" folder into the "build" folder and then, since leifwells.com is hosted in a shared environment, the task adds the "org" folder to the root as well. When I make changes to the code, all I need to do is run this task and all the code is loaded into the build folder.
3) Virtual Mapping: Finally, I go into my WEB-INF folder (mine is located at "C:\CFusionMX7\wwwroot\WEB-INF" and edit my "jrun-web.xml file so that http://localhost:8500/leifwells/ is pointed to my "leifwellsBlogCFC\build\" folder.
This is working great for me. If you have suggestions as to how to further improve this workflow, feel free to let me know.
The other thing I was having trouble with was reading cfselect with multiple selections. To my credit, I had checked the documentation for Coldfusion about doing this, but unfortunately there were no examples that showed reading of the values. I found out what I was supposed to do, but I was having problems getting it to work.
When I have questions that the livedocs don't answer, where do I turn? ACFUG, that's where.
I've been a member of the Atlanta Coldfusion User Group (ACFUG) for several years, and I even served on their Board of Directors a while. One thing that I know about ACFUG is that their members know much more than I do. The ACFUG mailing list constantly has people intelligently discussing advanced topics. I sent out an email to the mailing list and in less than 11 minutes I found that what I was trying was the correct way to approach the problem, but I was not doing it correctly. In less than four hours I had a very complete answer from Charlie Arehart himself, president of ACFUG and all around nice guy.
Thanks, yet again, ACFUG for saving me time (and stopping me from pulling out my hair).
I enjoy working in Coldfusion and look forward to growing my skills. I look forward to adding Coldfusion to my list of weapons in my rich Internet application arsenal.
4087 Views





Comments
Looking forward to a long future of your Adobe User Group of Atlanta, our sister organization. :-)
PS Has anyone else complained that your comment form is sized such that the width of the comments textarea is too wide? It scrolls wider than the windows that BlogCFC has opened to hold the comment form, I mean. I'm running at 1440x900, I'll admit, but I've really not seen this happen with any other BlogCFC blogs I vitis (many). I see you're running at 5.5.001 of BlogCFC, which is about the latest release, so perhaps it's a new problem in the core files, if you didn't change anytging. Just wanted to make you aware. If you don't see it, drop me a note and I'll send along a screenshot. :-)
BTW, I am using Firefox 1.0.5.7 for Windows and I am not seeing the issue right now. I'll check the version of IE that I currenly have.