Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at cf.Objective() 2010 (Minneapolis, MN) with: Simon Free and Dan Wilson

Confirmed Availability Of Java String Methods In ColdFusion

By Ben Nadel on
Tags: ColdFusion

For anyone who follows my blog, you know that I LOVE using the underlying Java methods of ColdFusion objects. I had went back and forth with Ben Forta a bit about this, but apparently, Jason Delmore at MAX 2006 has confirmed that this is, in fact, a completely valid way to program in ColdFusion.

Freakin' sweet ass sweet! Java and ColdFusion is such a sexy couple. They might get the neighbors talking, but I know they're in it for the long haul.



Reader Comments

As I posted in another blog mentioning this exact same thing, if you need to do a lot of string manipulation, you should be using StringBuffer anyway as strings are immutable in Java.

Reply to this Comment

Brandon,

While I think that java.lang.StringBuffer is awesome!, it doesn't do the same thing as java.lang.String. Specifically, it doesn't have String::ReplaceAll() and String::ReplaceFirst(). So, in cases where the "lots of manipulation" involves regular expressions, I can't really take advantage of the efficiency of the StringBuffer.

Reply to this Comment

Using Java String methods in ColdFusion should be fine for the forseeable future, but I'd be careful of it even in the near term from the pure Compatibility point of view. BlueDragon.NET is not likely to use the same string methods, and I don't know if even BlueDragon.JAVA or Railo will allow you to use the Java String methods on arbitrary simple variables.

Reply to this Comment

Adam,

Interesting point... but out of curiousity, can one usually switch with ease to another programming language and have it be compatible. I know nothing about BlueDragon.Net or Railio so I am not sure what kind of compatability issues there are.

Reply to this Comment

BlueDragon and Railo are non-Adobe implementations of the CFML language. They're 99% compatbile with CFML, but the implementation details are of course slightly different. BlueDragon has a version which is based on .NET instead of Java, and Railo distinguishes itself by outperforming Adobe's ColdFusion in most benchmarks.

Reply to this Comment

Post A Comment

?
You — Get Out Of My Dreams, Get Into My Comments
Live in the Now
Oops!
Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.