Archive for May, 2005

Installing Derby on ColdFusion

Tuesday, May 31st, 2005

After researching some other alternative solutions, I’ve been thinking about giving Derby a whirl in a project I’m currently working on. I was prepared to try to get it working in ColdFusion this evening and write-up a post about it. Before I started, I thought I should probably Google it to make sure I wasn’t wasting my time, and I found there was already a CFDJ article about it by Phil Cruz and Dick Applebaum.

I guess I can spend my evening doing something else. :)

My ColdFusion MX 7 Wishlist: How Did Macromedia Do?

Wednesday, May 25th, 2005

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:

  1. Threading
  2. Image Manipulation Tags/Functions
  3. Export to PDF/FlashPaper
  4. CFC OO Enhancements
  5. <cfhttp> Performance Increase
  6. Full functional support for GZip and PK/WinZip (compressed) files
  7. Support for a True Escape Character
  8. Stronger, Industry Standard Encryption
  9. Better Webservices Support
  10. Improved Support for Whitespace Suppression
  11. <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…

AJAX Design Patterns

Friday, May 20th, 2005

An interesting link I found on del.icio.usAJAX Patterns: Design Patterns for AJAX Usability.

Patterns are just a concise way to represent the knowledge embodied in the many AJAX applications that are out there. The point is to discover best practices by investigating how developers have successfully traded off conflicting design principles. AJAX is all about usability, so the patterns focus particularly on delivering usability in the face of constraints, most notably: user capabilities and expectations, bandwidth limits, the stateless nature of HTTP, the complexity of Javascript.

I haven’t used AJAX for anything at all thus far, but it’s something I’m keeping my eye on.

IBM Joins the Blogosphere and Begins to Support Firefox

Tuesday, May 17th, 2005

Over the past week or two, IBM has announced a couple of progressive items such as encouraging their employees to blog, as well as beginning to support Firefox in-house. Granted blogging has been around for at least 6 years now, but it’s good to see a large corporation supporting both open standards and open communication.

I think one of the biggest things they’ve done in years is throw their weight behind Linux, and it seems like it’s helped build them some momentum to moving towards a kinder, gentler IBM.

LinuxWorld Editorial Staff Resigns & My Sys-Con Media Experiences

Sunday, May 15th, 2005

I wasn’t really on the internet much on Friday as I was busy with work and also went out of town for the weekend, but apparently there has been a lot of buzz in the open source world in the past week or two about Sys-Con Media which seemed to culminate over the weekend with the editorial staff of LinuxWorld resigning. Sys-Con publishes a wide variety of technology related magazines including ColdFusion Developers Journal. (Disclaimer: I’ve been published by them– more on this later). I haven’t seen any other ColdFusion bloggers cover the issue, so I guess I’ll have to blaze a new, perhaps controversial trail here.

The buzz stems from a former LinuxWorld magazine columnist, Maureen O’Gara, essentially attacking Pamela Jones, the founder of GrokLaw. GrokLaw could be summed up as a community blog similar to Slashdot which covers technology legal issues, and is quite popular with those involved in the open source community. In particular, it’s probably most famous for calling out SCO on various issues related to their lawsuit against IBM and other Linux “intellectual property” related jackassery. Maureen was eventually dismissed from Sys-Con as a result of community pressure following this article.

The worst part about all of this is the recent interview of Fuat Kircaali, the publisher of these magazines. In his interview, he basically states that he pulled the aforementioned article because Sys-Con was getting DOS’ed, not because the article was unethical. This has created a lot of bad publicity and backlash for Sys-Con, including the whole editorial staff of LinuxWorld resigning. I’d also assume all of them were unpaid– I didn’t even receive a complimentary print copy of the issue of the CFDJ that I wrote in for instance, whereas I received several copies of Inside ColdFusion MX when it was published after I’d helped edit it in addition to being paid a small fee.

As I’m not an active reader of their other magazines, it appears that those publications have the reputation of being more controversial and gossip oriented than the CFDJ. For instance, the current leading article on the Sys-Con site as of this writing is “Does LAMP Challenge J2EE & .NET?” In my opinion, the CFDJ seems to be pretty much what you’d expect of a developer related magazine, but perhaps it’s left alone by the executive management since ColdFusion isn’t a sexy buzz word like “Java” or “Linux”. This “controversial” reputation explains a strange event that happened a few months back with some content I wrote.

A few months back, a post I wrote which did an informal comparison of job openings ended-up getting Slashdotted. During the middle of putting out server fires, I got an e-mail from someone at Sys-Con asking for my approval to publish that content, with a link to it on their site to preview it for my approval. I just assumed it was for the CFDJ, so I didn’t read much into it. I did find it strange that my author link didn’t appear, so I replied and told them I’ve wrote for them before, and to link it up to my author profile, but otherwise I was fine with them posting it on their site.

As it turns out, what I thought was going to be published for the CFDJ didn’t get published there at all, and instead ended-up on several Sys-Con sites including LinuxWorld, .NET Developers Journal, Eclipse Developers Journal, and the Java Developers Journal with controversial titles. I got flamed for what originally was just a simple blog post about me playing around with a new job search engine, and I ended-up having to post comments in the forums for the various posted instances of the articles to explain what had happened.

In general it just seems like a case where the Captain of the ship is completely oblivious to what is going on below deck, and it’s too bad that so many good people involved with Sys-Con are having their reputation tarnished by a couple of peoples actions and opinions. From reading the buzz around the internets (sic), it looks like a lot of people are going to start boycotting Sys-Con publications. I’m sort of mixed about that issue myself– I liked the people I worked with and find the CFDJ to contain interesting and valuable content, but I also tend to avoid supporting organizations and causes which I have major moral or ethical objections with (like Wal-Mart for instance).

Stop the FUD– ColdFusion Is Alive and Well

Tuesday, May 3rd, 2005

There have been quite a number of posts in the CF blogosphere today with positive news and outlook about ColdFusion in the wake of the uneasyness brought about by the Adobe and Macromedia merger. I’ll just do links to these posts so that I’m not stealing anyone’s thunder:

Hopefully some of this news will help quell the FUD being peppered around the community at the moment. Granted, it’s never a bad idea to expand your horizons to learn other technologies (I consider myself more of a programmer than a ColdFusion fan boy for instance, though CF is certainly my strength at this point), but getting paniced about the potential end of life for CF seems a bit melodramatic. Even if it were going away, it’s not like your existing CF licences suddenly stop working and you have to redo all of your applications in 2.3 seconds, right?

Update:

Looks like Sean Corfield also has a new entry with his thoughts about the merger.

Hibernate Vs. Ruby On Rails

Tuesday, May 3rd, 2005

I came across an interesting article at TheServerSide comparing Hibernate and Ruby on Rails. What can I say? I’m taking a fancy to ORM frameworks lately, especially given the number of disparate datasources I work with on a daily basis.