Friday, November 27, 2009

Running and Accessing Queries from JavaScript on Open BlueDragon

More progress on the server-side JavaScript front--you can now run and access queries from JavaScript. See the wiki for an example of running a query from JavaScript and accessing a query that was run using CFQUERY.

Thursday, November 26, 2009

Server-Side JavaScript for OpenBD Alpha Available

Quick follow-up to my previous post--you can read more about the new server-side JavaScript plugin for OpenBD on the wiki, and you can download the plugin from the OpenBD downloads page..

CFJS - Server side Javascript available for playing

As promised, I have packaged up the new javascript plugin for use with OpenBD and you can now download and start playing.

I am personally very excited about this step forward. I always believed that CFML is the best web scripting language out there on the market and when people see how easy it is to do certain things, they are hooked. Coupled with the fact CFML has broken free of it available-only-as-a-commercial-product ties there is a whole new wave of people checking the power out.

So mixing Javascript in as a first-class language to this platform creates a very powerful tool to which non-CFML developers can now crank out dynamic websites without needing to learn a single line of CFML.

The CFJS plugin for OpenBD is now available for you to try! Can't wait to hear what people think about this addition.

Wednesday, November 25, 2009

First (?) Production Site on Open BlueDragon for Google App Engine

Yesterday Peter Farrell pointed me to a brochure site he did for a friend. Looks great, it's running Mach-II 1.8 beta, using SES URLs, all great stuff.

Then he told me it was running on Open BlueDragon for Google App Engine (GAE). VERY cool. You can read a bit more about it on Peter's blog. I could be wrong, but I think this may be the first production site running on OpenBD on GAE. (If there are others out there, I'd love some links!)

The interest in running CFML apps on GAE has really been picking up lately, and with good reason. It's a dead simple way to deploy CFML applications to Google's cloud, and unless the site is going to get a huge amount of traffic it's completely free.

Free CFML engine, free hosting, easy deployment right from Eclipse ... there's a lot to love here. No more hunting around for cheap shared hosting accounts that are so restrictive they're barely usable, no more spending money on a VPS if you don't need one (though I highly recommend them!), you just build your app and deploy right to GAE.

Since a lot of people I've been talking with recently aren't all that familiar with GAE, I'd like to point out that it's a bit of a different paradigm than many other cloud computing services. Unlike Amazon EC2, where you're dealing with things at the server level, GAE is application-oriented. So you don't have a server with an operating system on which you install a servlet container and OpenBD, instead you're simply deploying individual applications to Google's Java infrastructure. It's a really nice way to do things since the server-level stuff is all handled for you.

Be aware that there are some restrictions on what you can do on GAE vs. deploying on your own server, but really these are just differences rather than any huge impediments:

  • Unless you use the Virtual File System (VFS) that Vince Bonfanti has been building, you can't write to the file system. Note that you can use the VFS on all Java projects on GAE; it isn't specific to OpenBD.
  • The limit on the length of a single request is 30 seconds. (Not a problem unless you're generating reports or something.)
  • You can't ...
    • open a socket or direct connection to another host. You can use GAE's URL Fetch Service to call other hosts on ports 80 and 443.
    • spawn new threads
    • make system calls
  • There are some limitations on request/response sizes, maximum file sizes, etc. but all are quite reasonable.
The big difference is that you can't use a traditional RDBMS like MySQL. Instead you use Google's Datastore, which is a "schemaless object datastore." You can read more about Datastore here. So what does this mean for CFML developers? Well, OpenBD for GAE implements persistence for CFCs to Google Datastore, so you can save your CFCs (works for structs as well) to the Datastore by using the GoogleWrite() function, and there are also functions to run queries and read single objects from the Datastore. You can read more about OpenBD's Datastore integration on the OpenBD wiki.

There has also been some work done on making a file-based RDBMS like H2 work with the VFS, and although it works apparently the performance is pretty slow at the moment. When the issues around that get resolved that will be another nice option, since a database could be deployed to GAE right along with your application code.

Personally I'm really excited about the opportunities this offers CFML developers. It could not be simpler to build a site and deploy it on Google App Engine, and the benefits of being on the Google infrastructure are pretty amazing. If your application doesn't get a huge amount of traffic it's completely free, and if your application starts to grow, the underlying infrastructure will scale up automatically as needed. That's one of the many benefits of cloud computing.

If you're interested in getting started with OpenBD on GAE, make sure and join the OpenBD Google Group, check out the GAE section of the wiki, and there are some great blog posts by members of the OpenBD community as well:

As I said, there's lots to love here, so I encourage you to give it a try.

Tuesday, November 24, 2009

Server-Side JavaScript with Open BlueDragon

In all the years I've been doing CFML development, CFSCRIPT has always been a neglected afterthought. Due to the limitations I (along with many of you I'm sure) stopped using it. Every time I'd get on a CFSCRIPT kick, I'd find myself frustrated by the limitations, having to break out of script to do things that weren't supported, or taking the time to write my own wrappers for CFML tags.

