Aug 16
Quick post tonight, as I'm between tasks. I've been wanting for a long time to get more familiar with ExtJS, a most excellent JavaScript application framework (can I call it that?). It's the good stuff that's built into ColdFusion 8, but that was version 1.1. Since then they've gone all the way to 3.0, and the platform is getting better and even more expansive.
What I wanted to do was get into it, but I kept getting sidetracked. It can be a bit to digest in one sitting - or even 10. Eventually, I heard of ColdExt, which is a ColdFusion, er, helper application... well, it's like training wheels. I hope that doesn't offend anyone - particular the ColdExt gang. It's really amazing what they've done. Using their imported tags you can get off the ground really fast using the familiar tag-ness that is ColdFusion but when it's processed and sent to the browser it's all proper ExtJS JavaScript.
Now, I LOVE this. What it's doing is providing me, the developer, those all-important positive and productive feedbacks we call "success". In no time I had an AJAX-powered grid with a CRUD form hooked up to the rows. Even better is that some of the things I wasn't completely familiar with in the ExtJS syntax was getting written for me. A quick view-source and I was staring at a guide for how the under-hood-goods were written. This has helped me gain mountains of comfortability with this JavaScript framework!
So, even if you don't want to use ExtJS through a layer of ColdFusion tags in the end, I highly recommend you ease into the deep and incredibly powerful world of ExtJS via ColdExt. It put the "RAD" back into my AJAX/Rich Client applications. That's just awesome.
Apr 23
I'm sure this is information you can get just about anywhere, but the assumption that everyone knows about it is silly.
I loaded up a file in CFEclipse just now and I got the little red "X" on the left margin of my cfstoredproc tag. For some reason I don't have the ColdFusion 8.0.1 dictionary loaded on this machine. I could have gone searching for it and all that, which might well have been just as easy, but instead I felt compelled to manually edit the dictionary file. If for nothing else, it was a good exercise.
Just so you all know, the dictionary files are here:
C:\Program Files\eclipse\plugins\org.cfeclipse.cfml_1.3.2.200901041029\dictionary
Now, of course, the exact path might change based on your preferences and version of CFEclipse. In this directory there is an XML file for each dictionary, and all are loaded up when CEclipse starts. I recently downloaded the XML dictionary for ColdExt (that'll be another blog post before long, I hope!) and dropped it in here.
So, to complete my thoughts for this post, I went into the cf8.xml file and copied the cachedwithin and cachedafter parameters from the cfquery tag to the cfstoredproc tag. After a restart of CFEclipse, WHALA! No more little red "X". Now you know, and that's half the battle!
Jan 5
If I had a quarter for every time this tag, which was forged upon the anvil of evil and chaos, got the best of me and my time I'd be able to... I don't know. Hire Adobe to write my code for me?
The CFLOGIN tag and the attribute-of-disdain known as loginStorage has smote me. It's my own fault for not understanding the difference between choosing "cookie" (the default, and my God just leave it be!) and choosing "session". I chose "session", thinking of course I'd like it in the session. All session based things, authentication included, ought to be in the session. Uh... no.
What started happening was that I would authenticate fine, establish my CF login and my roles, and it all looked okay. A CFDUMP of my credentials immediately following the CFLOGINUSER would yield just what I expected. However, the very next request would forget who I was entirely!
<cflogin>
<cfloginuser
name="#attributes.j_username#"
password="#Hash(attributes.j_password)#"
roles="administrator" />
</cflogin>
<cfdump var="#GetAuthUser()#" />
<cfdump var="#GetUserRoles()#" />
<cfabort />
Now I'd like to give some credit to Ray Camden for his frustration with this a long time ago, which is featured on this blog post. Also, please take note of this adorable post in the Adobe Knowledge Base about the issue, which basically says don't use loginStorage="session" because it's a security risk. Whiskey Tango Foxtrot!?
Recent Comments