the singularity of being and nothingness
Posts tagged ColdFusion 8
Ext to ColdFusion…Nice!
Feb 21st
So I know a lot of the posts I’ve been writing recently have been about stuff that’s been around a while–Ext helper functions, CFScript, etc. Nonetheless, I post them because some of the answers to questions I’ve found in developing solutions have been less-than-easy to find, so perhaps repeating some of the same things again will help Google find it a bit easier for someone else someday.
On with redundancy!
Obviously, JSON-related technologies have been around for a while, and with ColdFusion 8, a lot of native JSON handling was added for the creation of some sweet AJAX-y goodness. While I’ve dabbled with these, I’ve never really had a need for them…until now.
I recently developed a remote CFC function that required about 12 different arguments. On the client side, I also developed a quick EXT Ajax.request() method to pass these arguments into the CFC function.
Now with Ext, it’s incredibly simple to pass arguments to server-side functions, as this example illustrates:
Ext.Ajax.request({ url: 'com/functions.cfc', success: successMethod, failure: errorMethod, headers: {"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"}, params: {method:'setupLife',argument1:arg1,argument2:arg2} });
I like this alot, because it allows me to treat each argument as its own “thing,” rather than stringing together a bunch of “&argument1=arg1” in the query string.
But what if More >
Setting Dynamic Mappings in ColdFusion 8
May 2nd
Over the last year, I've learned alot about ColdFusion, AJAX, and DBA stuff. I have to say, however, that the coolest thing I've learned is that in ColdFusion 8 you can set per application mappings in the Application.cfc itself. Why is this so cool? Well, I tend to create a lot of folders in my applications in order to keep related assets in one place together. Of course, creating mappings to these folders makes life a lot easier in that you don't have to worry about making sure you are referencing these folders correctly in different contexts–with mappings ColdFusion can take of that for you.
However, the problem I often run into is that I have to create some funky mapping names in CF Administrator in order to keep them all unique. In my local host environment, for example, the number of mappings is huge and it becomes a hassel to remember to re-set these mappings up when I push final code to a production environment (not to mention that some hosting providers make doing this a lot harder than you could imagine…).
But with CF8, this is no longer a problem. Now you can create dynamic mappings in APplication.cfc, More >