If only there were a complete, robust, scripting language that web developers already know that could be used instead of CFSCRIPT ...

Using JavaScript on the server side is something we've been discussing on the OpenBD Steering Committee for a while now, and Alan Williamson outlines the progress he's made in making this a reality in a post on his blog. The Mozilla Rhino library serves as the underlying JavaScript engine for this feature, and it will also be compatible with the Google App Engine edition of OpenBD.

I think this will be a great addition to the CFML arsenal not only for the simple reason that we'll be able to write script in our CFML apps using JavaScript 1.7, but this also opens up some really interesting possibilities for integration with existing JavaScript libraries, and will offer anyone who knows JavaScript an easy path into the CFML world.

We'll be releasing a plugin for OpenBD soon and would love to get feedback on the notion of using JavaScript on the server side in your CFML apps. As Alan outlines in his blog post there are still some logistics to work out, but part of the power of open source is getting additions like this in the hands of the community early so we can get your feedback and make sure this feature meets your needs.

Let us know your thoughts on using JavaScript on the server side in your CFML apps!

CFJAVASCRIPT gets a turbo boost

We've just added a whole host of extras that have been requested by the community:

  • Ability to place Javascript code inside the tag instead of specifying external javascript files

  • Specify a comma-separated list of javascript files as the SRC='' attribute. Arrays of files still supported

  • Include-Only-Once; if you have multiple CFJAVASCRIPT tags, then we make sure you only include a javascript file only once per request. That way the browser won't get two JQuery instances!

  • Javascript placement; you can now have the resulting javascript placed at either the position the tag appears, at the HEAD or at the BOTTOM of the HTML body tag

More JavaScript goodies added to OpenBD!

Saturday, November 21, 2009

CFML on the Google App Engine with Open BlueDragon | Progressive Overload

There is just no reason that we as cfml developers shouldn't be churning out app after app on this platform.

Amen to that! Great post about running CFML apps on OpenBD for GAE.

Peter Farrell made a small change to Mach-II 1.8 based on a suggestion by Dave Shuck that allows Mach-II to run on GAE, and the nice thing is it's a huge performance improvement in one specific area of the framework from which all Mach-II users will benefit.

Very exciting stuff.

The Complete Guide to Google Wave Preview Edition PDF Available for Download - Lifehacker

The preview edition of Gina and Adam's new book, The Complete Guide to Google Wave, is now available in PDF form for your offline, ebook-reading pleasure.

Google Wave is a young tool that's not terribly easy to understand for a lot of folks, but at least a couple of your Lifehacker editors are completely nuts for Wave and its potential. The DRM-free, 102-page personalized PDF of The Complete Guide to Google Wave is available for six bucks, but keep in mind that the content of our book will always be available for free at any time at

Maybe this will help me understand what Wave is actually good for!

Friday, November 20, 2009

Monitoring Tomcat with Java VisualVM

One of the best kept secrets that's bundled with your Java 6 JDK is VisualVM. VisualVM is an absolutely fantastic, free monitoring tool for Java that you may not realize is right under your nose.

In a nutshell, when you fire up VisualVM it provides you with a ton of monitoring tools for everything running on the JVM. By default VisualVM will monitor the VM from which it's launched, so if for example you launch VisualVM from the bin directory of jdk1.6.0_17, then anything using that JVM will show up as a process in VisualVM that can be monitored. Note that in some cases certain processes will not appear in VisualVM, which is the real point of this post; I'll get to that in a moment.

I'm attaching a few screenshots to this post. The first shows what VisualVM looks like when I fired it up just now on my Linux laptop, the second shows a snapshot of the main monitor screen (in this case I'm monitoring Tomcat), and the third shows a snapshot of the thread monitoring screen (note the Open BlueDragon threads!). VisualVM can also take and load snapshots so you really hone in on problems at the VM level quite easily.

One major point I'd like to make is that VisualVM will monitor any Java application running on the JVM. So in the CFML world this means if you have OpenBD, Railo, or ColdFusion running, they can all be monitored quite nicely using VisualVM.

VisualVM can also monitor remote JVMs via JMX (Java Management Extensions), so if you're having trouble on a remote server and want to see what's going on, as long as the JMX ports are open and accessible you can launch VisualVM from your local machine and connect to the remote VM. Note that monitoring is a very lightweight process so VisualVM can be used to monitor production servers with virtual no impact. Visual VM also does profiling, however, which is a much more heavyweight process. It provides a huge amount of useful information, but should be used only when absolutely needed on production servers since it will have a noticeable impact on performance.

