Tuesday, December 19, 2006

Great Sailing Video

This is one of the best sailing videos that I've ever run across. There's a lot going on including trimarans, catamarans, monohulls, sail boarders, and kite surfers all interweaving each other at high speeds.



So, are there any CF_Sailors out there?

More on Flash Activation

Continuing with my last post, SWFObject is another script that can be used to automatically activate a flash movie. I prefer this as it's a bit more flexible when dealing with menus that can hover above flash movies.

http://blog.deconcept.com/swfobject/

Activating Flex Apps and Flash Movies

It amazes me how many flex and flash apps that I run into that don't account for the ActiveX Activation Issue in IE. To prevent making a user click on the flash movie to activate it, and then interact with it, you can include a simple JavaScript file to automatically activate all flash movies upon load.

Learn more and download the necessary files from http://www.sitepoint.com/article/activex-activation-issue-ie. Then go ahead and add the following line to your application:

<script type="text/javascript" src="objectSwap.js"> </script>

Monday, December 11, 2006

Organizing your flex apps with code behind

As your flex apps get bigger and bigger, you may notice that many of your mxml files keep growing at an astonishing rate. First you just have a few component calls, then a couple of events, next thing you know it's ballooned to an mxml page with hundreds of lines of code. While this might not necessary be a bad thing, it can make it more difficult for other members of your team.

The following article describes how you can use code behind to help structure and organize your flex apps, all in a very simple and convenient way.

http://www.adobe.com/devnet/flex/quickstart/building_components_using_code_behind/

Friday, December 08, 2006

Interesting interview about Steve Wozniak

I just read a good article about Steve Wozniak. It brings out a few little known secrets about him and the hand he had in creating Apple, along with details about what he's really like. Here's a funny tidbit:

There are so many prank stories. I mean, they’re absolutely endless. Steve carries around books of two dollar bills. He actually goes to the mint — I guess if you have enough money, and you pay them enough money, they’ll give you your own sheets of money. And they’re funny, because they’re perforated. And so every time you go out with him,instead of paying like a normal person and giving them the cash; he holds out these long rolls of perforated two dollar bills and says, “How much is it? Okay, let’s count down… 2, 4, 6, 8… Okay, I’ll tear right here!” And at this point, the woman or the man behind the register always says, “That’s not real money. We can’t accept that.” And of course, it is real money, it’s just how he presents it.

http://www.10zenmonkeys.com/2006/12/07/apple-wozniak-biographer-interview-smith/

Thursday, November 30, 2006

Using a https certificate in Vista

Quite often I find the need to develop locally for a site using https. You can do this with Self-Signed Certificates in IIS 7.0. You don't have to install anything, so it's much easier to set it up than it has been in the past.
  1. Open IIS
  2. Expand your local server
  3. Click on Server Certificates
  4. Select 'Create Self-Signed Certificate' on the right.
  5. Enter a name (ie - local)
  6. Click on Web Sites
  7. Right click on Default Web Site and select Bindings
  8. Add a new Web Site Binding for https and select your 'local' certificate
  9. Click ok and close.
  10. For whatever reason, a restart was required, but this may not be the case for everyone.

Tuesday, November 28, 2006

ColdFusion Hosting at HostMySite.com

I recently launched a new site that's being hosted on HostMySite.com. It's been quite some time since I've had a site that wasn't hosted in house and have to admit that using HostMySite was painless.

Model-Glue works with their setup out of the box, and they were extremely helpful as we got things setup for the first time. You have to love 24*7 tech support that's actually 'with it'.

My only complaint is that I didn't have access to restore or backup my database, so I had to rely on DTS, although they can do these things for you if you request it. I imagine this is an issue with most shared hosts as SQL Server security surrounding restore and backups isn't easy to hand out to everyone.

Tuesday, November 21, 2006

Password Manager XP on Vista - Part 2

So, the guys over at CP-Lab finally got their password manager working properly on Vista. You need version 2.2.365 which you should be able to find here or the beta location if it hasn't been posted yet (2.2.363 was the latest posted version at time of writing).

Make sure you right click on the install file and install it as an administrator, otherwise you will probably run into issues when the browser integration is installed.

Script Debugger for IE on Vista

