Wednesday, August 20, 2008

ColdFusion development on Ubuntu 8.04 - part 2

Picking up where I left off with setting up ColdFusion development on ubuntu. I decided to give VirtualBox a try. it's better to download one from the site. I used the binaries download link, not the OSE version. Install is pretty smooth I just double-clicked on the file and debian installer came up.

After that I setup and installed Windows XP virtual box. Had to do it twice since first time didn't give it enough space. Second time gave it 30G.

Installed MSSQL 2005 and restored a database backup.

So far so good. So now I need to connect to this database from host ubuntu (the windows xp in virtual box is referred to as "guest").

The best instructions that worked actually were in the VirtualBox help files.

I added another network adapter to my virtual XP and made that one HIF:

Run ipconfig in virtual XP to find the IP and that's the IP I used in ColdFusion admin to connect.
Remember to enable TCP/IP in SQL for connection:
Start-Programs-MS SQL Server 2005-Configuration Tools - SQL Server Configuration Manager - SQL 2005 Network Configuration - Protocols for MSSQLSERVER

Now I might need to make the IP permanent somehow, but I am very pleased that it works the way it is so far

Saturday, August 16, 2008

ColdFusion development on Ubuntu 8.04

In an effort to have our code tested on linux platform I once again embarked on a quest to setup developing platform on Ubuntu. Last time I had it all (except VPN) working but the hard drive failed.

Now with new laptop I am ready to go at it again. The laptop is Lenovo T60. Here is a list of applications:

Ubuntu 8.04 LTS Desktop edition
Downloaded and burned on CD, then boot from CD and choose install Ubuntu. Chose second choice for predefined partitioning.

Eclipse Java developers edition
Download and and untar somewhere. I just created eclipse directory in home directory. Added a link to "eclipse" executable to start it up. Also eclipse required Java so I installed that through Add/Remove... application in Applications menu. I installed openJDK 6 and Java Runtime 6, not sure which is required or both.

Once Eclipse started working installed following plugins:

Apache web server
For apache I chose to install LAMP, the instructions are found here:
no problems here

ColdFuison 8 developers version
Download ColdFusion from here
Pretty good instructions here:
The start up script is not created since Ubuntu is not supported platform and in the script that creates the startup scripts it's checking for linux flavor. I added couple of custom application launchers to top bar for starting and stopping ColdFusion. ColdFUsion needs to be started under sudo (or at least it appears that way) so I chose Application in Terminal so that I can type in sudo password when needed. I am sure there is a better way but I didn't want ColdFusion started on start up, and I wanted to be able to restart easily.

Spark IM client
This is a IM that we use at work. Like eclipse I just untar into folder and made application launcher to Spark executable.

VPN client or module or something
This was very simple and so far seems to be working fine. Installed VPN Connection Manager through Add/Remove... menu and VPN Connections option appeared in the menu when network connection is clicked. Just configured connection to our work VPN and so far seems to be working. I was able to get to internal websites and connect to internal database.

So far everything seems to be working pretty well.
We use MSSQL 2005 so if I want it localy I am not sure what to do yet.

Saturday, August 2, 2008

Strange behavior, objectid() method in component.cfc

So I was working on something OOP :-). And I am trying to use Hal Hellms BaseComponent.cfc that all CFCs that don't extend anything should extend. For the purpose of this post I reduced it to two methods:

The way I was using it is I included it into ColdFusion component.cfc that all CFCs extend by default:

So I also make test CFC and a cfm page:

When I run cfm file and expend the dump output I see following:

As you can see the objectid() method is missing.

Now I remove the include from component.cfc and make my test component extend BaseComponent

Run cfm again and get following:

Now objectid() method is seen in the dump.