Now to the real point of this post. When I launched VisualVM on a Windows 2003 server today I was surprised that Tomcat didn't show up as a process running under the VM. Turns out that if you install Tomcat as a service, even if it's running under the same user account that you used to launch VisualVM, Tomcat won't appear by default in the VisualVM process list.

Luckily it's easy enough to resolve. Simply open the Tomcat Configuration application and add the following in the Java Options box on the Java tab:

After making this change you do have to restart Tomcat.

This will enable JMX in Tomcat and allow VisualVM to connect to it. You can choose any port you like, and note that if you want to use SSL or authentication you would set those options to true. I haven't personally messed with authentication so I'm not sure what that authenticates against, but know that if you want to have JMX available on a production system that you can secure it this way, or of course through firewall rules.

With JMX enabled in Tomcat you then go into VisualVM, add a new JMX connection, and point it to localhost:8086 (or whatever port you set JMX to run on). That's it--you're now monitoring Tomcat!

VisualVM is a great, free tool that you likely already have on your machine, so you really owe it to yourself to check it out.

Tuesday, November 17, 2009

Best Open Source Reporting Tools | Open Source Applications

Impress your clients with professional reports using these excellent reporting tools.

Really nice roundup of open source reporting tools. Some I was aware of, others are new to me, but they all look darn good.

Running Tomcat as a Service on 64-Bit Windows

I'm replacing one of our ColdFusion 8 installs with Tomcat 6.0.20 and Open BlueDragon, and this is on a 64-bit Windows 2003 server. Easy enough conceptually, but it turns out running Tomcat as a service on 64-bit Windows has a small trick involved.

A couple of potential solutions are outlined on StackOverflow (and numerous other places), but it still involved a bit of hunting around, so I thought a step-by-step with specific links would be helpful both to others and to myself when I forget how to do this next time. ;-)

  1. Install a 64-bit JDK if you haven't already.
  2. Download and run the Windows Service Installer of Tomcat.
    1. Make sure and point to your 64-bit JVM at the appropriate spot in the install process.
    2. At the end of the install, uncheck the box to start Tomcat. It won't start anyway at this point since the startup script included in the download is 32-bit.
  3. Grab the 64-bit versions of tomcat6.exe and tomcat6w.exe from the SVN repository. Even though it says "amd64" in the URL these files work on Intel chips as well.
  4. Replace the tomcat6.exe and tomcat6w.exe in Tomcat's bin directory with the new 64-bit versions you downloaded.
  5. Start up Tomcat!
That should be all there is to it. The one thing that doesn't work for me is the "Monitor Tomcat" application, but that really isn't a big deal since it doesn't do or tell you anything you can't get from the Services panel. I haven't dug into that at all so if anyone knows why that doesn't run I'd be curious to know.

After this is all installed make sure and go into the Tomcat Configuration app to take advantage of all the RAM you need or want to for your applications.

New QueryRun() + QueryOfQueryRun() functions added to OpenBD

Of all the things you most want to do buried deep within a CFSCRIPT block is manipulate databases. Invoking a tag while in script mode is impossible, unless you build your own CFC wrapper, which is clunky and horrendously inefficient.

OpenBlueDragon has just released the first couple of native functions that let you get in and around the power of queries but from a script.

These operate just like CFQUERY but at a script level.

And the hits just keep on coming. ;-) All these seemingly "little" things that are being added to OpenBD add up to a much improved devleoper experience. Grab the latest nightly build and give these a shot!

Sunday, November 15, 2009

Busy Weekend for Open BlueDragon! New Documentation Site and More New Tags and Functions

More new tags and functions have been added to OpenBD and a brand-new CFML documentation site has been released! You can read more about the very cool new documentation site on the OpenBD blog and Alan Williamson's blog.

The cool thing about the docs site, other than the fact that it exists of course, is that the documentation is being pulled directly from the OpenBD engine, which means the documentation will always be up-to-date.

Because the documentation is being pulled directly from OpenBD, the docs are also specific to the version of OpenBD that you're running. So this isn't only an external site you can use for reference; the code for the documentation site is bundled with the OpenBD nightly builds already so you can run the documentation app on your own instance of OpenBD.

The documentation app also supports comments so you can add tips, etc. to the public site, but you can also leverage this on an instance you may be running internally at your company. This gives you the ability to have a CFML documentation site with notes that are specific to your team.

Here are the new functions and tags that were added in the last couple of days:

And for those of you who aren't aware, you can follow OpenBD on Twitter (@OpenBlueDragon) to get notifications of the latest goings-on with OpenBD.

Thursday, November 12, 2009

Apache: 'No jerks allowed' | The Open Road - CNET News

You see a lot of people doing open source, but not a lot of people doing open development...At some open-source projects [Erenkrantz mentioned Mozilla], all of the technical decisions, even if the license is open source, are not subject to public comment. At Apache, everything is done in the open over public forums.