Since upgrading to Vista I have really missed the script debugger, it comes in extremely handy when working through your JS issues on IE. If you've never used it, you are missing out. It's quite a bit more powerful than the standard syntax checker that comes with Firefox, but I assume there are is a similar plug-in for Firefox.

To start, go download it here. You need to save it locally, perform the install, then update your IE settings under tools --> internet options --> advanced --> uncheck 'disable script debugging...'. Once that's done, you might want to play it safe and restart your pc. At least that's what I had to do.

I want to stress the fact that you need to save it locally, and then install it, as 'running' it from the microsoft site does not kick off the install properly.

Monday, November 20, 2006

Bold Text and Opacity Issue

Quite often I use opacity to control how certain items look. For example, I want inactive items to be appear lighter to reflect the fact that they are inactive or not as important. To do this, I use <div style="filter:alpha(opacity=50); -moz-opacity:.50; opacity:.50;">blah blah blah</div>.

One of the things I've experienced is that bolded text does not always display correctly. To get around this, you can set the background-color to white and this will get around the display oddities. So, after changing my code to the following, the opaqued text looks great.

<div style="filter:alpha(opacity=50); -moz-opacity:.50; opacity:.50; background-color: white;">blah blah blah</div>

Special thanks to a blog titled The Strange Zen of JavaScript for pointing me at this fix. I would highly recommend taking a look as he has quite a bit of good info on there.

Saturday, November 18, 2006

Cross Browser Gradient from SlayerOffice

I recently ran into an interesting issue with the cross browser gradient background script from SlayerOffice, in conjunction with qForms and FireFox. I noticed that none of my forms were submitting in FireFox, and it almost appeared as if the form fields weren't there.

#1 - Issue with the gradient script:

On line 34 of gradient.js, for(i=0;i<objArray.length;i++) needs to look like for(var i=0;i<objArray.length;i++) because the variable i is also being used in getGradientObjects().

Oddly enough, this was only causing a problem in FireFox 2.0, and not IE 7. I've sent the updated code to Steve at SlayerOffice so you should probably be able to get the updated code straight from http://slayeroffice.com/code/gradient/, but feel free to contact me if that's not the case.

#2 - Issue with qForms not loading:

Secondly, qForms was simply not working whatsoever. If someone else hadn't reported this problem, I would have reinstalled FireFox, that's how odd it seemed. On each page, I simply called qFormsInit() at the bottom of the page to kick off initializing qForms. This was occurring before the gradient background was applied, and therefore all of the form references in qForms were being blown away.

Instead, whenever code needs to be called upon page load, the following function seems flawless and works like a charm.

window.addEventListener?window.addEventListener("load",qFormsInit,false):window.attachEvent("onload",qFormsInit);

Check out the gradient script from SlayerOffice, it's fairly handy.

If you haven't heard of qForms, I would highly recommend checking out what Dan Switzer has developed, it's one of the best and most used JavaScript API's on the web.

Another ColdFusion Engine?

So, as of November 2nd, there is another free implementation of ColdFusion, called the 'smith project'.

http://www.smithproject.org/faq.cfm

It sounds like they have quite an uphill battle to get to the level where BlueDragon and Adobe's ColdFusion is. But regardless, this could be interesting if they change it to an open source model and let people run with it.

Friday, November 17, 2006

Lightbox JS

I happened upon cfPicasa on RIAForge and was pretty impressed with Lightbox JS. Lightbox JS is used to overlay images on the screen, but in a very smooth and intelligent way. I normally used subModal to accomplish the same effect, but this is much more visually appealing, and apparently would be easier to implement as well.

http://www.huddletogether.com/projects/lightbox2/

Cairngorm Diagram Explorer

This flash move allows you to navigate through all the events, dispatches, commands, etc, of a Flex application built upon the Cairngorm framework. It definately presents the in's and out's of the Cairngorm framework in a very interesting way.

http://www.cairngormdocs.org/tools/CairngormDiagramExplorer.swf

Is Cairngorm right for you and your next project? Find out here...

Monday, November 13, 2006

The Kingdom of Tonga just got bigger!

I like to sail, and have considered taking a trip to sail around the chain of islands that make up the Kingdom of Tonga in the South Pacific near Fiji, so this particular story caught my eye.

Apparently, two boats left Figi and sailed through what looked like a sand dune of pumus rock. They then realized that a volcano was erupting not too far away from them. Rumor has it that they actually discovered a new island that was just forming.



