Rob Gonda's Blog

Advanced (real) ColdFusion Contest Announced

Ray just announced a new Advanced ColdFusion Contest... he already ran one, but it involved writing Flex and most developers didn't have time to learn it.

This one involves a custom application to analyze code, with custom rules settings, and pluggable in the CF Admin... Sounds interesting and could involve nice RegEx's, optionally the use of CF Async Gateways? Could be nice for large amounts of data... The deadline is at the end of July, which gives you 7 weeks, or gives me 3 weeks since I won't breathe until next months anyways.

There will be prizes, thus far a copy of Fusion Reactor 2, a copy of KTML, and more to come. I could contribute with a copy of intelliJ if there is interest. or how about a job @ iChameleon?

outlook calendar for WorldCup aficionados

If you're using outlook and don't want to miss a single WorldCup game, here's an iCal file you can import with every game in US EST time. My outlook syncs to my cell and now I have the schedule everywhere I go. It's awesome!

In your outlook, choose File Import, iCalendar.

ajaxCFC update for Model Glue and MachII

I previously released some examples of Ajax for Model Glue, including port of the Contact Manager example that works with Ajax and XML Sockets. I missed to consider that most people will not be able to get the XML Socket server running, thus not being able to run this example on their servers. Added another example that uses only Ajax, without the sockets complication ... if you diff both versions, you'll find that I only changed a single line in the config file to use an ajaxLayout instead of socketLayout ... nonetheless, this should allow you to run this example out of the box ...

And the moment everyone has been waiting for: ajaxCFC for MachII is out thanks to Dan Wilson! He did a great job taking the same Contact Manager example and porting it to the MachII framework. His implementation is really clean, using Plugins and Filters to extend the MachII framework, not to mention that the layout he built for the example is much prettier than mines :)

The code is really clean and should make sense for every MachII developer. I'll try to write some documentation and instructions, but that will take some time. Sorry for delaying this post Dan, I really appreciate your contribution and so does the CF Community.

Enjoy.

ajaxCFC Update: addOptions() - serializeForm()

I just updated the ajaxCFC distribution files to include an update to the addOptions() utility. The y! group has been talking about passing a CF Query to the addOptions() function for a few weeks and thanks to the contribution of Jeff Lester it's possible now. It behaves exactly like the addRows() function, where it takes _cell_ functions to get the value and text of the returned query. It is usually easier to learn by example, so check out how it's done.

Additionally, some of you must be familiar and frustrated with the lack of ability of passing an entire form as an object; if you try, you'd get an maximum recursion error. I wrote a small function in my contact manager example that takes a form and serialize it into a JavaScript object, so I chose to include it into the DWRUtil namespace... You can now call x = DWRUtil.serializeForm(document.frm) and pass it to your Ajax call.

JSMin for ColdFusion

JSMin is a utility to compress JavaScript by removing unnecessary whitespace and comments. Unlike obfuscation, it doesn't rename any of your variables or functions, leaving the core functionality intact. Depending on amount of comments, this utility may save from 50-80% on file size. Here's a good Minification Vs. Obfuscation article.

Darryl Lyons released CFJSMin, a ColdFusion utility to compress JavaScripts. I'm not sure why would you want to compress your scripts from a server side scripting language instead of running a binary executable... I guess that if you have a source folder and production folder you could automate changes... CFJSMin also has the ability of taking several input files and save them all in a single compressed file. This is good for caching.

Darryl, if you're reading this, here's a request: I'd like the tool to read several JS files as input, but instead of writing a target file, I'd like the output in a variable.

In addition of compressing your files, take a look at gzip and real time data compression. Here's a good article on how to set your IIS to compression. For those who run apache, I know it's really easy, but I don't have the information handy.

This blog is running version 5.9.003. Contact Blog Owner