A bit over a year ago, I posted an entry about the features and functionality I would of liked to of seen in Blackstone. As most of you know, Blackstone was the code name for ColdFusion MX 7, and now that I’ve had quite awhile to “kick the tires” so to speak, I thought I’d do a follow-up post though I haven’t honestly had time to look at all of the new features and changes. Here is the basic list of items I’d hoped to see:
- Threading
- Image Manipulation Tags/Functions
- Export to PDF/FlashPaper
- CFC OO Enhancements
- <cfhttp> Performance Increase
- Full functional support for GZip and PK/WinZip (compressed) files
- Support for a True Escape Character
- Stronger, Industry Standard Encryption
- Better Webservices Support
- Improved Support for Whitespace Suppression
- <cffile> Support for Line By Line IO
Looking at this list a year later, several of those items look to be things which I haven’t needed since that period of time. One other thing I’ve come to slowly wrap my head around since then is that ColdFusion should not be a replacement for Java, rather it should compliment Java. For instance, chances are if you know the advantages of reading a file line by line (while I’m at it–hey Java, where is a native fscanf()?), you probably can implement that functionality in Java rather than needing to use a ColdFusion tag based wrapper around the same functionality.
Using the above list, I’ll address each one of them in detail:
1. Threading
One of the features I’ve found most helpful in ColdFusion MX 7 is the new Event Gateway functionality. At a high level view, Event Gateways can basically be described as a version of threading, however they do MUCH more than that such as interaction with a variety of protocols, as well as providing listeners for events. As of this writing, I’ve mostly used them to thread long running processes, so I associate them more with threading than anything at the moment.
I was initially let down that there wasn’t a native way to return results, and try as I might, I couldn’t quite wrap my head around a way to make that sort of functionality work. Luckily Sean Corfield recently released the Concurrency Library which takes care of that problem.
I think my personal favorite attribute about the Event Gateway feature is that it makes thread management painless by managing a thread pool for you. Basically you can “thread” as many requests as you want by calling the event gateway, and it will only run the number of threads at a time which you specify, while queuing up and managing the requests beyond that number. Using the Event Gateways, I improved the performance of some major functionality on a yet to be released product somewhere in the neighborhood of 200-300%.
2. Image Manipulation Tags/Functions
Well, we still don’t have this built into ColdFusion. I don’t find this to be a major hindrance given that I mostly write “back-end” applications, but it seems like something that should just be there since most other web scripting languages have this functionality.
3. Export to PDF/FlashPaper
This functionality was implemented, and it seems to work really well. I’ve worked with a couple of PDF generation products over the years, but the ease of use for this functionality built into ColdFusion MX 7 simply blows away 3rd party products.
4. CFC OO Enhancements
This is one hot issue which really wasn’t addressed in ColdFusion MX 7. Given that I’ve learned a lot more Java, GoF design patterns, and general OO theory in the past year, I now have a much better understanding of some of the limiting factors in CFC’s. To me, interfaces are one of the most important issues to address.
Another OO feature which I haven’t seen mentioned anywhere within the CF world– the ability to import CFC packages. One thing that I don’t like doing is having to call functions in a shared scope or invoke them which are part of another framework rather than being able to import the components I need from that Framework to accomplish a task. Maybe there is a better way to do this within CFC’s as they exist now that I’m not aware of, but I still think it’s something which should be doable.
Constructors of some shape or form would also be nice, though I think most people who desire them are used to creating init() functions which return the component instance at this point.
5. <cfhttp> Performance Increase
Honestly, this is something which was limited to a particular instance where moving something from CF5 to CFMX showed a major degradation in performance. This system hasn’t been used in awhile, nor have I done any sort of comparison, so I have no idea if this was addressed or not. If not, I suppose there are always Event Gateways…
6. Full functional support for GZip and PK/WinZip (compressed) files
This is something which wasn’t addressed, but can easily be done through Java. This is the type of thing I usually end-up implementing in another language like Python anyhow (usually scripts to clean-up log files, incoming batch files, etc). This is one of those cases where I should of reminded myself that ColdFusion ISN’T Java.
7. Support for a True Escape Character
ColdFusion isn’t Java!
8. Stronger, Industry Standard Encryption
The Encrypt() and Decrypt() functions now support DES, Triple DES, AES, and Blowfish encryption algorithms. You can read more about these new types here, as well as within the ColdFusion Documentation.
9. Better Webservices Support
It’s been quite awhile since I’ve had to write a webservice for a production product, so I find it hard to comment on this one. I do know that a lot more options are available as far as being able to access the SOAP request and response headers though. Though I haven’t worked with them for awhile, it seems that webservices are more of a global problem than something only ColdFusion specific.
10. Improved Support for Whitespace Suppression
This continues to be a problem in ColdFusion. There are a few workarounds for this including servlet filters, but this still seems to be an area for improvement in ColdFusion.
11. <cffile> Support for Line By Line IO
This is another “CF isn’t Java” issue I believe.
Overall, the new functionality and bug fixes in CFMX 7 are well worth the upgrade. I do think there are a couple of fundamental issues which still aren’t being addressed such as whitespace problems and the lack of image generation/manipulation functionality, but in general I’m pretty happy with what was released. It seems like a lot of the OO issues in the community were kind of skirted over for this release, but hopefully they will be taken more into consideration for the next release.
Looking back, I do think quite a few items on my list either don’t really apply to any hurdles I’m still trying to jump over, and some of them are also items which are too Java-like which probably do not solve problems or save time for the typical ColdFusion developer at the end of the day.
I’ll try to post a new wishlist for the next version of ColdFusion in the next week or two. Until then…
5 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Actually there was _lot_ done with WS. Along with being able to inspect the SOAP request/response, you can also modify them now. You can call different service ports on a WS (which apparently is an extremely rare use-case, but used in MS MapPoint). You can also check to see if the current request is a SOAP request. This would let you check in a CFC if you are being called via FR or WS.
There is more too – from the release notes:
The cfinvokeargument tag has a new omit attribute that allows you to omit arguments to a web service that you invoke.
New cfcomponent attributes enable ColdFusion MX to publish document-literal style web services.
* style=”document” : switches the emitted WSDL to document/literal style.
* hint is now used as the document element of the service in WSDL.
* displayName is now used as the name of the element in WSDL.
* servicePortName is used as the name of the element in the service.
* portTypeName is used as the name of the element in WSDL.
* bindingName is used as the name of the element in WSDL.
* namespace is used as the default namespace of the service.
* wsdlFile=”" – Use this file as the WSDL instead of generating
WSDL on the fly.
Thanks Ray. I haven’t touched a webservice since before 6.1, but that’s very useful information to know.
Re: cfhttp. The tag was rewritten for ColdFusion MX 6.1 (Redsky) and does not have any (known) performance issues. We use a different HTTP client library than the JDK URLConnection class that was used in 6.0.
Yeah, it’s been quite awhile since I played with the particular script which was running cfhttp. I honestly can’t remember if it was 6.0 or 6.1 at this point.
Basically the script looped through many, many URL’s and seemed like it took forever. Someone else at the time had CF 5 on their box at work and the speed difference to run the same script was simply dramatic– 6.X would take almost a minute to run, while 5 would process it in less than 10 seconds. Probably a rare test case where you would need to use that functionality anyway, but the difference in performance between the two was pretty astounding. It certainly could of been that cfhttp on 6.X was doing DNS lookups each time and maybe 5 only did it once (they were all calls to the same domain)… no idea really.
I got a connection failure when using cfhttp. I have provided the values for the following attributes: url, port, method, proxyserver, proxyport, proxyuser, proxypassword, username, password, and resolveurl=yes. But still got the Connection Failure message. Is there a solution for this error?