http://yacht-maiken.blogspot.com/2006/08/stone-sea-and-volcano.html
http://edition.cnn.com/2006/WORLD/asiapcf/11/09/new.island.ap/index.html

Wednesday, November 08, 2006

Microsoft Junk E-mail Reporting Tool

A friend sent me a link for the Microsoft Junk E-mail Reporting Tool. I'm an Outlook user, and therefore will do anything to cut down on spam.

Download it here...

Here's a summary, it's actually pretty convenient, or at least as easy as deleting the message manually.

The Junk E-mail Reporting Tool submits e-mail to Microsoft when you explicitly choose to do so. If you receive a junk e-mail and want to report it to us for analysis, first select the e-mail in Outlook and then click the junk e-mail button on your tool bar. You will see a pop-up window asking whether you want to report the selected e-mail to Microsoft and its affiliates. When you click “Yes” to confirm that you’d like to report the selected e-mail as junk e-mail, the junk e-mail will be deleted from your Inbox and sent to FrontBridge, a Microsoft company, for analysis to help us improve the effectiveness of our junk e-mail filtering technologies.

Monday, November 06, 2006

Making your flex apps more responsive

Most of these tips come from a MAX presentation given by David George from Adobe. His topic was "Tips and Tricks for Delivering More Responsive Flex Applications" and during the creation of Flex 1.5/2, he apparently spent quite a bit of time tuning Flex from Adobe's side of things, these tips will help you tune Flex from your side of the equation.

http://admin.adobe.acrobat.com/_a300965365/p71169528/


Deferred Creation
- Delay object creation until it's needed
- Built into the Accordion, TabNavigator and ViewStack.
- Can be subclassed, but doing it with the ViewStack is the easiest.

Ordered Creation
- For container creation, such as a panel, use 'creationPolicy="queued". This won't actually make the application load faster, but you'll be able to see certain sections of your app first and the others will show up when they are ready. This is better than waiting until the ENTIRE app is loaded, and then showing everything at one time, which occurs by default.

Use <mx:repeater> Carefully
- You're better off using a List with itemRenderer instead of using a VBox with a Repeater. This one is huge, more or less the is a no no. The repeater scolls more smoothly, so this should be the deciding factor on how you implement this.

Measurement/Layout: Definition
- #1 - Reduce container nesting
- Try to use HBox and VBox instead of a Grid
- Avoid nesting VBox inside of a Panel or Application
- The root of an XMSL component doesn't need to be a container
- * Use Canvas with constraints - Biggest increase here
- Look for containers that have one item, these are normally unnecessary
- #2 - Avoid Redundant Measurement/Layout
- Prevent numerous screen layouts when fetching images
- Get data after application has loaded from web services
- Delay requests until creationComplete
- Limit changes when responses are received
- Stagger requests or queue responses

Rendering
- Use control + e in the debugger to determine what sections of your application are being redrawn. This will help you cut down on useless processing.
- Use the cacheAsBitmap so that rendering occurs with an offscreen bitmap, this will limit the amount of redrawing that occurs.
- Another example is during a move event, the entire application could be created as a bitmap, so whatever you are dragging wouldn't force the app to constantly redraw.
- Don't use cached bitmaps when items are being resized often.
- Overall, only use cached bitmaps in particular situations where you can turn it on for a given time, and then turn it off when you're done moving objects, for examples.
- Use Resize.hideChildren when you're resizing regions.
- Filter and glow effects are very proccessing intensive, so use slowly.

Reducing Memory Usage
- Discard usused UI items. for example, use 'removeChild()' or 'removeEventListener()' when they are no longer needed. Event listeners can be very costly when not removed.
- Clear references to unused data such as 'myProperty = null;' or 'myWebService.blah.clearResult();'.

Setting Styles
- Changing a rule set is most expensive, such as StyleManager.styles.Button.setStyle('...').
- For inline styles, setStyle can be expensive if there are a lot of children.
- If a value will change at runtime, create a style for the button and make sure any buttons necessary are already listening for that style. You could also explititly set color information for any objects that will need to change.

URLs
DevNet Articles
- http://www.adobe.com/devnet/flex/deployment.html
Large Number of UI screens:
- http://livedocs.macromedia.com/flex/2/docs/00001523.html
- http://blogs.adobe.com/rgonzalez
Large amounts of data:
- http://weblogs.macromedia.com/mchotin

