Viewing by month: February 2005

Feb 24 2005

Output="false" is important!

Something I'm trying to discipline myself to do is to more fully "attribute" my CFC tags. One optional attribute I see left out pretty frequently is the OUTPUT attribute on CFComponent and CFFunction.

If you're developing OO-style CFCs with Getter and Setter functions for properties, output="false" can become very important. Without it, string results seem to sometimes have a carriage return added to them, which can cause some wild and crazy results!

4 comments - Posted by Joe Rinehart at 12:33 PM - Categories: ColdFusion MX

Feb 23 2005

More CF and ASP.NET: Barry B and Me

Yesterday's CF vs. (ASP).NET post brought on some interesting thoughts on ASP.NET from Barry B., and I wanted to both share those points and my thoughts along the same line. Barry's comments are in italics.

Read more...

2 comments - Posted by Joe Rinehart at 9:23 AM - Categories: ColdFusion MX | .NET and ColdFusion

Feb 22 2005

CF vs. .NET: Six month comparison

Need some <CFAmmo> the next time someone says .NET? I've dealt with both, in parallel, for about six months now. This is my reflective comparison between the two.

Read more...

12 comments - Posted by Joe Rinehart at 11:07 AM - Categories: ColdFusion MX

Feb 22 2005

CF Queries in .NET via Web Services: A Better Approach

In my recent CFDJ article on ColdFusion and .NET via Web Services, I wrote about a somewhat ugly way to send CF Queries to .NET. At the time, I struggled with finding a better solution, but couldn't get anything else to work.

I revisited the problem recently, and found that I now seem to be able to get data out of the QueryBean result that'll let me use a CF Query in .NET without performing any sort of transformation on the CF side.

You'll probably still need to perform some .NET-side transformation to get a bindable result, but at least you can now do transformation only if needed.

Without any further ago, here's a sample CFC that returns a query:

<cfcomponent>
<cffunction name="getQuery" access="remote" returnType="query">
<cfset var query = queryNew("Id,Value") />
<cfset var i = "" />
<cfset var j = "" />

<cfloop from="1" to="#randRange(50, 100)#" index="i">
<cfset queryAddRow(query, 1) />
<cfset querySetCell(query, "Id", "Id_" & i, i) />
<cfset querySetCell(query, "Value", "Value_" & i, i) />
</cfloop>

<cfreturn query />
</cffunction>
</cfcomponent>

And a C# client for it (assuming you've built a web reference to the CFC's wsdl in the queryTest namespace):

queryTest.queryServiceService myService = new queryTest.queryServiceService();
queryTest.QueryBean result = myService.getQuery();
   
Response.Write("Query Results:<br />");
         
int i;
int j;

for (i=0;i<result.columnList.Length;i++)
{
   Response.Write(result.columnList[i] + " ");
}
      
Response.Write("<br />"
);

for (i=0;i<result.data.Length;i++)
{
   Object[] row = (Object[]) result.data[i];
   for (j=0;j<row.Length;j++)
   {
      Response.Write((string) row[j] + " ");
   }
   Response.Write("<br />"
);
}

2 comments - Posted by Joe Rinehart at 8:11 AM - Categories: ColdFusion MX | .NET and ColdFusion

Feb 17 2005

CFDJ Readers' Choice: Vote Indie!

The jComponents wound up nominated for a CFDJ Reader's Choice awards! They're the only product in their category from an individual (me!) instead of a company. They're holding their own in 4th place, and I need your help! If you've used them and liked them, please go vote for them at http://sys-con.com/mx/readerschoice2004/index.cfm.

6 comments - Posted by Joe Rinehart at 8:58 AM - Categories: jComponents

Feb 16 2005

Many faces of Macromedia.com

There's a post over on Neil Straghalis' blog about the structure of the Macromedia web site in which he links to an old design on the wayback machine. I thought it'd be fun to go explore the redesigns Macromedia.com has been through.

The results were fun, so I thought I'd share:

1996 - We've got Times New Fever!

http://web.archive.org/web/19961022175211/http://www.macromedia.com/

1997 - Splash pages and wrapping BG images

http://web.archive.org/web/19970329032420/www.macromedia.com/uber.html

1998 - The White Site

http://web.archive.org/web/19981111184531/http://www.macromedia.com/

2000 - The Square Look

http://web.archive.org/web/20000619095122/http://www.macromedia.com/

2001 - New Century, New Design

http://web.archive.org/web/20020603154456/http://www.macromedia.com/index.html

2003 - And then, this happened.

http://web.archive.org/web/20030610171210/http://www1.macromedia.com/

Future versions are a little wonky, as the Wayback machine doesn't handle the CSS properly.

1 comments - Posted by Joe Rinehart at 7:29 AM - Categories: ColdFusion MX

Feb 15 2005

Be a Journaling Hero

Ok, a long-overdue follow up to the "Be a DAO Disciple" post. This post shows how abstracting your data layer can allow you to add very powerful features with relative ease.

Read more...

12 comments - Posted by Joe Rinehart at 9:24 AM - Categories: ColdFusion MX