Skip to main content.
austin
phoenix
el paso
albuquerque
It has been awhile since I have posted. So, I thought I would through up some gatchas that have come up in a project I am working on. The project is a Work Flow System. It allows users to create customizable work flows that follow defined rules. The application went through OOAD (Object Oriented Analysis and Design). The result of the application was a set of Objects that represented our Model in MVC methodology. This each object in the model contained its Getters and Setters. The Getters and Setters set and retrieved values stored in the objects properties. Kay, nothing new here.

Well, were do you store these objects? I have been working with CFC's for sometime now and have always thought it to be a best practice to store these objects in the Application Scope. This will not work for CFC's that are storing values in the component's properties. It doesn't work because ColdFusion is going to call your objects by reference. It does not create a copy of the objects value. So, your values will get stomped on.

this will not give you a unique object in the variables scope:
myObjectVar = application.myObject.init();

You will need to create a new object:
myObjectVar = createObject("component","classpath");

Well, that works great. Especially, if you are on CF8 because CFC's run 28 times faster than on version 7. Well, that's great for those that are in houses that upgrade fast. Here we are not upgrading for at least another 9 months. So, we take a significant hit in speed to create the objects every time.

We have made the decision to store a set of the object in the Session Scope. This allows each users to have their own set of objects to work with. The objects can always be reset using 'init()' and if more than one of the same object is needed, then we are forced to use CreateObject.

Now, I wrote this post rather fast. Please let me know if more clarification is needed or if you have alternate solutions.
The cfdocument tag is a great tool to keep in your tool box. The tag is only going to get better as Adobe and Macromedia work together to give it more PDF functionality. All is great. Well, like most tools we do not become expert users until the need arises.

My CFDOCUMENT tip:

When developing your document it may seem useful to develop using FlashPaper because the load time seems less. However, after several hours of troubleshooting it appears that the PDF format is a bit more robust.. So, develop using PDF!!!
Reposted from Ray Camden's Blog:

Adobe Labs has released a free Apollo book,

Apollo:Books:Apollo for Adobe Flex Developers Pocket Guide

This book clocks in at 108 pages and considering the price (again, free), it is something you should pick up if you are going to start playing with Apollo. It even has a mini-Cookbook, which I'm a big fan of.
How do you like that title? Many of us live in a world of acronyms. From XP to DLP thru AS3 and SCUBA. :-) Funny story. I am in a interview for and we are talking shop. The acronyms are flying, XML, CSS, JS, CFC, AS, SQL, AJAX, SOAP. Then the guy leans over and asks me with the most serious face, "Do you have any experience working with UPS?" The question throws me back into my seat. I have no idea what he is talking about. I search my brain for, U-P-S?? I draw a blank. I am embarrassed. So, I tell him that I don't know what that is. He says, "You don't know what UPS is? The postal service?"

Well, on to my Tip.

Since ColdFusion 6, the application file has been even driven when the dot CFC extension is applied. Events for Errors, Events for when the Application Starts, others for Session Starts and Stops, Requests.. It is all there. Nifty right! Okay, we will come back to this.

Now, creating a CFC (class) and filling it with Functions (methods) is great. But you still have to initialize then invoke the methods. Now I have seen a lot of developers get off track here. Instead of initializing the CFC on every page that needs to run the method, you should consider saving this CFC to application memory. It would look something like this (inside Application.cfc):

< cffunction name="onApplicationStart">
< cfset application.contactI = createObject("component", "contact")>


Now when you need methods inside that CFC.. All you have to do is call it out of memory. That would something like this (inside the calling page):

< cfset contactMeta = application.contactI.getContact(Object_id)>

--------------------------------

Does that make sense? Now, the only downside to this is that if you are developing the CFC, you are going to have to restart the application to test changes. This because it is storing the initialized CFC (Class) in memory. Well, this is handled by including a couple of lines of code in onRequestStart Function (still in the Application.cfc)

< cfif isDefined("url.init")>



So, thats my tip. I hope it helps. If you dont understand this, please post back.. and I will answer your questions.


I have been developing a SPRY App and have been having a bit of trouble debugging. Check out FireBug a plugin for FireFox. Too bad the app I am working on is for an Intranet (designed for IE6) and already has a bunch of Browser Issues.

Let me know if this helps anyone out.
According to Ben Forta's blog, MAX 2007 is going to be in Chicago. (MAX North America: September 30-October 3, 2007, Chicago, IL )

So, get ready we are going to Chi Town.
For some reason the Flex Builder IDE will not install on Vista. In order to make it work, just install Eclipse 3.2 first. Then install Flex Builder as a Plug-in. It works like a charm. Plus you have the sleeker interface of Eclipse 3.2.

Cheers.. best of luck.
I am currently doing some consulting work for the Las Vegas Water District. Their tool of choice for development is HomeSite. Over the past couple of weeks I have had to get used to working in this new workspace. At first I was hesitant. But today I opened up the IDE and can tell you there are some things I really like about it. I love the way it loads incredibly fast. I don't use a 10th of the features in Dreamweaver. I don't use the WYSIWYG nor all the short cut buttons. So, why load them right?