Saturday, November 04, 2006

Building Killer Desktop RIA's

Luis Polanco gave a nice breeze seminar about Apollo with some nice examples of current web-based applications that convert very well to desktop apps such as customization tools and sales/enterprise related apps.

Personally, I'm floored and can't wait for this. Apollo will open the doors to so many different types of applications that were flat out never feasible or possible to do in the browser. Finally, a true desktop experience without all of the overhead and headache of developing an HTA application.

If you're pressed for time, at least check out the examples that he has...

Check it here...

Leveraging HTML and JavaScript in Apollo Applications

Session from 2006 Adobe Max developer conference. Mike Chambers graciously posted a session that Chris Brichford, an engineer on the Apollo team, has that discussed how you will be able to leverage HTML and Javascript from within Apollo.

Check it out on Google Video...

There are some interesting 'versioning' logic that is being implemented by Apollo, such as it won't need it's own Flash Player install, instead it will use whatever the 'system player' is currently. So, down the line, the Apollo runtime may leverage the Flash 11 Plugin.

Also, you will be able to specify a specific version of the WebKit runtime. So, let's say you build your app and only want to test it on a single HTML runtime engine, specify the number in your application and you'll never have to worry about new versions of Apollo having a negative impact on your application.

Thursday, November 02, 2006

Password Manager XP on Vista

Ironically enough, Password Manager XP will not install nor run under Windows Vista. Under the hood, it uses EXECryptor.exe which isn't supported by Vista. They are hoping to have a new version up and running sometime in November.

http://www.cp-lab.com/

Monday, October 30, 2006

Apollo

If you haven't already heard about it, I would highly recommend checking out Apollo on Adobe Labs (http://labs.adobe.com/wiki/index.php/Apollo).

Apollo is promising to be a cross-OS runtime engine that will allow you to leverage Flash, Flex, HTML, and JavaScript in desktop software. The runtime will leverage the WebKit HTML / JavaScript engine, which is what Safari is based on.

Thursday, October 26, 2006

Cisco VPN Client

So, I ran into yet another roadblock with Vista when trying to install the Cisco VPN Client. I got it to install, but then could never get it to start. After doing some research, I found that they finally released a Vista capable version of the VPN Client.

You need to get version 4.8.01.0410 from Cisco, which requires you talk to your network admin and get the necessary credentials, or of course, you can try googling '4.8.01.0410' and you might come up lucky.

Modal windows using subModal

Modal windows, modeless windows, and popup windows all have a number of caveats that are somewhat annoying. Some time ago, I discovered subModal, which using an iframe, a div, and a nice mixture of CSS to create a great modal window overlay that is a joy to work with.

One of the biggest limitations with modal windows is that you can not interact with the 'opener', subModal allows you to do that. On the other hand, one of the biggest limitations of normal popup windows is that they tend to get lost, which won't happen using subModal.

I highly recommend that you check it out.

If you run into any problems with it, let me know as I've made a few tweaks to make it a bit more browser friendly.

SQL Server 2000 on Vista?

I read a number of articles that mentioned SQL Server 2000 will not install and/or is not supported on Vista. I just wanted to let you know that it WILL install. The only major caveat that I ran into was in enterprise manager when trying to connect to the 'local' instance. I had to dump that connection and connect to the actual named install of the sql server (which was my server name).

There is also an issue with SQL Server starting properly when Vista loads up. The MSSQLSERVER service was set to start up "Automatic" but in fact this doesn't work. If you change the startup type to "Automatic (Delayed Start)" things will work as expected.

All of that aside, based on the articles I read, along with all of the prompts Vista throws at you to essentially not install it, I don't know if I would install it on a production system, as Microsoft probably won't support it.

Good luck!

CFMX Setup on Vista

I just installed CFMX 7 on Vista Ultimate but it wasn't a very streamlined process. The CFMX installer doesn't support IIS 7 so a number of manual steps were needed after the fact. There is also a compatibility adjustment that you must make.

First, you need to run the ColdFusion Installer using the Program Compatibility Wizard. This will normally appear after the installer hangs. If it doesn't, the location to create a shortcut with is "%SystemRoot%\system32\mshta.exe res://%SystemRoot%\system32\acprgwiz.dll/compatmode.hta". There are a few options that you are going to want to choose.

  • Microsoft 2000 (Using Windows XP will not work)
  • On the next screen, choose 256 colors and all of the 'disable' options
  • Next, make sure you run this program as an administrator
