Entries for September 2005

I just wanted to bring this up because I believe a lot of people missed it when Steve blogged it the other day. His awesome guide, the ACME guide, now has a downloadable ISO available with everything you need to get started. I am hosting it for him here at ryanguill.com. For more information, see Steve Collins Acid Website, and to download it, check out my docs page.

Posted on Tue. September 27, 2005 by Ryan Guill #
I posted this to the COAL mailing list last night: I had an epiphany of sorts today after a conversation on cf-talk. Its something that I have known for a long time in the back of my mind, but never fully realized it. First a little background. You cannot duplicate or copy components. Components (objects) are passed by reference, not by value. And the duplicate() method doesn't work on objects. If you aren't with me, consider the following code. <cfset variables.x = createObject("component","myObject").init() /> <cfset variables.y = variables.x /> If objects were passed by value, variables.y would hold its own copy of the object. But since objects are passed by reference, variables.y and variables.x hold the exact same object. So If we make a change in variables.y, the change was also made in variables.x. So why is this a problem? Because in COAL, I implemented part of the service locator pattern that is the caching agent. Which makes sense in the service locator pattern, because the pattern is working with _services_, not objects. Services are stateless. You can create objects out of them, but they should have no instance data. They are also singletons, and only one copy should exist per application. So if the code was to request a service that has already been created, it should give them the exact same copy of the service, not a new one. But this doesn't work with the objects that COAL is supposed to create. So basically the caching agent in COAL is useless, and should not be used. I haven't run into any problems with COAL yet though, because I always turn caching off anyway. But I am sure if I was using the caching, it would have caused problems by now. So, sorry for that long explanation, but this is whats going to happen. The service locator pattern is still great for COAL in the way that you can request just the object name (that you have given it in the config xml document) and get it to know where the component is stored and create the object for you. So we are just going to take the caching agent out of the "framework" code. I am going to leave the cache attribute in the coal.cfc init() for now for backwards compatibility, but it will basically be disabled, no matter what you give it there will be no cache. So the implementations you already have wont break, just that functionality (which is and should be transparent at this point anyway) will just cease to exist. You should go ahead and take that attribute out if you are using it now because it will be taken out completely in future versions. Sorry about this dumb mistake guys. But it should all be fixed pretty easily by this weekend. Any comments or suggestions on the matter are welcome.

Posted on Tue. September 27, 2005 by Ryan Guill #
Quick post, but everyone that is using the CF7 Event gateway with XMPP should be interested in this http://www.macromedia.com/go/b39b42b5 Make sure you update your jar files to keep things running smoothly.

Posted on Fri. September 16, 2005 by Ryan Guill #
Well, I started playing around with dreamweaver 8 today. I have been using cfeclipse pretty much exclusively for my coldfusion development for a good 3-4 months now and have been loving it. But I was going to buy studio 8 anyway (more on that later) and so I thought I would go in and give dreamweaver another spin. I used dreamweaver mx 2004 from the day it came out till the day I started using eclipse not long ago and didn't really mind it much, although it wasn't as geared towards coldfusion development as much as cfeclipse. The only thing I really missed in cfeclipse was the rds abilities. I don't use code generation or any of that stuff, I always write everything out by hand, and so dw didn't really offer all that much more to me. And now, after playing with dreamweaver 8, I will probably stick with my cfeclipse. I will continue to use dreamweaver for all of my design needs, html/css layout, that sort of stuff. But for my coldfusion needs im going to stick with cfeclipse. That being said, I will revert back to dreamweaver from time to time, especially for working with clients that are used to dreamweaver mostly. And so my first order of business was to change the default template for the .cfm and .cfc filetypes in dreamweaver. The one for the cfc's was particularly bad. So, just so you know, if you want to change any of the templates that come up when you create a new filetype, you just need to go to C:\Program Files\Macromedia\Dreamweaver 8\Configuration\DocumentTypes\NewDocuments and open up the documents there and edit them, save them and then dreamweaver will start using them. If you installed dreamweaver/studio to a different location your mileage may vary, but this should get you close. And in case you are wondering this is what I have changed my default .cfc template to be:
<!---
===========================
Title:          
FileName:       
Version:      
Author:         
CreatedOn:      
LastModified:   

Purpose:

Dependancies:

Assumptions:

Outline:


ChangeLog:

==========================
--->


<cfcomponent output="false">
   <cfsilent>
      
      <!--- Constructor Methods --->
      <cffunction name="init" access="public" returntype="any" output="false">
         
      <cfreturn This />
      </cffunction>
      
      <!--- Public Methods --->
      
      <!--- Package Methods --->
      
      <!--- Private Methods --->
   </cfsilent>
</cfcomponent>
As you can see I have added my comment header at the top to try to force me to use it. oh, and I also had to change that horrible yellow color behind the comments! That was seriously hurting my eyes after a while. So I changed it to a #F3F3F3 instead. Just enough to notice it, but not cause permanant retina damage!

