Galleon 2.2

I just released Galleon 2.2, which has a feature that folks have been asking for since 1.0. Users can now edit their own posts. This is thanks to Todd Rafferty. He did all the work for it and I just had to mod a line or two. My main objection to the ability for folks to edit messages was because I was worried folks would use it for abuse, but Todd added an automatic 'message edited' type when a user edits a message.

Anyway, enjoy.

Two ColdFusion Server Monitoring Tips

These are probably well know, but as I'm working on RIAForge a bit today I thought I'd share. Both are thanks to Tom Jordhal who, along with Jason Delmore, is helping debug the issues on the box.

First - in the Alerts section, Email settings, it says that you should supply a recipient's email address. It isn't obvious, but you can supply a list of email addresses here separated by a comma.

Secondly - in the main settings for the Server Monitor, do not forget you can supply aliases. This lets you change

c:\websites\something\more\long\foo.com\index.cfm

to

Paris Hilton Blog home page

An odd aspect to aliases is the Action Parameters portion. This isn't documented anywhere (as far as I know), but you cna supply URL parameters and values. So for example, I could make an alias for

Paris Hilton View Entry

that points to index.cfm and event=view.blogentry

I didn't quite test this yet - but that's how it should work - again - as far as I know.

Edited at 10:22

Unfortunately I've found a bug with aliases. If you try to use 2 aliases to the same file, but with different parameters, the SM will only store the last one you use. This makes the alias mostly useless for frameworks. Well, you can still make a generic alias, but you can't do event-specific aliases.

Edited at 10:27

Ok, so again, thanks to Tom, I figured the issue with the aliases. You do not provide name=value pairs. Instead, you provide just the name of the URL argument. If you do event for example, then in the SM you will see:

youralias?event=X

which is useful for Model-Glue type sites.

Who Uses ColdFusion?

Derek wrote me today to tell me about Who Uses ColdFusion. At first I thought this was another list, like GotCFM - but this one seems more focused on helping job seekers find companies using ColdFusion.

RIAForge Status

For about two weeks now RIAForge has had a few stability issues. It was down again this morning, but is back up now. Please continue to email me when you see it done. I just wanted to warn folks about it. As I'm traveling in a day or so, I may not have time to really work on it till I get back from WebManiacs. I'll be sure to blog if the reason behind the crashes are something interesting.

Personally I blame gremlins.


Model-Glue 3 - Example of Formats

Time for yet another quick Model-Glue 3 example. This time I wanted to show off formats. In the past, if you wanted to have multiple views of the same type of data, you had to build multiple events. So for example, one page may display a list of all the starships in your fleet in HTML format. If you wanted the same query in JSON, then you would build another event to handle that request. Model-Glue 3 makes this a heck of a lot simpler. The views XML entity now supports a format attribute. So for example:

New ColdFusion 8 Book

Thanks to John Farrar for alerting me of this, but a new ColdFusion 8 book has been announced:

ColdFusion 8 Developer Tutorial

It covers CF 8.0.1 and is expected sometime in August.

Adobe Connect failure on the Mac - apologies to the Connecticut UG

So - if you tried to attend my presentation tonight, you saw it was a complete and utter failure. Whenever Connect opened, all I saw was a blank white screen. I connected to my PC via RDP, went to the meeting, and confirmed it was working fine there, but no go on the Mac. I did a reboot and it didn't help. Finally one of the members suggested I load Connect in the browser with ?launcher=false.

Finally - I saw some UI. I was about to begin my presentation when I noticed that I didn't have the Presenter plugin. I've run Connect meetings all year long, but ok, whatever. I clicked. The app reloaded. No go. I tried in FF and Safari, and nothing seemed to change.

I'm very frustrated now - and of course more than a bit sorry that the Connecticut group didn't get to hear my presentation. Connect has been flakey on my Mac before - but mainly just random crashes 2-3 times an hour. I've never had a total failure like this before.

Can anyone offer any advice? I believe I still have a room open to me on one my accounts (oh, and while I'm complaining, has anyone else noticed it's hard to find the URL to the admin portion of Connect?) so I have a place where I can try.

Playing with jQuery - ColdFusionBloggers.org Update