This should get you through the basic install. For whatever reason, the isapi filter that normally handles each request is not created. A Script Map needs to be created in the Handler Mapping in IIS for your server.

Prior to setting up the Handler Mappings, you need to download jrun.dll from another installation and make sure that file exists in the following directory : 'c:\cfusionMX7\runtime\lib\wsconfig\1' -- You may want to simply copy the entire "1" directory under wsconfig.

First, pop open the IIS Console which looks like so, although you probably won't have either of the ISAPI options if you did a default install of IIS.

You will want to then open up the Handler Mappings option and create a new Script Map. You need to create one for your cfm files and another for your cfc's.

When you're done, the list of Handler Mappings should look familiar to this.

A this point, you should probably restart CF and IIS and give it a go.

Thursday, October 12, 2006

CreateTimeSpan() and Session Timeouts

I wanted to determine how long my sessionTimeout value was set for in a given application. After quite a bit of trial and error, a 'value' created with CreateTimeSpan() can be reverted or converted to minutes by using the following calculation:

value * 24 * 60

So, to put that in perspective when using session timeouts, the following code would be applicable.

<cfset appinfo = createObject('component', 'application')>
<cfdump var="#evaluate((appinfo.sessionTimeout * 24 * 60))#">

Sunday, September 17, 2006

Working with arguments in Model Glue

I ran into an interesting issue with arguments while using the model glue framework. The argumentExists() method and the getArgument() method do not work well together when performing an iff(). For example:

iif(local.arguments.event.argumentExists('showAllCompanies'), de(local.arguments.event.getArgument('showAllCompanies')), de(''))

The same code rewritten in the more archaic fashion works perfectly such as:

if( local.arguments.event.argumentExists('showAllCompanies') ){ local.showAllCompanies = local.arguments.event.getArgument('showAllCompanies'); } else { local.showAllCompanies = ''; }

Very frustrating, but then again, an easy workaround once you know it.

Wednesday, April 05, 2006

Missing Template Handler in ColdFusion MX 7

Setting up the missing template handler in ColdFusion MX 7 and actually getting it to work correctly is a little more involved than most would think. Here are the steps to get it set up correctly, and some details that aren't very apparent.

  • Open the ColdFusion MX 7 Administrator.
  • Determine what error handler should be used.
    I needed to setup the missing template handler for http://localhost/client1/. This meant that I needed to use /client1/common/error.cfm as my missing template handler value. The ColdFusion Administrator states to use a relative path, but this is really an absolute path from the webroot (this applies to the site-wide error handler as well).
  • Create a ColdFusion Mapping for this virtual directory.
    While attempting to do the above, the administrator kept telling me that the site wide administrator does not exist. To rectify this, you need to temporarily setup a ColdFusion mapping with the following attributes.
    Logical Path: /client1
    Directory Path: [insert path to 'client1' folder here]
  • Go back to the settings page and hit save. The CF Administrator shouldn't have an issue with your handler at this point in time.
  • You then need to setup your website or virtual directory in IIS so that it knows to use the CF 404 page, and that it needs to check for missing files.
    Please see http://www.macromedia.com/go/95ee04fb for more information.
  • Restart IIS and CF and everything should be working.

Items to note:

  • Once you setup IIS to check for files, 404 error messages will no longer be logged by ColdFusion. I'm assuming this is because IIS supercedes CF when it comes to 404 errors when configured similar to above.
  • When following these instructions, the error handler stays in effect even if the missing template handler is removed from the CF Administrator.
  • The ColdFusion Mapping that is required in order to successfully validate the Missing Template Handler value can be deleted once the handler is in place and accepted by the CF Administrator.

Saturday, April 01, 2006

Working with the ColdFusion MX Internal Web Server

Here is a good technote from Macromedia that describes the following items:

  • Using the built-in web server
  • Disabling the web server
  • Changing the default port number
  • Changing the root directory
  • Enabling different filename extensions
  • Disabling or enabling directory browsing
  • Adding a default document type
  • Adding a virtual directory or web mappings

http://www.macromedia.com/support/coldfusion/adv_development/config_builtin_webserver/