<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Use ColdFusion?  Use Java.</title>
	<atom:link href="http://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/</link>
	<description>Thoughts, rants, and even some code from the mind of Barney Boisvert.</description>
	<lastBuildDate>Thu, 11 Sep 2014 09:58:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sean Corfield</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87125</link>
		<dc:creator>Sean Corfield</dc:creator>
		<pubDate>Fri, 09 May 2008 18:47:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87125</guid>
		<description>Great post Barney! Jason Delmore&#039;s talk was really good - it was fairly basic and introductory but it did touch on how powerful it can be to leverage Java under the hood in similar ways to what you mention (he specifically showed the vast String API that Java offers to CFML developers). The more exposure we can get for this approach, the better IMO.</description>
		<content:encoded><![CDATA[<p>Great post Barney! Jason Delmore's talk was really good &#8211; it was fairly basic and introductory but it did touch on how powerful it can be to leverage Java under the hood in similar ways to what you mention (he specifically showed the vast String API that Java offers to CFML developers). The more exposure we can get for this approach, the better IMO.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87119</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Fri, 09 May 2008 18:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87119</guid>
		<description>The biggest RAD-killer for CF/Java hybrids is that if you want to write any Java, you end up adopting the JEE development model of frequent server cycles.  One of CF&#039;s biggest assets (probably it&#039;s biggest) is it&#039;s automatic recompilation of code.  Lose that, and CF is a LOT less useful.  And with the proliferation of more native Java frameworks (like Grails), removing CF&#039;s dynamic compilation probably pushes CF from the top position in terms of developer time optimization.</description>
		<content:encoded><![CDATA[<p>The biggest RAD-killer for CF/Java hybrids is that if you want to write any Java, you end up adopting the JEE development model of frequent server cycles.  One of CF's biggest assets (probably it's biggest) is it's automatic recompilation of code.  Lose that, and CF is a LOT less useful.  And with the proliferation of more native Java frameworks (like Grails), removing CF's dynamic compilation probably pushes CF from the top position in terms of developer time optimization.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: barneyb</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87118</link>
		<dc:creator>barneyb</dc:creator>
		<pubDate>Fri, 09 May 2008 18:15:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87118</guid>
		<description>Larry,

One thing to watch out for is indexes.  CF uses one-based indexes, but Java uses zero-based indexes.  So if you use the code you showed:

&lt;code&gt;
&lt;cfset foo = myArray.indexOf(variables.valueToFind)/&gt;
&lt;/code&gt;

&#039;foo&#039; will be off by one if you use it in CF manipulations of the array.  Not a hard problem to work around, but another one of those things that makes CF/Java more cumbersome than it ought to be.</description>
		<content:encoded><![CDATA[<p>Larry,</p>
<p>One thing to watch out for is indexes.  CF uses one-based indexes, but Java uses zero-based indexes.  So if you use the code you showed:</p>
<p><code><br />
&lt;cfset foo = myArray.indexOf(variables.valueToFind)/&gt;<br />
</code></p>
<p>'foo' will be off by one if you use it in CF manipulations of the array.  Not a hard problem to work around, but another one of those things that makes CF/Java more cumbersome than it ought to be.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Kotek</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87112</link>
		<dc:creator>Brian Kotek</dc:creator>
		<pubDate>Fri, 09 May 2008 17:59:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87112</guid>
		<description>The main issue is casting. CF will try to cast things if it can, but one still ends up with lots of JavaCasts in their CF code when working with Java objects.</description>
		<content:encoded><![CDATA[<p>The main issue is casting. CF will try to cast things if it can, but one still ends up with lots of JavaCasts in their CF code when working with Java objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: R.J. Salicco</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87110</link>
		<dc:creator>R.J. Salicco</dc:creator>
		<pubDate>Fri, 09 May 2008 17:43:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87110</guid>
		<description>Great article. I have been in a few environments where Coldfusion developers sat next to Java developers and no one spoke about the possibilities of leveraging service/data api&#039;s, already written in Java, by exposing the api&#039;s to Coldfusion Web applications. Why shouldn&#039;t Coldfusion Web applications reap the benefits of service/data tiers complimented by technologies like Hibernate and/or Spring? Coldfusion&#039;s Web Service integration is nice and simple, so why not just expose your Java api&#039;s? I understand that most Java shops are not going to go out and spend the $$ to bring Coldfusion in, but if you are already working with both technologies in your shop or you have some ambitious Coldfusion developers who want to learn Java, all you need to do is get to work.</description>
		<content:encoded><![CDATA[<p>Great article. I have been in a few environments where Coldfusion developers sat next to Java developers and no one spoke about the possibilities of leveraging service/data api's, already written in Java, by exposing the api's to Coldfusion Web applications. Why shouldn't Coldfusion Web applications reap the benefits of service/data tiers complimented by technologies like Hibernate and/or Spring? Coldfusion's Web Service integration is nice and simple, so why not just expose your Java api's? I understand that most Java shops are not going to go out and spend the $$ to bring Coldfusion in, but if you are already working with both technologies in your shop or you have some ambitious Coldfusion developers who want to learn Java, all you need to do is get to work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick McElhaney</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87101</link>
		<dc:creator>Patrick McElhaney</dc:creator>
		<pubDate>Fri, 09 May 2008 16:13:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87101</guid>
		<description>@Brian - Good point. I forget how much CF does to shield me from Java&#039;s type system.</description>
		<content:encoded><![CDATA[<p>@Brian &#8211; Good point. I forget how much CF does to shield me from Java's type system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larry C. Lyons</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87100</link>
		<dc:creator>Larry C. Lyons</dc:creator>
		<pubDate>Fri, 09 May 2008 16:04:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87100</guid>
		<description>For the last couple of years I&#039;ve been developing mainly hybrid CF/Java apps. Java adds a lot to CF, for instance since arrays in CF use the java.util.List class, the indexOf method is very good for returning the position of an item in an array that you&#039;re for:

&lt;cfset foo = myArray.indexOf(variables.valueToFind)/&gt;

This blog posting,
http://coldfused.blogspot.com/2007/01/extend-cf-native-objects-harnessing.html
gives a  lot of suggestions on how to utilize java with CF.

regards,
larry</description>
		<content:encoded><![CDATA[<p>For the last couple of years I've been developing mainly hybrid CF/Java apps. Java adds a lot to CF, for instance since arrays in CF use the java.util.List class, the indexOf method is very good for returning the position of an item in an array that you're for:</p>
<p>&lt;cfset foo = myArray.indexOf(variables.valueToFind)/&gt;</p>
<p>This blog posting,<br />
<a href="http://coldfused.blogspot.com/2007/01/extend-cf-native-objects-harnessing.html" rel="nofollow">http://coldfused.blogspot.com/2007/01/extend-cf-native-objects-harnessing.html</a><br />
gives a  lot of suggestions on how to utilize java with CF.</p>
<p>regards,<br />
larry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rachel Lehman</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87086</link>
		<dc:creator>Rachel Lehman</dc:creator>
		<pubDate>Fri, 09 May 2008 14:42:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87086</guid>
		<description>@Brian - I sort of formed my perspective on this with the hope that the future direction of CF will position it as more of a &quot;services&quot; platform, and that integration with Java (or various other model tier options) will improve in the future. Maybe I&#039;m overly optimistic :)
I see your point: while advanced developers *could* write Java - they have the skills - it&#039;s certainly not RAD, so CF has a real opportunity to become a better productivity layer for Java.</description>
		<content:encoded><![CDATA[<p>@Brian &#8211; I sort of formed my perspective on this with the hope that the future direction of CF will position it as more of a "services" platform, and that integration with Java (or various other model tier options) will improve in the future. Maybe I'm overly optimistic :)<br />
I see your point: while advanced developers *could* write Java &#8211; they have the skills &#8211; it's certainly not RAD, so CF has a real opportunity to become a better productivity layer for Java.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Kotek</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87074</link>
		<dc:creator>Brian Kotek</dc:creator>
		<pubDate>Fri, 09 May 2008 13:47:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87074</guid>
		<description>@Patrick: sure that works for small, one-off uses of the underlying Java API. But doing any significant Java coding within CFML is like pulling teeth, since things like static methods or properties still require an entire CreateObject call to get at, and so does every other Java object. Add on the need to cast everything properly to be sure CF is passing the right types and it adds up to an extremely cumbersome experience. At that point you&#039;re probably better off just writing your own Java classes or wrappers and calling them. But there is no doubt that whichever way you do it, there are drawbacks and hoops to jump through.</description>
		<content:encoded><![CDATA[<p>@Patrick: sure that works for small, one-off uses of the underlying Java API. But doing any significant Java coding within CFML is like pulling teeth, since things like static methods or properties still require an entire CreateObject call to get at, and so does every other Java object. Add on the need to cast everything properly to be sure CF is passing the right types and it adds up to an extremely cumbersome experience. At that point you're probably better off just writing your own Java classes or wrappers and calling them. But there is no doubt that whichever way you do it, there are drawbacks and hoops to jump through.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick McElhaney</title>
		<link>https://www.barneyb.com/barneyblog/2008/05/08/use-coldfusion-use-java/comment-page-1/#comment-87070</link>
		<dc:creator>Patrick McElhaney</dc:creator>
		<pubDate>Fri, 09 May 2008 13:30:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.barneyb.com/barneyblog/?p=390#comment-87070</guid>
		<description>&quot;Yes the interface to Java from the CF level is cumbersome and creating hybrid CF/Java applications pretty much costs you CF&#039;s RAD capabilities...&quot;

Not if you hide the Java inside UDFs. 

function ArrayReverse(myArray) {
  return createObject(&quot;java&quot;, &quot;java.util.Collections&quot;).reverse(myArray);
}</description>
		<content:encoded><![CDATA[<p>"Yes the interface to Java from the CF level is cumbersome and creating hybrid CF/Java applications pretty much costs you CF's RAD capabilities&#8230;"</p>
<p>Not if you hide the Java inside UDFs. </p>
<p>function ArrayReverse(myArray) {<br />
  return createObject("java", "java.util.Collections").reverse(myArray);<br />
}</p>
]]></content:encoded>
	</item>
</channel>
</rss>