This is the exact philosophy we follow on the Mach-II project, and I feel it's one of the secrets of our continued success. Letting our community know what we have planned and getting feedback before writing any code helps us meet the needs of our users better by giving them exactly what they need, not what we think they need. Springing features on users is no way to do a truly open source project. Involve your community at all levels and it pays off big time.

Wednesday, November 11, 2009

Droid Unboxing - Part 2

Part 2 of my Droid unboxing

Droid Unboxing - Part 3

Part 3 of my Droid unboxing

Droid Unboxing - Part 1

Part 1 of 3 of my Droid unboxing on Monday

Facebook iPhone Dev Quits Project Over Apple Tyranny

My decision to stop iPhone development has had everything to do with Apple’s policies. I respect their right to manage their platform however they want, however I am philosophically opposed to the existence of their review process. I am very concerned that they are setting a horrible precedent for other software platforms, and soon gatekeepers will start infesting the lives of every software developer.

The web is still unrestricted and free, and so I am returning to my roots as a web developer. In the long term, I would like to be able to say that I helped to make the web the best mobile platform available, rather than being part of the transition to a world where every developer must go through a middleman to get their software in the hands of users.

Good for Joe Hewitt. Apple may like to say "our phone, our rules" but if Apple keeps up with the draconian behavior they may find a mass exodus on their hands. I hope the Pre and Droid start giving Apple a well deserved thrashing in the market.

Tuesday, November 10, 2009

Change to My Google Talk Address

Since I changed my email address over to Google Apps for Domains, I'm going to start using that as my Google Talk email as well.

If you currently contact me on IM at mpwoodward at gmail dot com, please replace that with matt at mattwoodward dot com. I'll run both for a while in case anyone has any issues.


Bilski’s hearing and software patents

Mr. Stewart shows how minimalist an interpretation of the CAFC ruling he’s seeking when he says that the Bilski method would be patentable if there was an “interactive website in which people — parties and counterparties could essentially find each other by the computer and could agree to terms“.

To this, Roberts replies: “No, no. That’s just saying instead of looking at the — in the Yellow Pages, you look on the computer; and that makes all the difference to you? [...] that involves the most tangential and insignificant use of a machine. And yet you say that might be enough to take something from patentability to not patentable. [...] If you develop a process that says look to the historical averages of oil consumption over a certain period and divide it by 2, that process would not be patentable. But if you say use a calculator, then it — then it is?

Keeping my fingers crossed that the decision winds up on the side to which the Court seems to be leaning.

Calendar Sync Issues with Droid and Google Apps for Domains Account

Quick tip in case anyone else runs into this. When I first set up my Droid I used my account since my account wasn't associated with Gmail yet even though I was using it as a Google account for things like Google Groups, etc. You HAVE to use a Gmail account specifically to initialize the phone. Note that doesn't mean an Gmail account necessarily, just one that you're using with Gmail.

After the initial setup was complete and I switched my account to Google Apps for Domains, I added that account to the Droid, but in the sync settings screen only Contacts and Mail were showing up as options. There was no checkbox to have it sync the calendar. I deleted and re-added the account a couple of times to no avail.

I started thinking maybe the problem was that I used my account as the "primary" account, though I'm not sure why it wouldn't support multiple calendars. Maybe it does and this was just a glitch. At any rate, I reinitialized the phone to factory defaults since that's the only way you can delete whatever account you chose as your primary account when you first set up the phone. Then when I booted the phone and it went back into the initial setup mode, I used my account and now the calendar sync shows up.

I wasn't using my account for anything anyway and since everything was already in my Google account as far as contacts, etc. are concerned, this wasn't a big deal. I do need to reinstall the applications I downloaded but there were only about three of those to worry about.

More on the Droid later--loving it so far even with this little glitch!

Google To Murdoch: Use No Index Or Just Ask

News Corp. Founder and CEO Rupert Murdoch claims Google is stealing their content - the "content kleptomaniacs" as he has termed them. As Greg Jarboe's article below details this could be a major problem for News Corp web sites. Watch the embedded video to hear Murdoch's position.

Can't wait to see the impact this has on traffic to News Corp's sites. I stand by my earlier assertion that Murdoch is completely clueless. Much like the MPAA and RIAA he's sticking his head in the sand and hoping for an alternate reality to emerge.

Monday, November 9, 2009

Living in the Cloud: You Gotta Trust Somebody

I've been rather vocal about "getting off Google" in the past, and it's a battle I've been winning with my email for a few years now. But today I got my Droid (more on that later), and I thought long and hard before even ordering one because I knew what this would entail.

Obviously the Droid is using the Andoird OS, which means (surprise!) it's Google-centric. Google offers a huge amount of convenience, and the Android OS itself is absolutely spectacular. Temptation rears its head.

