Marcos Placona Blog

Programming, technology and the taming of the web.

Month: November 2006 (page 1 of 3)

Javascript Dump?

Reading time: < 1 minute

This guy managed to create a kind of cfdump but for Javascript.

Can you imagine how many hours can be saved in Javascript debuging using this tool?

And the best thing: It’s a dump tool made by a CFDeveloper

Check it out!

Performance Test: isDefined x structKeyExists

Reading time: 2 – 2 minutes

The graphics will show it, but basically I was comparing the performance between the two of them. And guess what?

In my tests on CF7, isDefined seems to be slightly faster than structKeyExists.  The factor here is that isDefined() is super-fast when the scope exists, i.e. isDefined(“session.userID”), but really slow if a non-existent scope is used, e.g. isDefined(“unknownStruct.userID”).

However, in CF8 and Railo, structKeyExists() simply leaves isDefined() behind.

The code:




And the results:
StructKeyExists x IsDefined

Performance Test: CFMODULE x CFIMPORT

Reading time: 2 – 2 minutes

I have about 50 files to be used as modules in a particular system. You may ask me: “Why don’t you use them as CFC’s?”
The problem is that I don’t have the time to translate all the 50 modules into a Big and Fat CFC.
We’ve been using CFMODULE to access this modules for years, but now we suddenly had to change all the file structure, and will probably have to do it again in a non distant future.
I thought about using mappings with the cfmodule, so whenever I need to change the file’s path, I could just go to the admin and change the mapping. Also I thought about using CFIMPORT, so when I need to change the path, I just go to my Application and change the path there.
I then decided to do some performance tests, and found that CFMODULE is way faster than CFIMPORT as you can see:



World Top Companies Using ColdFusion MX

Reading time: < 1 minute

Some blogs already posted it, but I found it worth posting again.

World’s Top Companies Use ColdFusion MX

Tag of the day: CFIMAGE Captcha (part 2)

Reading time: 1 – 2 minutes

as this tag does a whole bunch of things, I decided to show one more usage example.
Today I’m gonna show some captcha:

Which will display something like this:
Captcha placona 1

Displaying something like:
Captcha placona 2 

Which displays my favorite and hardest one.

Captcha placona 3
See how easy we go from very simple to very complex captchas by only changing the attribute difficulty?
Hope you liked the examples.

Older posts