Hi! Thanks for visiting my blog. If you've received any value from my content would you mind supporting my new startup by downloading our browser add-on? It's called PriceBlink and makes online shopping a breeze. You can watch it in action here and download it for Chrome, Firefox, IE, or Safari by going to PriceBlink.com. Thank you and I hope you enjoy!

Forcing Java CFX Reload in ColdFusion

Feb 28

I’ve been working on extending CF with a few Java utilities and came across a rather frustrating problem. Whenever I need to test a change in the CFX I have to restart the CF application server. Using ColdFusion MX 7, this process can take up to half a minute…..not the ideal development scenario.

So I discovered an attribute that I had read about in the past but have never put it to work. The attribute is called “reload” and I set the value to “always”. Therefore the call to the custom tag looks like:

<CFX_WEATHER zip=”75214″ reload=”always”>

This should only be done in a development environment as there is performance degradation in loading the class each time. Once you go to a production environment be sure to remove the attribute which will default to auto. This means the class will only be reloaded if it or a dependent class is changed.

Read More

Long Dates with Flash and ColdFusion

Feb 22

Dealing with dates can be a frustrating task when developing certain applications. After working with Web Services that return dates as long integers, I’ve had no problem handling them with Flash. Take the value 1109129227359 as an example. This is the number of milliseonds that have elapsed since midnight on 1/1/1970. The following code in Flash:

trace(new Date(1109129227359));

will print:

Tue Feb 22 21:27:07 GMT-0600 2005

So it’s fairly simple to handle these long values returned from a Web Service or any other service for that matter. With ColdFusion this is a different story. I never had to deal with long integers in ColdFusion, but didn’t find any functions readily available to use. I tried createdate, createdatetime, parsedate, parsedatetime all with no luck. Finally I tried calling:

#isdate(1109129227359)#

which printed “NO” and left me confused. After some further investigation I decided to try a little math and add the number of seconds that elapsed to 1/1/70. Which led to the following code:

<cfset variables.temp = 1109129227359/1000 />
<cfoutput>
#DateAdd(“s”, variables.temp, “January 1 1970 00:00:00″)#
</cfoutput>

Lo and behold! This worked like a champ but notice how I had to convert from milliseconds to seconds. For some reason CF didn’t support adding milliseconds even though the docs say there’s support for it: click here.

At some point I’d like to dig into this further but you know the saying, if it ain’t broke….

Read More

M2M Blog = Machine Blog

Feb 20

If you’re interested in learning about M2M or following what’s going on in the space, check out MachineBlog. I just released the site this past week and am working with a few co-workers and associates to provide up-to-date information on the M2M industry. We’ll be looking at M2M from all different angles including:

1. Software development (that’s my area of expertise)
2. Hardware
3. Carriers and gateways
4. Backend applications such as SensorLogic’s M2M Portal
5. System integration

If you feel that you have something to contribute to MachineBlog then please get in touch with me.

Read More

Nokia and Macromedia Join Forces

Feb 20

Nokia and Macromedia have teamed up to provide Macromedia Flash content on Series 60 devices. I can’t explain how excited this makes me! I’ve had a good amount of experience developing applications for Series 60 written in Symbian C++. Let me be the first to say that this isn’t for the weak at heart. I’ve spent hour after hour trying to figure out how to develop a rich user interface in Symbian and fell short many a time. This led to total frustration.

Now let me get excited again. Leveraging Macromedia Flash and more than a million Flash developers is the right move for both Nokia and Macromedia. I think this will lead to incredible digital experiences in the coming months. Yet these experiences won’t come to the desktop but right in the palm of your hand! As an application developer I believe this will lead to much more fierce competition. With this competition comes higher quality applications and the end user will ultimately benefit. Stay tuned for more mobile contentas well as some mobile Flash source code (Flash Lite to be exact).

Read More

ColdFusion MX 7 Reporting Using CFDOCUMENT

Feb 10

It’s late but I couldn’t resist blogging about ColdFusion MX 7, which was finally released two days ago. First off, ColdFusion has come a LONG way since the 4.0 days. That’s when I fell in love with the technology and never looked back. You see I work in a shop of hardcore Java developers, the best in the business and I’m sure they think I’m crazy when I start talking about ColdFusion. I’m sure you’ve had the conversation as well. If you ask any serious Java developer they’ll most likely laugh at CF.

My point is not that CF is better than Java because it runs on a Java engine and CFML compiles down to Java bytecode. Anyway, I would like to stress how Macromedia has done an amazing job with the latest version allowing developers to generate reports with the greatest of ease.

So I wanted to take a quick look at one piece of the reporting functionality in CFMX 7. I want to walk you through the steps of creating a static PDF using HTML wrapped up in the CFDOCUMENT tag. So your general CFML will look like the following:

This simple code will generate the following PDF:

Note that I’m using the free developer edition which is stamped on all the reports. I’m not sure to what extent the reporting engine supports HTML as well as CSS. I will be doing some more experiments and post my results here. I can confidently say that you won’t find an easier way to generate reports with any other technology. The crazy thing is that I haven’t even started talking about the CF report builder which is a WYSIWYG tool for creating report templates. More on that later!

Read More