I've been researching mobile phones like crazy over the last few months, and when it comes to "freedom" there really are no great choices. The Neo FreeRunner keeps showing promise, but ultimately you're still going to be at the mercy of a cellular carrier, and picking the least amongst evils there isn't easy.

The iPhone is a COMPLETE non-starter for me. AT&T coverage is horrendously bad, particularly where I live, and there is no way I'm diving into Apple's cesspool of control. No offense to iPhone owners; if you're happy with it, great! But it's absolutely not for me.

I've had Verizon for years and been nothing but happy for years, so I've been suffering the crappy phones until the Droid came along. But the Droid has the Google problem I've been avoiding for so long, so what to do?

Well, on the Google fight I give up. I'm keeping my email address, but I changed that domain over to Google Apps for Domains today. That way I can get this all working seamlessly with my phone, and I guess I just have to trust that Google isn't all THAT evil. I'll keep using Scroogle for my searches when I'm at my desk though.

I guess the bottom line of this post is if you want the benefit of living in the cloud, you gotta trust somebody. So I suggest doing your research and choosing an option that works for you on all levels. Just make sure to have an out if the solution you align yourself with turns up the evil dial at a later date.

Verizon Misfit Toys

I believe the correct phrase to use here is, "Oh snap?"

If you sent me email in the last 12 hours, please re-send

Apparently Thunberbird freaked out last night and flagged almost every
incoming mail as spam and deleted them, and since I have it set to purge
when I close Thunderbird I lost everything I would have received overnight.
Sorry for any inconvenience!

Sunday, November 8, 2009

HashBinary() Added to Open BlueDragon

What started as a thread concerning how to MD5 hash a binary file in OpenBD has quickly become a new HashBinary() function in OpenBD.

The absence of HashBinary() from CFML has always seemed a bit odd since there are binary versions of Encrypt() and Decrypt(), so adding HashBinary() will make these tasks much simpler.

Not a huge addition but I did want to highlight it because to me this shows yet again the beauty of open source projects. A need is identified by a user, it points to a hole in the language, and that hole gets filled, all in the span of a day.

Thanks to Tom Jones for bringing this to our attention and prompting the new feature. OpenBD gets stronger every day because of this kind of feedback from our users.

Saturday, November 7, 2009

Thank you, Rails

Lately, though, I’ve noticed the tone of the arguments in the Django community
getting nastier — especially when it comes to Rails. Again, I’m far from
innocent in this regard: I’ve certainly done my fair share of Rails-bashing,
and I regret it.

I think it’s important to recognize that we in the web development community
do in fact owe Rails and the Rails community a debt of gratitude. Rails helped
reframe the way we think about web development, and even those who’ve never
touched Rails nevertheless are probably reaping indirect benefits right now.

So I think we should all step back from our personal preferences and plainly
say thank you, Rails, for all that you’ve done to move the state of web
development forward.

I think the CFML community could stand to take this attitude to heart. As a community we spend WAY too much time patting each other on the back and blindly blasting our supposed enemies, when what we should be doing is taking off our blinders and learning from what else is out there. We don't do nearly enough of that in my opinion.

Friday, November 6, 2009

Mark Thomas on Apache Tomcat 7 | Javalobby

the biggest news was probably the timeframe announcement for Apache Tomcat version 7.  According to Jim Jagielski, chairman of the Apache board of directors, Tomcat is used in at least 75% of Java-based websites.  Mark Thomas, a member of the Apache Tomcat Project Management
Committee, said that the alpha release of Tomcat 7 is expected in
December 2009 or January 2010.  DZone spoke with Thomas for an exclusive interview about the upcoming version of Tomcat. 

Cool new stuff coming in Tomcat 7, and I didn't realize an alpha was so close.

Photos of Me from BFusion

Bob Flynn was kind enough to send me (well, Wave me) some photos of me giving my presentation at from BFusion (which was great as always!). I particularly like the one where it looks like I'm singing opera. ;-)

Installing Mozilla Lightning on Ubuntu 9.10

I'm still working through a bit of a hiccup with using my Amahi calendar with Evolution, so I thought I'd install Thunderbird and Lightning to see if they worked. The problem with Evolution and my Amahi calendar is that no matter what I try, the calendars on Amahi are flagged as read only. I understand that it will be read only (at least potentially) with a pre-existing calendar, but even when I create a new one I can't add new appointments to it. Not good. ;-)

Thunderbird is easy enough to install with apt-get install, and Lightning is just an add-on to Thunderbird, but on both my 32-bit and 64-bit machines when I launched Lightning the "new calendar" option was grayed out. A bit of scroogling showed that Lightning has a dependency on libstdc++5. The issue is that beginning with Ubuntu 9.10 libstdc++5 is no longer in the standard repositories, so sudo apt-get install libstdc++5 no longer does the trick.