Posted on Tue. September 13, 2005 by Ryan Guill #
On one of the lists today someone asked about how to store a udf on a cfm page in a different scope, such as the application scope. Something that not many developers realise is that when you create a function in a cfm page (actually for a cfc as well) it is stored in the variables scope for that page. So, if in test.cfm you create the following function:
<cffunction name="foo" access="public" returntype="boolean" output="false">
<cfreturn True />
</cffunction>
Then you can of course call the function using the following syntax:
<cfset variables.result = foo() />
but you can also access the function by using:
<cfset variables.result = variables.foo() />
because the foo() function is stored in the variables scope. now what if you wanted to access it using application.foo() ? Well you can not do this:
<cfset application.foo = foo />
That code will bomb and tell you that foo isnt defined. I am not exactly sure why this is, but you can do this:
<cfset application.foo = variables.foo />
and then you can call the function from then on using application.foo(). To see this in action, create a udf on a .cfm page and then dump the variables scope like so:
<cfdump var="#variables#" />
And to see it in action in a cfc, put the following method in one of your cfc's that has some other methods in it:
<cffunction name="dumpVariables" access="public" returntype="struct" output="false">
<cfreturn variables />
</cffunction>
and then call the method from a .cfm page and dump the results. you will see all of the methods in the cfc. This is also why if I am ever storing variables inside of a component, I use variables.properties structure instead of using the variables scope directly.

Posted on Tue. September 13, 2005 by Ryan Guill #
I pre-ordered the studio 8 and have been watching the news of the devnet subscribers being able to access it all day. And all day I have been hoping that they will bump us pre-orders up to be able to download it today as well. Up until this point the site has been saying in my account that it will be available on the 13th, but just now it has changed to the 12th! But still no link yet. Any other pre-orders out there see this too, and has anyone gotten a link yet??

Posted on Mon. September 12, 2005 by Ryan Guill #
As a follow up to me reminding you about the cheat sheet reference that Pete Freitag gave us I also want to point out this other great resource. These are called Quick Reference Cards but they are basically the same thing. Some of the languages they provide are: Web and Markup, C, C++, CVS, Java, Perl, PHP, SQL, XML and more, and some multiples. So go on over and get your cheat on. ;)

Posted on Mon. September 12, 2005 by Ryan Guill #
For those of you that attended my user group meeting last night, and even for those who didn't, here are a few links to some examples and resources around the web for cfform flash forms. http://www.asFusion.com http://www.cfform.com http://www.macromedia.com http://livedocs.macromedia.com http://livedocs.macromedia.com/flex/15/asdocs_en/ http://weblogs.macromedia.com/mxna http://weblogs.macromedia.com/mc/archives/FlexStyleExplorer.html http://cfpim.coffeeflower.com/stylemanager/ http://www.macromedia.com/devnet/flex/example_apps.html There are many more though around the web too so look around. There is a lot to see!

Posted on Thu. September 08, 2005 by Ryan Guill #
As I am sure all of you know, Shaun Inman released his new pet project Mint, a stats package that is supposedly revolutionary. I have been dying to try it ever since I saw the write up on it at Mike Davidson's Blog. So I rush over there as soon as I hear its out, and hes getting slammed with traffic so there is no demo. Bummer. So I think, its just 30 bucks, why don't I just buy it. So I download the compatability test, because although I develop in coldFusion, I do host a few php sites on my box. The compatability test said I was fine with everything except for one minor detail, I didn't have something called cURL, whatever that is. (I do understand what it is, but I just dont care to). Bummer again. So I just tried to forget about it. But then today I was looking through some comments somewhere and found someone saying that he had removed the curl necessity. I rushed over, downloaded the compatability test again, and sure enough, it says im good to go. So if anyone else is seeing cURL as a hinderance, don't let that stop you any longer. Im going to do a few more checks to make sure, but I am probably going to be purchasing it later today. If so I will do a write up soon!

Posted on Wed. September 07, 2005 by Ryan Guill #
Pete Freitag gives us a great all-inclusive list of cheat sheets for your cheating pleasure. This is a great resource and I really am glad he took the time to compile this list. Make sure you check it out.

Posted on Wed. September 07, 2005 by Ryan Guill #
A friend of mine sent me a link to an AJAX IM project and I thought I would mention it here in case anyone else hasn't seen it. I haven't given it a shot yet, but it looks pretty nifty from the overview... Anyone else checked this out and can comment? UPDATE: It looks like they have a demo running at http://ajaxim.unwieldy.net/. Register and chat at me, my username is rguill. Also, credit goes to bofe for the link. Thanks man.

Posted on Tue. September 06, 2005 by Ryan Guill #
This morning I came into work and started working on an application I built using cfgrid. It was displaying everything just fine on my screen, but when a coworker tried to hit it, the query data was not showing up. A dump proved that the query did exist and have records in it on his machine, cfgrid just wasnt showing the data. I went and checked, I was using firefox with flash player 8. I opened up ie that was still using flash player 7, and it didnt work. Updated it to 8, and it started working without any change to the code. Has anyone else noticed this behavior and is there a workaround? We really need this to work on 7 for the time being... Guess that goes to show you that you can't always assume that it is your code screwing up! Update: It was my code actually... I had the same name for my grid as I did for the form itself. But it wasn't throwing a compile error. And the real strange thing was that flash 8 was working fine even with the same names, but flash 7 wasn't. Very strange indeed.

Posted on Tue. September 06, 2005 by Ryan Guill #
Design, Photograph, Work © Ryan Guill, aDeepBlue 2010: All Rights Reserved. | Contact | RSS Feed