Friday, March 30, 2007

CFUnited is coming up

I wanted to take a break from working on Scorpio, the next major ColdFusion release, to plug CFUnited. Here are the top 5 reasons to attend:
  1. I am speaking. See my weirdly scaled face here. I am giving a talk on how ColdFusion Scorpio will integrate with the latest release of Flex Data Services. It will contain some of the material that I covered at MAX last year, but I think many of those attendees will want to hear it all again now that they have had a chance to try CFMX 7.0.2 and FDS 2.01 together. You have tried it out, right?
  2. CFUnied is the ColdFusion conference. I don't mean to slight the others, I love them too. (In fact I am trying to wrangle my way over to cf.Objective in May because I spoke there last year and had a great time.) But CFUnited is where we (the CF Team) have decided to show up in force. While we love MAX, it isn't the Allaire DevCon any more. CFUnited comes close for me.
  3. Scorpio. Can't really say much about this, but I'll bet that there will be lots of stuff for us Adobe types to talk about. :-)
  4. Its Fun. I don't think I paid for a drink or a meal last year. That is a good thing!
  5. You will learn a lot. The speakers lined up are always top notch and I consider it part of my job description to attend as many sessions as possible. I always learn something new, even if it another crazy way that CF users have taken something we've done and used it in a way we didn't expect at all. Also, did I mention I am speaking?
In any case, anyone who uses ColdFusion should try to attend if they can.

ColdFusion MX 7.0.2 Cumulative Hot Fix 2

In case you miss it on one of the many places that are publishing this information, Adobe has release the ColdFusion MX 7.0.2 Cumulative Hot Fix 2. This wraps up a bunch of fixes that you may (or may not) be interested in. Enjoy!

P.S. Scorpio is coming along nicely and the end is in sight if I squint real hard with the sun at my back. :-)

Friday, March 02, 2007

Apache Axis and Commons HTTPClient

Someone asked me how they could turn on NT Authentication for web service using Apache Axis (the web service used by ColdFusion). By default Axis uses its own HTTP client code, org.apache.axis.transport.http.HTTPSender, to send the XML/SOAP POST requests to a web service. This uses HTTP 1.0 and generally works file.

Axis also supports the Jakarta Commons HTTPClient library, and has since 1.0. To configure Axis to use this instead of its own library you must edit the client-config.wsdd file used by Axis. It gets found on the classpath and generally you don't actually have one and the one built in to axis.jar gets used.
The interesting line is the http transport. To switch Axis to use the HTTPClient jar, you would change this:

<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"></transport>

To this:

<transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"></transport>

Once you have this code configured, Axis will use the HTTPClient library for it HTTP needs. Since the HTTPClient library supports NT Authentication, you just set the username/password on the Stub object as you would normally do for (say) Basic Authentication and it will just work. If you are talking to a .NET web service, you are done.

BUT switching the line in the client-config.wsdd file alone doesn't do the trick if you are talking to a ColdFusion web service. Talking to a ColdFusion web service via Apache, you will get an "411 - length required" error back that looks like this:

The Apache JRun connector doesn't allow chunked encoding without a content length (generally true for all general pupose connectors, including mod_python) and the CommonsHTTPSender class in Axis does not provide a content-length. Go figure.
Using the built-in JRun web server you get a a "content not allowed in prolog" error because it appears the JRun web service doesn't understand chunked transfer encoding. Go figure again.
I didn't try it with IIS. My guess it that it might work.
To solution? Turn off the chunked encoding, which you can do by setting a property on the web service object in CFML like this:

ws = CreateObject("webservice", "http://localhost/ws/service.cfc?wsdl");
httpheaders = CreateObject("java", "java.util.Hashtable").init();
httpheaders.put("chunked", "false");
ws._setProperty("HTTP-Request-Headers", httpheaders);
result= ws.myOperation();

The Apache code wants a Hashtable, where it should just look for a Map, so you can't just use a CFML structure for the value of the HTTP-Request-Headers.


Thursday, February 15, 2007

Status Check

I have really been head down working on Scorpio, the next major revision to ColdFusion. I guess I have a ton of things to say, but its mostly about things I can't talk about. :-)