Easy enough to resolve by downloading the package however, so if you run into this issue just grab the 32-bit or 64-bit pacakge as appropriate and install.

Now it's time to ping the Amahi folks about the read-only issue with Evolution--I was liking Evolution until I ran into that.

If You Don't See Me on Google Talk IM, Re-Add Me as a Contact

It seems when I gave up on Empathy and started using Pidgin for IM again, some people don't see me as online with my Google Talk account. This happened before, so if you're in this boat you'll have to delete and re-add me as a contact.

No idea why this happens; my apologies for the inconvenience.

The Framework is the Language | Eric Lamb

You can’t approach learning a framework as anything less than you would when learning a new language. Anything less and you’re in for pain. After this realization the framework came together pretty quickly though it still hurt like hell.

Although I've never experienced the "hurt like hell" part when learning a framework, this is a decent reminder that a framework is written in/targeted to a language, but also has a dialect all its own. Understanding that fact will probably make things go a lot more smoothly. I disagree with the author's doubt surrounding whether or not using a framework is a good idea but it's food for thought nonetheless.

The "NoSQL" Discussion has Nothing to Do With SQL | Communications of the ACM

Recently, there has been a lot of buzz about “No SQL” databases. In fact there are at least two conferences on the topic in 2009, one on each coast. Seemingly this buzz comes from people who are proponents of:

• document-style stores in which a database record consists of a collection of (key, value) pairs plus a payload. Examples of this class of system include CouchDB and MongoDB, and we call such systems document stores for simplicity

• key-value stores whose records consist of (key, payload) pairs. Usually, these are implemented by distributed hash tables (DHTs), and we call these key-value stores for simplicity. Examples include Memcachedb and Dynamo.

In either case, one usually gets a low-level record-at-a-time DBMS interface, instead of SQL. Hence, this group identifies itself as advocating “No SQL.”

Great first part of a two-part series about data storage and how "NoSQL" doesn't at all get at what things like CouchDB, MongoDB, etc. are all about.

Thursday, November 5, 2009

CFDOCUMENT Tips with Open BlueDragon

I'm porting a ColdFusion 8 application to Open BlueDragon and the app in question generates documents using both iText and PDFBox (which I posted about before), and also generates PDF files from HTML content using CFDOCUMENT. When compared with CF 8 I ran into some differences with CFDOCUMENT so I figured I'd post them here. In general everything just works, so this is more formatting issues than anything else.

1. Use Full URLs for Images and CSS

This was covered by Nitai in a thread on the OpenBD mailing list a while ago, so consider this a reminder that you need to use full URLs for images and external stylesheets.

2. Tweak Your CSS as Needed

Because the underlying rendering engine differs between OpenBD and CF (not sure what CF is using, but OpenBD uses the amazing Flying Saucer project), you may see differences in the handling of CSS. None of the ones I ran into were biggies, and in many cases when I looked at the CSS being used, CF 8 wasn't doing what it was supposed to be doing so while the rendered output was what I wanted, it wasn't adhering properly to the CSS. One particular case I'll mention as an example--an h1 tag had a style of float:left in the CSS which wasn't being respected by CF 8, so when the document was generated in OpenBD there wasn't a break where I was expecting one. A quick change to float:none and all was well.

3. Empty Paragraphs Don't Count

I had some instances of <p> tags with CSS applied that were being used as spacers, to generate horizontal rules using a border style on the paragraph, etc. but these paragraph tags had nothing between them (e.g. <p class="spacer"><p>). If you don't have *something* in between the open and close paragraph tag the CSS doesn't seem to apply. Throwing a non-breaking space in (<p class="spacer"> </p>) worked great for me.

4. Font Differences

Remember that depending on OS platform and a bunch of other variables you may find differences in the fonts being output. In my case the CSS (which I got from someone else originally) was using Georgia as the main font and I don't have Georgia on my Ubuntu laptop, so the rendered output wasn't the same. Just make sure you have the fonts you want to use available. You can check the Fonts page in the OpenBD administrator to see how OpenBD hunts for fonts and to add your own font paths if necessary.

That's all I ran into with CFDOCUMENT on OpenBD--a few tweaks here and there and it's working fantastically well!

Empathy IM Client for Ubuntu Sucks

Much as I'm loving Ubuntu 9.10 and greatly, greatly appreciate all the hard work the Ubuntu team puts into building what I consider to be the finest desktop OS in the world (I'm seriously in awe when I think of the work involved and the fantastic end result), I have to point out one major mistake that was made with this release: the decision to replace Pidgin with Empathy as the default IM client. There's a discussion about they whys behind the decision here, but it seems in this case abstract technical decisions won out of usability decisions, which in the end isn't good for anyone.

