Loading Java Classes on the Fly

Posted April 19, 2006 at 10:28 PM

Tags: ColdFusion

I remember probably a year ago, I started to really understand some of the benefits that ColdFusion had being built ontop of Java. Specifically, the power and speed of Java string manipulation that ColdFusion just couldn't match. I was really getting into Regular Expressions and Java seemed to be where "it" was at.

It was about that time that I attended a NYCFUG meeting about Java and Java Beans. During the presentation, it was demonstrated that the Java equivalent classes out performed the ColdFusion components (CFCs) by orders of magnitude. I had recently read a brief thing about Java Class Loaders or URL loaders or some such thing. Dismayed that the speaker did not know what I was talking about (and frustrated that I didn't know enough to fully explain myself), I was left to fantasize about super java-based classes that I would write that would turn their noses up at my old shoddy CFC construction.

I never really figured out how to load java classes on the fly. Since then, I have read several articles and blog entries on the topic and am fully aware that it is possible... but, I just can't motivate to do it. I guess the reason is that ColdFusion is just too easy and the stuff I am writing just doesn't have to perform to that degree of perfection. I like not having to worry about array lengths. I like that i can divide an integer and get floats automatically. I like that "00:15" is a DATE just like July 4, 2005 is, just like 3 is. Its too easy, which in turns make me happy and my programming better.

Post Comment  |  Ask Ben  |  Permalink  |  Print Page




Reader Comments

Bob
Apr 12, 2007 at 11:28 AM // reply »
1 Comments

This appears to have no point whatsoever, it's like listening to someone babbling to themself.


Apr 12, 2007 at 1:21 PM // reply »
6,516 Comments

@Bob,

I don't always have a point :)


Post Comment  |  Ask Ben

Recent Blog Comments
Nov 22, 2009 at 1:56 AM
Learning ColdFusion 9: Using CFQuery In CFScript Can Enable SQL Injection Attacks
Why adobe would give you script equivalent of cfquery is beyond me. I love cfquery tag because it helps me wriite clean sql, and get away from the horrible jdbc queries If I wanted to write javali ... read »
Nov 22, 2009 at 1:45 AM
Streaming Text Using ColdFusion's CFContent Tag And The Variable Attribute
The reason you would want to do this is to stream. Ack json/xml files to ria clients I used thus technique before because putting json in response stream causes debugging info to come thru As well a ... read »
Nov 21, 2009 at 6:47 PM
Hal Helms - Real World Object Oriented Development, Sarasota - Day Five
@charlie griefer, Thank you.. ... read »
Nov 21, 2009 at 5:15 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jose Galdamez, Oh heh yeah I didn't paste the whole code. I should have defined the vars -- my bad. It's fixed thou. Thanks. ... read »
Nov 21, 2009 at 4:49 PM
Styling The ColdFusion 8 WriteToBrowser CFImage Output
Great work yet again Ben! Whilst I didn't use this whole code, I copied some of your regex code for a similar problem with the lack of an alt attribute and unescaped ampersands in CFIMAGE for Railo 3 ... read »
Nov 21, 2009 at 1:13 PM
My First ColdFusion Builder Extension - Encrypting And Decrypting CFM / CFC Files
@Ben, Because I am pedantic, I just want to make sure that everyone knows there is absolutely no encryption going on. There is only encoding and obfuscation. The cfencode tool only obfuscates your C ... read »
Nov 21, 2009 at 12:28 PM
Using ColdFusion Structures To Remove Duplicate List Values
@Jody I can't seem to get your code sample to work. If you are still having problems, try this code out and see if it gets you what you wanted. <!--- Comma delimited list with various duplicates ... read »
Nov 21, 2009 at 11:03 AM
Groovy Operator Overloading Does Not Work In The ColdFusion Context
Hi Ben, Thanks for this informative post. Now I am reading ur old posts too ... read »