We just finished a beta release and while reading the release notes I was struck by how much "stuff" we have crammed in to this release! I really think that there will be something in there for almost any ColdFusion developer. From language tweaks, new tag attributes to major new pieces of functionality - we really are offering something for everyone.

I really can't wait till I can talk more about the individual features! Sorry for the tease but its always quited before the storm.

Sunday, December 31, 2006

Happy 2007

Just an end of year note to wish you and yours a happy New Year. May you ring in 2007 with the people who are important to you.

Oh and if anyone received a Tivo this year (what took you so long?) feel free to reference tjordahl at adobe.com when you sign up and send some Tivo reward points my way. I am saving up for the Series 3 (85,000 points) and I only need 80,000 points to go. :-) The good news is that each referral is 5,000 points.

But seriously, 2007 is going to be a great year for ColdFusion. The team has been rolling toward our first Scorpio Beta with a killer set of features that we hope will continue to make our customers even more amazingly productive with our stuff. We think Scorpio is going to have something for everyone, from language enhancements to major new features that we hope will rock your world! Stay tuned!

Friday, December 01, 2006

ColdFusion MX 7.0.2 Cumulative Hot Fix 1

Get your hot fresh bits. ColdFusion MX 7.0.2 Cumulative Hot Fix 1 is now available from the Adobe support web site.

There are also a few other separate updates available from that page, including an update to a new Verity patch level, an update to the cfform Java applet certificate, updated DataDirect JDBC drivers (only if you need it!) and a Flash Remoting ("classic", not the 7.0.2 "update" for AS3) fix for returning structures to Flash.

Enjoy!

Wednesday, October 11, 2006

MAX is coming up soon

Just wanted to remind everyone that Adobe MAX 2006 is coming up on Oct 24-26, which is just under two weeks away. Registration ends on Oct 16 (onsite registration will still be available). ColdFusion users should definitely attend this year as a) its in Las Vegas and b) My session on Flex FDS and ColdFusion integration is a must see :-)

The keynote sessions promise to be pretty interesting this year. Day 1 will cover the "Adobe Engagement Platform", which should be something that any CF developer should probably understand. Not because ColdFusion is at the center of it (think Flash and PDF) but because Adobe will be talking about this a lot in the next year and it will help the CF team if you know what it is when we start talking about how CF fits in to all the pretty boxes. :-)

The Day 2 keynote is going to have lots of Adobe mobile info (yes, I sometimes get tired of hearing about flash on phones too) , but also the MAX awards, which I think are always neat.

The Day 3 keynote will be the sneaks session we have had in many past DevCon/MAX shows. The ColdFusion team has some stuff we want to show at this one. Can't say much more about that, but you can bet that the other groups in Adobe will have some real cool stuff to show too.

I am presenting my session twice, Tuesday at 4:15pm and Wednesday at 10:30am. I will also be manning the Adobe booth on Monday afternoon and Tuesday morning, plus I am sure I will be loitering around at other times too. You wont be able to miss me or the other members of the CF team as we will be wearing yellow bowling shirts (yikes!) when we are not wearing the official Adobe uniform for MAX.

Hope to see you all there!

Wednesday, September 13, 2006

ColdFusion Email Validation, IsValid(), And CFMail Errors

Ben Nadel posted a comparison of the differences in behavior between the IsValid() function for Email addresses in ColdFusion 7 and the addresses that the CFMail tag will accept.

I posted this as a comment on his blog, but thought it was interesting enought that others might want to know what is going on.

The IsValid() function uses the following regular expression to determine if the email is valid:
"^[a-zA-Z_0-9-'\+~]+(\.[a-zA-Z_0-9-'\+~]+)*@([a-zA-Z_0-9-]+\.)+[a-zA-Z]{2,7}$"

The CFMail tag uses the Sun Java class javax.mail.internet.InternetAddress parse() function. Since the implementation uses JavaMail, this is how we generate the InternetAddress objects that we pass in for the addresses (to, from, cc, etc).

The "strict" attribute is turned on. The JavaDoc says of this:

"Parse the given sequence of addresses into InternetAddress objects. If strict is false, simple email addresses separated by spaces are also allowed. If strict is true, many (but not all) of the RFC822 syntax rules are enforced. In particular, even if strict is true, addresses composed of simple names (with no "@domain" part) are allowed. Such "illegal" addresses are not uncommon in real messages.