My major annoyance with Empathy is as follows. If someone IMs me, I receive a popup notification in the top right-hand corner of my screen. Great. If, however, I'm not looking at my screen when the notice pops up, the only way to know someone IMd me is to look at my contacts list for a blinking icon. Completely, utterly terrible usability. Pidgin pops up a new tab in my chat window when someone IMs me. That's as it should be. That's how IM works, folks. Do your homework and don't change paradigms that don't need changing. I shouldn't have to worry about scanning my contact list every time I step away from my computer to see if someone IMd me when I wasn't looking.

Yes, I know, I can change applications; I've already re-installed Pidgin, and my apologies to anyone whose IMs I didn't respond to for hours this week. But with such a major usability annoyance I can't fathom why the "better integration with the desktop environment" rationale would make Empathy the default IM client in Ubuntu.

So more than anything this is to ask "WHY?" and to beg the Ubuntu team to actually USE the programs they supply as defaults instead of making decisions solely for under the hood technical reasons. Users don't care about the integration blah blah, they care about knowing when someone IMs them.

Wednesday, November 4, 2009

Free Flex 4 Training - Washington, DC - November 20, 2009

Adobe Flex 4 Training for ColdFusion Developers

A free full-day, hands-on training session, where attendees can learn how to build
their first Flex application using the latest Flash Builder 4 beta software.
This training is designed to help experienced ColdFusion developers get started
in understanding how to add rich UI to existing and new ColdFusion

Great opportunity for FREE Flex training at Fig Leaf in DC! Seating is limited so if you're interested, register right away.

Tuesday, November 3, 2009

InformIT: Interview with Donald Knuth

The success of open source code is perhaps the only thing in the computer field that hasn’t surprised me during the past several decades. But it still hasn’t reached its full potential; I believe that open-source programs will begin to be completely dominant as the economy moves more and more from products towards services, and as more and more volunteers arise to improve the code.

This is an older interview I just came across--always fascinating to hear what Donald Knuth has to say. His take on multi-core processors and parallelism is particularly interesting.

Great quote on Linux from the interview: "I currently use Ubuntu Linux, on a standalone laptop—it has no Internet connection. I occasionally carry flash memory drives between this machine and the Macs that I use for network surfing and graphics; but I trust my family jewels only to Linux."

Monday, November 2, 2009

Porting a CFPDF / CFPDFFORM-Dependent Application to Open BlueDragon

In my continuing war against all things PDF in ColdFusion, today I believe I have achieved victory.

If you've been following my posts (OK, rants) over the past few weeks you'll know that I ran into some annoying bugs in CFPDFFORM that were wreaking all sorts of havoc with the one application I wrote that depends on CFPDFFORM for a key part of what it does. I sent my test case to Adobe Support and, well, there are probably a million ways to couch this nicely, but the bottom line is they told me they can't/won't fix the bug, and their suggested workaround was to use iText to populate my PDF forms instead of using CFPDFFORM. Given that I ran into another annoying bug with CFPDFFORM a couple of years ago and got another "can't/won't fix" answer, this was strike two for CFPDFFORM. And personally I don't like being backed into a corner by a third strike before making a change.

Now that my CFPDFFORM code had been changed over to use iText instead (which gave some nice speed benefits as well), the only remaining thing keeping me tied to ColdFusion 8 was the use of CFPDF to merge multiple PDFs into a single file. I looked into doing this with iText and although it's doable, even being the gearhead I am I have to admit that's a bit of a hassle. So before implementing that solution I decided to hunt around a bit more.

Enter Apache PDFBox.

PDFBox is already bundled with Open BlueDragon since we use it as the underlying libraries for some CFDOCUMENT functionality, but it's a version behind the absolute latest. Turns out that the newest version of PDFBox has a great, easy-to-use PDFMergeUtility built in. This made removing my dependence on CFPDF (which isn't in Open BlueDragon yet) pretty simple.

My application populates a varying number of individual PDF pages and then merges these pages into a single PDF file at the end of processing. So I use an "assembly" directory to build up the individual pages of the final result, and the final step is to merge the files. Previously I was using CFPDF for this:

<cfpdf action="merge"
       overwrite="true" />

And the PDFBox PDFMergeUtility solution looks like this:

<cfset pdfMerger = CreateObject("java", "org.apache.pdfbox.util.PDFMergerUtility").init() />

<cfloop list="#filesToMerge#" index="fileToMerge">
  <cfset pdfMerger.addSource(fileToMerge) />

<cfset pdfMerger.setDestinationFilename("#destDir##destFileName#.pdf") />
<cfset pdfMerger.mergeDocuments() />

So it's a few more lines of code, but honestly not bad at all compared to the CFPDF version, and if you've been looking for ways to do some of what CFPDF and CFPDFFORM do in CF 8, between iText and PDFBox it looks like you're covered.

