The Frayed Ends of Sanity

Posted on 1st June 2007

XWiki would seem to be in dire need of some sanity. When I upload a file, I expect to get an appropriate error message if it fails, or better still tell me before hand if it's likely to be too big. I don't expect there to be a two huge great Java exceptions thrown back at me. Thankfully, I'm a technical user and can decipher the program (the image was too big), but other users might not be so understanding.

This goes back to what I posted yesterday, don't send users down broken paths. If there are constraints tell them!

However, there is also another issue with sites that upload photos like this. If you have a limit on the size of the photos, resize the image. It isn't hard. This is what Labyrinth does, so although your original image might be 1280x1024 and be over 1MB, it will get saved as something like 800x800 or perhaps 150x150 for thumbnails all automatically, without the user having to worry about it. Why make the user jump through hoops, when you can so easily add a feature like that yourself?

The problem here though looks like the XWiki (or at least this installation of it) uses the database as a file store. The Java exception errors are from JDBC finding the data too big to store. Why is an image (or any media file) ever stored in the database? I've come across this idea a few times before and have never understood the point. Use the filesystem of the OS to store files and databases to store your textual content. You aren't going to search the content of the data block in the database, or if you are then I seriously doubt you get any benefit over using tools dedicated to accessing and interrogating files at the OS level.

Maybe it just comes down to the fact that Java programmers seem to want to try and do everything themselves. I've come across this several times when I was forced to use Silverstream many moons ago, also written in Java, and seem to be a mantra of Java in that it's the only tool for the job, even if it isn't.


No Comments

Add A Comment

Ignore this:
Your Name *
Subject *
Comment *

Some Rights Reserved Unless otherwise expressly stated, all original material of whatever nature created by Barbie and included in the Memories Of A Roadie website and any related pages, including the website's archives, is licensed under a Creative Commons by Attribution Non-Commercial License. If you wish to use material for commercial puposes, please contact me for further assistance regarding commercial licensing.