A while ago I built and released ColdFusionBloggers.org as a way to demonstrate and learn about new ColdFusion 8 Ajax technologies. Since then I've wanted to come back to the site and rebuild it using Spry or JQuery. Not because I wasn't happy with the CF8 Ajax stuff, but because a) it's fun to totally rebuild your own sites and b) I wanted to learn more about jQuery.

I also know that the site had a big footprint. YSlow was reporting around 600k of stuff which is a bit much. I was curious to see what a change to jQuery would be like.

I had looked at jQuery a few weeks back. I sat in a good presentation on jQuery (one that focused on the UI stuff) and it seemed like something that wouldn't be too hard to play with.

I began by working on the main guts of the site - the content div. This is the list of blog entries with pagination. Previously this was done with cfdiv. In general this was a super simple implementation outside of the support I had to do for restoring a page based on URL.

This was mainly done using ColdFusion.navigate. In jQuery there is a similar function - load. So I replaced:

ColdFusion.navigate(someurl,somediv)

with

$("#content").load(baseurl);

Simple enough - but not really too much different from the ColdFusion 8 method.

The next issue I ran into was the contact form. This created two problems for me. First off - it seems as if jQuery's built in UI stuff is still in development. While there are ten billion jQuery plugins, as a new user this is actually more of a bad thing then a good thing. I mean as a new user I had no idea what to use. Scott Stroz pointed me to jqModal, which worked easily enough, although my contact form now is a bit uglier compared to what it used to be.

The second problem was how to handle submitting the form. Once again - ColdFusion had a simple way of doing this - ColdFusion.Ajax.submitForm(formid,url,etc). In jQuery I converted this to $.post("url", { data and callback here}). I was a bit surprised that I had to specify the form values. I'm not sure I really need to. The docs say it's optional. But they don't say if it will send the entire form to the URL. I assumed it wouldn't and typed it all out:

$.post("sendcontact.cfm",{dname:$("#dname").val(),demail:$("#demail").val(),comments:$("#comments").val()},formDone);

If I'm right and it is required that you specify the data, then ColdFusion definitely wins here.

Other changes I made were to remove the autosuggest and make the stats pod stop reloading. That was a bit silly in retrospect.

I'm pretty impressed with jQuery. It's not quite as friendly as Spry, but it does seem pretty darn powerful. I hope the UI project continues to evolve as I think it makes sense for jQuery to provide a "best of breed" UI selection for it's users.

Oh - and does size matter? Well, my unscientific testing seems to show the new site reacting just as quickly as it used to. YSlow says the size is now down to 200k or so, which is incredible, but I didn't get the "wow" I thought I would with the switch.

A few quick final notes. The entire site has not been converted to jQuery. The feeds for example still use CF8 UI stuff. The code zip you can download is also out of date now obviously.

Any comments on my use of jQuery are appreciated, but be gentle as I have a grand total of 2-3 hours experience with it!

p.s. I'd especially appreciate a suggestion on how to handle the "loading" status that I lost when I left cfdiv. Right now it's not immediately apparent that you've begun an AJAX request to load new data.

Ask a Jedi: Complete Spry CRUD Example

Walter asks:

I was wondering if you can help, I am trying to get my feet wet with Spry and CF, you have many blog posts that refer to this but I wanted to know if you can point me in (or have an example) of a : Add / List / Amend / Delete solution using Spry and CF, to a database. I have searched and cannot find help on this. I have managed to get CF and Spry to work, but just reading XML files, and am having a lot of trouble, getting Spry, ColdFusion and Database to play nicely.

Spry really shines when it comes to 'Get the data and display it' site, but if you want a full "back and forth" type example, you need to do a bit more work. I still think it's easy, but you are right, there isn't a lot out there that shows examples of that. Here is a quick one I whipped up. I've included the code in a zip and it should work fine out of the box as I didn't use a database. (That's the only hackish part of this - but I wanted something quick and dirty to play with.)

Speaking at Connecticut ColdFusion Users Group

Tonight I'll be presenting to the Connecticut ColdFusion Users Group at 5PM CST. I do not see a Connect URL yet but I'll post a comment once I have it. The presentation will be on ColdFusion 8 and Ajax, something I've given before, but if you haven't had a chance to see it, tonight's your night.

More Entries