I was forced to make the switch from CFPDFFORM to iText in order to get around a bug in CFPDFFORM, and with that out of the way it was only one more step to make this application CFML engine agnostic. I need to do some additional testing but with the CF 8 dependencies removed the app is running great on Open BlueDragon. I'll do some comparison metrics but in initial testing, particularly since this is a CFC-heavy application, the speed and CPU load are both dramatically improved. Speed is about 30-50% faster (which makes a BIG difference when this app runs processing for hours at a time), CPU utilization is about half (CF completely pegs the CPU while this app is in full processing mode), and it's noticeably lighter on RAM as well. All told the minor hassle of reworking these portions of the app will have been well worth it.

The Raindrop Backend Extension Model

One more Raindrop/CouchDB video--this app is really showing the power and benefits of using a schemaless database. Perfect fit for something like Raindrop.

The Raindrop Schema Model

Follow-up to the previous Raindrop/CouchDB video--this shows how Raindrop uses CouchDB. Nice to see an increasing number of real-world uses of CouchDB out in the wild.

Raindrop's Introduction to CouchDB

A friend of mine pointed out that Mozilla Raindrop is using CouchDB for persistence, and a member of the Raindrop team produced a really nice CouchDB intro video. There's another video about how Raindrop uses CouchDB--I'll post that one as well.

Problems with Eclipse buttons in Ubuntu 9.10 | Norio

After upgrading to Ubuntu 9.10 (Karmic Koala) some buttons no longer work in Eclipse 3.5. Clicking has no effect but keyboard shortcuts still work.

It looks like Eclipse is doing some nasty stuff advanced hacking in SWT on GTK. This bug is fixed in 3.6M2 but you can work around the issue in Eclipse 3.5 by launching Eclipse through the following small shell script (assuming Eclipse is installed in /opt/eclipse-3.5):


If you're having this issue it will rear its ugly head when you try to do things like create a new project or add a software repository to your updates list--you'll click the "next" or "OK" button and nothing will happen. Glad there's an easy workaround, this has been driving me nuts all morning!

Sunday, November 1, 2009

It’s About Helping Your Users Become Awesome (or: “Being Better is Better” by Kathy Sierra) — Global Nerdy

If we want to create passionate users, we need to help them get better.

  • ‘Nobody’s passionate about things they suck at.”

  • Many people still have their cameras permanently set on “P” – automatic mode — even though those cameras offer finer control over things like shutter speed and aperture

  • What would it mean to our users if we unlock the door and help them be awesome?

This falls right in line with many of the discussions Team Mach-II has been having as we look ahead to the 1.9 and 2.0 releases. If we implement even half of what we have in mind for 2.0 it's going to be awesome and will help our users be more productive than ever before.

Shalin Says...: Why you should contribute to Open Source

Open Source projects offer you a chance to work on something that you want rather than something that others want you to work on. It is a great opportunity to work on something that is both cool and useful as well as to associate with a well known brand and all the publicity and goodwill it brings. You are free to pick and choose between the thousands of open source projects out there. Moreover, you are free to decide on how much you want to contribute. You won't have a boss and you won't have the pressure of deadlines and schedules.

And don't forget there are about a thousand different ways to contribute to open source projects, with documentation/wiki contributions typically being the most neglected. So find a project you love and get your hands dirty! ALL open source projects can use the help, and it's a great way to learn new things, meet new people, and boost your resume all at the same time. As Michael Scott would say, "It's Win Win Win." ;-)

Creating a Launcher for IntelliJ in Ubuntu

I had to do a bit of hunting to get this sorted out so I figured I'd put all the info in one place.

Since I'm going more Grails work lately I've been using IntelliJ IDEA 8.1 (haven't had a chance to check out the CFML plugin yet though), and after upgrading all my machines to Ubuntu 9.10 I figured I'd get fancy and add a launcher to my menus instead of starting things from the terminal.

Eclipse has a vm argument you can pass to the eclipse script when you launch things, but IntelliJ is a bit different. I found several solutions but most seemed to me to be unnecessarily complicated, but I kept hunting and stumbled across this snippet in the comment thread on this blog post, and it worked for me as the "command" line in the launcher properties.

/bin/sh -c "export JDK_HOME=/path/to/java&&/path/to/intellij/bin/"

Obviously you adjust "/path/to/java" and "/path/to/intellij" as appropriate to your setup.

Next I wanted to add a fancy icon and it turns out you can use the ones that come with IntelliJ. In the launcher properties, click the icon button and point to /path/to/intellij/bin, then hit "Browse." This will bring up the IntelliJ icons so you don't have to use a default Gnome coffee cup or something equally cheesy.

Hope that helps some other folks save a bit of hunting.