The verdict is in HomeSite is a superior product for hard coding web sites or CF Apps. At MAX06 I sat in on a large conversation on whether or not Coldfusion Developers needed their own IDE for development. The verdict came in that CF's appeal to the mass market is its ability to be picked up by just about anybody, quickly. There for Dreamweaver was perfect because it came with the tools to create applications and web sites without ever having to see code.

Where does that leave me and developers like myself who can not use the wizards because we have the insight to know that they just mess everything up. Eclipse? HomeSite? Dreamweaver? Maybe even, NotePad++?

It is my opinion that it is best to work with developing technologies rather than dying ones. I would have to say that that rules out HomeSite and NotePad++. Eclipse is certainly on the rise has even received the Adobe blessing for the CF Plugin. Perhaps the one of the best solutions was the CF Eclipse Plugin used with Flex Builder (which is Eclipse).

Eclipse's Flexible IDE makes it the best solution. With the FLEX Framework built in you can not wrong. After all the FLEX, CF partnership is very strong via Flash Remoting. So, I am saving up my pennies and soon will shell out the $500 for Flex Builder, for now I will continue to use HomeSite. ;-)

I just finished loading Vista Ultimate on my laptop. Man, what a different experience. It really feels so different than XP. Its going to take me awhile to get used to it. I can say that I am very pleased with the aesthetics. I love all the transitions and intuitive user interface. It really feels like SUSE or an Apple.

I have a feeling that this is a sneak peek at what type of applications and user experiences are going to be available with Avalon and the .Net 3.0 Framework. I was reading that .Net 3.0 has a whole new interface something or another that lets .Net'rs build rich applications. Now, I know Microsoft is behind on the web side. The best they have to offer is Atlas, their AJAX framework. Don't get me wrong its nice, easy to use and powerful. I just dont feel that AJAX is the final solution for robust rich internet apps. However, on the Desktop side this is a true monster in the room for Adobe's Apollo. MS just has such a vast developer base.. It is going to be interesting to see what the web and desktop is going to look like in the next 5 years.

Vista is worth loading. But wait until it is released to the public. I am having trouble finding some drivers and a good antivirus.

It was released the other day that Microsoft and Google are stepping up their R&D in China. China has been a huge concern for sometime. They offer lower wages and higher skills than can be found here in the US. They have a huge middle class that is highly educated. Until now US companies have leveraged this skill to do non-creative type work. India has been processing IRS Forms for sometime now and China has been doing manufacturing for as long as I have been alive. So, what does it mean if we are starting to shift creative jobs to China? What are the limits on the leveraging of these resources?

Will American companies have buildings architected in China to be built in the US? If you read "The World is Flat", Tom Friedman will have you believe that all things are subject to outsourcing. But if everything is outsourced what does that leave Americans to do.

Well, looks like I missed the point I was trying to make. If R&D moves to China, then corporate head quarters are not too far behind. Loosing Corporate Headquarters and R&D would flip the tables on what it means to be American.

Cheers
The Alpha for Mango Blog has been released. The blog is featured on AS Fusion. It is a sleek looking ColdFusion blog that supports the hosting of multiple blogs and is pretty extensible out of the box. There are a few bugs that have to be worked out. I would incourage everyone to register for the download of the Alpha to ensure that you are able to take part in the Beta release.

Take a minute to check out Billster.net - It is an Alpha product (Beta coming soon) for tracking expenses. The web app has a lot of Flash Charting, sleek AJAX and RSS Feeds for everything, but most importantly it is very easy to use.

There are so many improvements that can be made. It would be nice if they had a mobile version, so I could track these expenses as they happen. Or maybe on the bills that are owed to me, they could add some sort of invoice generator.
I actually recently upgraded to my two browsers of choice, IE and FireFox. I used to have IE6 around out of pure necessity, but I have to tell you that I am very impressed with IE7. I am actually forced to use IE at Northrop Grumman, so I am getting some good use out of it. There are some pretty nice extensions (or add-ons) for it. Particularlly the developer tools. However, in true MS fashion the majority of add-ons are for sale, some at very steep prices.

Now, I should have known better to upgrade my FireFox so early in the game. I should have given all the plug-ins a chance to catch up. After the install the browser was very unstable. I began to remove and disable the plug-ins and I think I finally have it right.

So, I am very curious. How are you guys doing in your browser stats?

For the month of November:
I still have IE6 and FireFox 1.5 as my top two browers. And if you compair FireFox usage compaired to IE, I have 9% of users on FireFox. Not too bad. At this point IE7 only represents about 1% of the users. That leaves IE6 with roughly 84%. I suspect all these number will shift as soon as IE7 is pushed via the MS Updates. Which is a really good thing, because it handle CSS much better.

Let me know what you think about these browsers? Are the browser wars on again?

This is just a note that is worth placing on the web. If you ever find yourself forced to work with ColdFusion 5 and the client asks for Charts. Make them upgrade or chose a third party charting tool. It is just too much work to get this tag to work. And its stability is questionable.
check out this cool little tool called "Snippy". It lets you select, copy and paste areas of your screen. The tool takes a print screen and crops it automatically to the area that you select. Snippy is very easy to use and should definitely be something in your tool box.

http://www.bhelpuri.net/Snippy

If anyone has any other tools that we shouldn't be without, please feel free to post it here. I know that there are a lot of great FireFox plugins out there.