Non-strict parsing is typically used when parsing a list of mail addresses entered by a human. Strict parsing is typically used when parsing address headers in mail messages"

See the InternetAddress JavaDoc at http://java.sun.com/products/javamail/javadocs/javax/mail/internet/InternetAddress.html

In general I think that the more strict IsValid() behavior is a good thing, and importantly it matches the client side validators used for forms in the browser. This is what it is intended to do (match client and server behavior).

Tuesday, August 08, 2006

Flex 2 and ColdFusion seminars

Just wanted to note that Adobe is offering some seminars across the United States featuring Ben Forta talking about Adobe Flex 2 and Macromedia ColdFusion MX 7. Its worth checking out if you leave near one of the (currently four) cities Ben is coming to visit.

On a related note, I am going to be giving a detailed session at MAX in October (which I am working on today!) about the CF and FDS integration we released in ColdFusion 7.0.2.

Wednesday, July 12, 2006

Ashwin blogs about the ColdFusion Template Cache

Ashwin, a member of the CF team, has just posted a revealing entry in his Stake Five blog about Tangling with the Template Cache. Check it out for information about one of the two most important settings in the ColdFusion administrator (the other is Simultaneous Requests) works.

Friday, July 07, 2006

ColdFusion 7.0.2 (Mystic) Released

ColdFusion 7.0.2 has been released (I am late, we announced it at CFUnited on June 28, 2006).

Find the release notes here: http://www.adobe.com/support/documentation/en/coldfusion/mx702/cf702_releasenotes.html

While there is a link in the release notes, I wanted to explicitly spread the word on where to find the documentation for the new Flex 2 integration features we have added. The new chapters can be found at
http://www.adobe.com/go/cfmx702docs


In addition there is a ton of new content in the Adobe Developers Center.

Lots of great content - Enjoy!

Thursday, June 29, 2006

Another ColdFusion team members blog

On of the newer members of the ColdFusion team, Ashwin Mathew, has started up a blog about ColdFusion among other things. Ashwin has posted a great article on caching and plans to follow it up with some interesting posts about how CF does its internal caching of things like template.

Ashwin is also here at CFUnited this week. Check it out.

Thursday, June 22, 2006

CFUnited next week

Since I am on a blogging roll this week, I wanted to note that I and many other members of the ColdFusion team will be attending CFUnited next week.

Even though I am really looking forward to Adobe MAX in Las Vegas this fall (probably because I love BlackJack and Vegas), CFUnited is where "my peeps" are at since it is focused almost 100% on ColdFusion. Through some quirk of fate, I am not giving a session this year (I guess I am not famous enough :-). But I will be hanging at the Adobe booth for large chunks of time and attending as many sessions as I can. I really find it fascinating to hear people explain features of CF that I have had a hand in designing. It is almost like a game of telephone - where someone whispers a message to another person on down the line, then you compare what the last person in the line says to the original message. The result is always surprising. Sometimes the message gets through, sometimes it gets really garbled. :-) But in every case it allows me to get a better view of the problems our customers are solving (or not solving) with CF so that next time I can get it closer to right.

This is your chance to harass me about how CFCs should be "just like" Java objects, why CFML should be strongly typed, why we should rewrite the file browser in the CF administrator to not use Java, why you can't possibly use CF anymore because we don't have {cfimap,cfimage,etc, etc}. I will have my laptop and access to source control, so maybe you can convince me to add/fix/remove something that you have always wanted in Scoprio right on the spot! :-)

See you there!





Wednesday, June 21, 2006

A Better Way to Make a String Array

I was jumping through some hoops to generate a true Java String array in CFML yesterday to pass in to a web service API. Today, while talking to some of the guys on the CF team it came up that there is a really simple way to get an array of Strings in CFML: Use the Java String split() API!

Code before:
string = CreateObject("java", "java.lang.String");
array = CreateObject("java", "java.lang.reflect.Array");
cookies = array.newInstance(string.getClass(), 3);
array.set(cookies, 0, "x=1");
array.set(cookies, 1, "x=2");
array.set(cookies, 2, "x=3");

Code After:
s = "x=1,x=2,x=3";
cookies = s.split(",");
I would say the second way is much easier. It is using a regular expression, so it isn't going to go as fast as the first code sample, but for something like this I would not worry about it at all.