CONTACT PORTFOLIO SERVICES BLOG COMPANY HOME
Blog(id)

January 17, 2007

FUSEBOX 5.1 Relocate

Filed under: Coldfusion, Fusebox — jlr @ 3:57 pm

I’m a little late on this one but the fact that Fusebox has Javascript relocates is a huge addition.

Sean’s Blog

October 4, 2006

Parameters in Fusebox 5

Filed under: Coldfusion, Fusebox — jlr @ 5:09 pm

We have just finished our first project with Fusebox 5 this week. The only thing we have done differently so far in our architecture is using the new Parameter Tag. I have to admit I didn’t know we needed this, but now I think we did.

We have had many discussions around here about reusing our code in different Fusebox applications. In Fusebox 4.1 we added the appropriate circuits to the application and then use <set /> to set any variables we needed. So our code looked like this in the controllers :


<fuseaction name="show_page">
  <xfa name="exit" value="app.show_page" />
  <set name="attributes.file_name" value="some_file.txt" />
  <set name="attributes.folder" value="/tmp" />
  <do action="app.upload" />
  <do action="v_app.dsp_page" contentvariable="content.main" />
  <do action="v_app.dsp_layout"  />
</fuseaction>

Which worked pretty well. I had no real issues with it until I started using Fuesbox 5 and <parameter />. It basically lets you tie the variables to your do’s and includes. So the new way looks like this :


<fuseaction name="show_page">
  <xfa name="exit" value="app.show_page" />
  <do action="app.upload">
    <parameter name="attributes.file_name" value="some_file.txt" />
    <parameter name="attributes.folder" value="/tmp" />
  </do>
  <do action="v_app.dsp_page" contentvariable="content.main" />
  <do action="v_app.dsp_layout"  />
</fuseaction>

This is even more valuable for parts of the application that require more parameters. So far this is my favorite new feature.

September 8, 2006

Coldfusion OS X Crash

Filed under: General — jlr @ 2:41 pm

This is kind of a stupid thing, but it had me stuck all morning so I thought I would share.

I currently do all of my coldfusion dev work on my OS X laptop. The CFMX7 install for apache is very nice :) . When I was working on one of our applications this morning I would run a few pages and then CF would return blank pages. So I would restart it and try again to no avail. I went into my CF admin settings for the JVM and noticed that my -XX:MaxPermSize was smaller than my Minimum JVM Heap Size. I set them to the same value and the problem went away. Simple fix but very frustrating.

November 3, 2005

Copy Tables Between MySQL Servers

Filed under: MySQL — jlr @ 11:38 am

One of the more frustrating things for me working with mySQL (even though on a daily basis I love it) is copying tables between production, test and development on my laptop. Well I figured it out today and thought I would share.

Here’s the code:

mysqldump -u [username] -p [password] [database_name] [table(s)] | mysql --compress -h [server_destination] -u [username] -p [password] [database_destination]

This is run from the mysql server you wish to copy data from. this is all on one line in *nix.

September 23, 2005

iText and Coldfusion MX7

Filed under: Coldfusion — jlr @ 11:52 am

CFMX 7 breaks all of my iText code so I was trying to find a soultion without breaking the CFDOCUMENT tag since I didn’t really want to break it.

I checked out Spike’s Blog about calling a class from a different class path (It was referenced on the Macromedia Forums.). This caused all sorts of errors for me about StructBeans and private methods. Since there are about 10 classes I use image,element, PDFTable, PDFCell this proved a problem. If anyone else got this to work I would love to hear about it.

So I went back to Aaron’s Blog, this is where I found out about iText to begin with. I post a comment that didn’t come through about Spike’s article, but decided to refactor the iText jar myself.

So I went to the iText Ant page and followed the directions to download a new copy and compile it.

When I had the source downloaded I renamed all the references for “lowagie” to “lowagie_new” and recompiled it. And presto it seemed to work. I compiled this on OS X so I am not sure if that will cause issues or not it seemed to work though.

Here is a link : iText 1.3 Refactored

To make it work add it to the Class Path for CF and when you use CreateObject use com.lowagie_new instead of com.lowagie.

So give it a try and let me know.

P.S. Does anyone know which version of iText Macromedia decided to use? It doesn’t seem to have any of the features of iText 1.3.

September 21, 2005

Subversion Folders

Filed under: Subversion — jlr @ 10:36 am

I missed this the first time I setup a Subversion repository, but there is a “default” folder setup most people use. Exspecially if you are going to use Eclipse. The folders should be setup like this:

  • /trunk
  • /branches
  • /tags

Where the /trunk folder is the current source of your project. In my case this is where you have you MVC and fusebox files. The /branches folder is for splitting the code I haven’t used this yet since it’s a little more advanced. The /tags folder is for making a specific revision a release. So if you realease revision 1.0 to production it would be /tags/revision1.0/.

Starting Out With Subversion

Filed under: Subversion — jlr @ 10:25 am

I have become a big fan of Subversion now that I have Ecplise and Subclipse working on my laptop. I am currently running on OS X and with the help of Sean Corfield’s Blog it works great.

We are hosting our source code with CVSDUDE and so far they have been extremely helpfull and the servers seem fast and reliable. Since we didn’t want to support an SVN installation and server here, we just wanted to use it. They also have WEBSVN installed which has come in very handy. I highly recommend them.

September 19, 2005

CFEverywhere

Filed under: Coldfusion — jlr @ 3:05 pm

As programming concepts go this has to be one of the coolest. I received the current CF Developer’s Journal and read the 3rd Part of their CFEverywhere article and decided to try it out.

The basic concept is to program an application in Coldfusion that can be run on a person’s computer or from a CD with no/minimal installation. The ability to Run a Coldfusion program without a server is a fantastic idea, but does it work?

I will have to say after playing with it for a few hours last night and a few hours today it does indeed work!

The instructions found in part one and two of Phil Cruz’s article worked like a charm on Windows XP. I got Jetty, Derby, and Bluedragon working along with the sample application. Once I was satisfied everything worked I decided to copy the files to my Powerbook to see if it was truely cross-platform…..

Unfortunately OS X had to be picky. Jetty and Bluedragon worked fine but Derby died everytime I tried to add a table or data to the DB. I tried everything I could think of, but the example seemed to have left out one important thing .

In the startdb.sh file it needs to have this as the last line to correct the errors:

java -Dderby.storage.fileSyncTransactionLog=true org.apache.derby.drda.NetworkServerControl start

It might be fixed in the new version of OS X but I have yet to upgrade.

I have tested 2 very small fusebox 4.0 and 4.1 apps so far and with some minor SQL changes (they are mySQL) they seem to run fast and without error. I have not tried the 3rd Part of the article of burning it to a CD and writing a Java program to start it, but I will try that next and pass along how it goes.

All in all this is a great idea and a wonderfull set of articles.

Powered by WordPress

-->