Made a little form that's fully ajax with no reload. The most time consuming task when working with jQuery seems to be evaluating all the different plugins people made.
So I wanted to document the ones I used for this little form, so I remember and maybe someone else would benefit.
1. Autocomplete - jQuery plugin 1.0.2
2. jQuery Form Plugin
3. jQuery jSelect plugin
I am still looking for a good multiselect UI element plugin. There are some good candidates but none integrate quite so easily on first pass.
Tuesday, May 12, 2009
Monday, March 9, 2009
Groovy javaloader goodness
In my usual mode of trying a bunch of things at once I was rewriting some slow Coldfusion 8 code in Groovy to see if I can improve performance. And I wanted to play with Groovy.
So I set up Groovy Eclipse plug-in and dove into Groovy documentation. I needed a way to plug my Groovy .class files into my Coldfusion code. Mark Mandel has a cool javaloader thing that I haven't used yet.
The advantage of using Javaloader is you don't have to reload Coldfusion every time you recompile your Java code. There might be other advantages but that one was my main interest. It didn't work right the way because I was using Groovy not Java, but Groovy is built on top of Java so what I needed to do is to add Groovy .jar to the loader.
Groovy has multiple .jar files in it's directory. I only had to add two, depending on the code you might need to add more or all I suppose. So if you get an error at first look closely at the Java stack trace and see if there are clues as to what other .jar you might need. For example at first I only added groovy-1.6-RC-2.jar file and after running code got an error "Object Instantiation Exception. "
In the stack trace there was a line:
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Opcodes
That was a clue to add asm-2.2.3.jar to the fold. (Thanks Brian ;-) )
So in the end it was great. I just worked in Eclipse, switch to Java perspective change my Groovy code, click run to refresh the class file. My Coldfusion files are in CFeclipse and are side by side with Groovy files. Integration dream.
Groovy code did end up being faster by the way then Coldfusion counterpart but I did optimize some things along the way so the comparison is not exact. I am thinking of converting it to Java for the ultimate gain, but Groovy is fast enough for now.
So I set up Groovy Eclipse plug-in and dove into Groovy documentation. I needed a way to plug my Groovy .class files into my Coldfusion code. Mark Mandel has a cool javaloader thing that I haven't used yet.
The advantage of using Javaloader is you don't have to reload Coldfusion every time you recompile your Java code. There might be other advantages but that one was my main interest. It didn't work right the way because I was using Groovy not Java, but Groovy is built on top of Java so what I needed to do is to add Groovy .jar to the loader.
Groovy has multiple .jar files in it's directory. I only had to add two, depending on the code you might need to add more or all I suppose. So if you get an error at first look closely at the Java stack trace and see if there are clues as to what other .jar you might need. For example at first I only added groovy-1.6-RC-2.jar file and after running code got an error "Object Instantiation Exception. "
In the stack trace there was a line:
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Opcodes
That was a clue to add asm-2.2.3.jar to the fold. (Thanks Brian ;-) )
So in the end it was great. I just worked in Eclipse, switch to Java perspective change my Groovy code, click run to refresh the class file. My Coldfusion files are in CFeclipse and are side by side with Groovy files. Integration dream.
Groovy code did end up being faster by the way then Coldfusion counterpart but I did optimize some things along the way so the comparison is not exact. I am thinking of converting it to Java for the ultimate gain, but Groovy is fast enough for now.
Thursday, February 19, 2009
Coldfusion type="numeric" bug/feature
A couple of my coworkers stumbled on an interesting issue. Here are simple tests.
Thanks Jamie for additional tests and findings.
Results in this output...
NO
YES
1,3,5
It seems that type="numeric" argument in the testFUnction should fail but it doesn't.
Also isNumeric(testVal ) doesn't agree with isValid('numeric', testval) though ColdFusion documentation says it should:
"float or numeric: a numeric value; equivalent to the IsNumeric function."
Also we confirmed (thanks Brian) that this exists in ColdFusion 9 beta.
Thanks Jamie for additional tests and findings.
Results in this output...
NO
YES
1,3,5
It seems that type="numeric" argument in the testFUnction should fail but it doesn't.
Also isNumeric(testVal ) doesn't agree with isValid('numeric', testval) though ColdFusion documentation says it should:
"float or numeric: a numeric value; equivalent to the IsNumeric function."
Also we confirmed (thanks Brian) that this exists in ColdFusion 9 beta.
Subscribe to:
Posts (Atom)

