How I got started in ColdFusion
I love Steve Bryants idea of How I got started in ColdFusion. As I have just started my ColdFusion adventure, my story is not that long, but rather interesting. I can't wait to read other peoples stories; they will be interesting for sure.
In May of '10, I graduated from the University of Rochester with a degree in Computer Science with a specialization in systems. Java was my main tool of choice and my projects ranged from AI bots to Gnutella networks. I have created some simple webpages with rail scaffolds, but nothing customized. I got hired by the firm Booz Allen Hamilton, and was expecting to do some systems for them.
After I started, I was recruited by an amazing group of people, Nic Tunney, Scott Stroz, Marc Esher, Brian Kotek, Joe Rinehart, Jon Morison, and Matt Sergi. Nic first exposed me to ColdFusion as I started working on my first real project for the firm. It was a head first dive into the web development. I was learning as I was going and being tutored by some amazing people. What separated ColdFusion from the rest of the technologies I have worked with is how easy it is to pick up. In no time, I was able to develop a professional web application.
I have learned so much from my team, and I am so thankful for it. They have really helped my progression from a newbie, to some who is now comfortable with ColdFusion. I cannot say how appreciative of them. Now, I use it on my own projects now and really enjoy every minute of development. Not only is ColdFusion fun to develop, I really enjoy the community as a whole. The DC area CFUG is always a fun time, and I cannot wait to meet a lot of people at RIAcon and other conferences I plan on attending in the future. It is sure to be a blast.
Long life CF and I cannot wait to see what the future brings.

ActionScript Objects
I have been working on a calendar and have uncovered an interesting aspect of ActionScript. Let me first raise an example and its output. In this example, I am making a start and end date of a calendar item. Lets just say the start date is now, and the length is an hour. This is how I first tried to do it:
`code
var startDate:Date = new Date();
var endDate:Date = startDate;
endDate.setHours(startDate.hours + 1);
`code
When I would run this, I found the that startDate and endDate were the same value, to the hour. Even though I only changed the endDate value, it still modified the startDate value. This is extremely puzzling. Then I had an epiphany. By setting endDate = startDate, I wasn't creating a new object of endDate with the same data, I was just creating a new reference to the startDate variable. That is why when I changed endDate, I also changed startDate.
For things like strings, I could easily do var s:String = new String(oldString);. This would create a new String object with the value of oldString. But with dates, the new Date() takes the parameters of Year, Month, Day, etc in that order. So I had to find another route. This is when I found ObjectUtil.clone(object)
The ObjectUtil.clone method creates an exact copy of the object and returns a pointer to it. Now I can modify the endDate and not affect the startDate. So the new code is as follows:
`code
var startDate:Date = new Date();
var endDate:Date = ObjectUtil.clone(startDate) as Date;
endDate.setHours(startDate.hours + 1);
`code
Just as a small point, you need to add the as Date clause such that the new pointer being returned can be type casted .
I see says the blind man.
I just got selected to speak at RIAcon!
This just in, I just got selected to speak at RIAcon. My topic "Using LCDS for real-time collaboration", will be a hands on crash course using ColdFusion, LiveCycle Data Services and Flex to create a real-time collaboration application. Over the course of my talk I will be explain how to get these three great technologies to work together, and some of the lessons I have learned while using them.
I am very excited for this opportunity. It will surely be a fun, educational session about some technologies I love. Thanks to Phil Nacelli for giving me this opportunity to speak at this conference and Nic Tunney for his help in critiquing this session.

Remove UIComponent from Parent, from Itself
A pretty common case in Flex is to have an element delete itself. In my case, I was creating a list of custom MXML components, and I wanted to delete button in each component that will remove itself from the list. This should be a pretty simple problem. It turned out to not be so simple.
As a first thought, I tried doing parent.removeElement(this). This didn't compile saying it was an undefined method. This makes no sense considering I KNOW the parent contains this method. After diving around the debuger a bit. I realized that the parent class was being typed as a UIObject, not a VGroup as it should. Then, with a simple typecast, the item can now remove itself. Here is the pertinent code snippet:
var vgroup:VGroup = (this.parent as VGroup);
vgroup.removeElement(this);
Please see the example below:
Example
You can view the source from the swf.
Amazon EC2 Bitnami WordPress Stack SFTP Problems
This wordpress blog is host on a free EC2 instance, with the Bitnami WordPress AMI. This was great for getting off the site up and running quickly, but I have spent many hours trying to get it configured. Being that its not your system, you have to look up all the default passwords and some things turn out to be rather difficult.
One thing that was hard was getting FTP access to the machine. After churning for a bit, I just decided Ill use SFTP to get access. By default, there is no password to the bitnami account. It requires your private key as authentication. After showing cyberduck where to look. I was able to log in correctly.
Then, I ran into a bitchin problem. I didn't have access to the folders I wanted. For some reason, the person who created the image felt that the user should have permissions to mess with their own server. Use the following line to give yourself permissions to folders of your choice.
sudo chown bitnami:daemon -R /path/to/your/folder
This also gives daemon account(the actual web server) reading writes.
Perfect! I have access to my own server again, haha.
Update:
When I did that, WordPress was not able to create directories itself.
Now I have to run:
sudo chown -R daemon /opt/bitnami/apps/wordpress/htdocs
This will give wordpress the rights needed to create folders and install plugins. If anyone knows how I can give both daemon and bitnami ownership that would be awesome. Ill let you know when I have figured it out also.
AWS Domain name set up
After a bit of bumping around, I finally got both my linux and windows server set up with the proper domains. Here are some of the things I have learned along my travels:
A means Address while CNAME is a Canonical Name record. Most domain name registrations companies default the first set up to a CNAME linking to their parking page. This led me to believe that I should just enter the EC2-xx.xx.xx.xx address. While trying to connect to my domain, it would keep forwarding to the EC2 address. Damn thats annoying. Anyways, I switched the record to an A and the registrar still complained. With a little bit of research, I found out about AWS elastic IP.
Basically, an AWS elastic IP is a static IP, that can be allocated to any of your EC2 instances. This allows you to have a real IP for a given service. Not only is this a IP address, it is actually movable. In the future, if I am doing a major upgrade, I could setup the updated application on new EC2 instance, then just reallocate the IP. Voila, a 0 downtime upgrade. Pretty sweet to me.
Now that I had the physical address, I can use it as an A record. Awesome, my domain names now works properly.
Cheers

Wow, that was easy
So I just started working with Amazon Web Services, and all I can say is wow. This blog took 10 minutes to set up. The user interface is amazing and the service just rocks. I will right a little more about AWS as I learn about it it.
ColdFusion ORM – Flash Remoting
I love working with ColdFusion. It creates a powerful backend easily, especially when working with Flex as the front end. The built in ORM is great for rapidly developing applications. I ran into a problem that my relationship entitys were not getting passed along when going from CF to Flex. After a bit of poking around, I found why. Its the remotingFetch argument. Just set it to true and the entities will be passed along when the object is passed.
1 2 | property name="users" singularname="user" fieldtype="many-to-many" cfc="model.user.User" linktable="Users_Calendar" fkcolumn="event_id" inversejoincolumn="user_id" remotingfetch="true"; |
Works like a charm. Hope this helps.
One word of caution, I am not sure what would happen if both sides of a many to many relationship allowed remotingFetch. Future post to come
Hello world!
Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
Firefox 4 – Flex Debugging Crashes Flash Player
dom.ipc.plugins.timeoutSecs = -1
That was all that needed to be done. Easy Fix. Hope this helps you out
