9th June 2009

Browser File Upload

Uploading any files more than a few hundred K from a browser has been a problem for years. The UI available in the browser is very limited and relying on a single HTTP request that might take minutes or hours (and that you have to start over from scratch if it fails) often turns into a huge source of user frustration. There is also an extra flaw in that the TCP connection can fail before the whole file is transmitted but depending on the circumstances the server might not be able to tell if the whole file was actually received. There are a bunch of sites that use various ActiveX or Java controls but those have typically been a pain to install and/or flakey.

I just discovered that Silverlight can be used to create much more functional upload controls. Here is one for example in the Codeplex Code library. Granted, users need to have Silverlight already installed, but once they do it becomes much easier to have a good user interface, while having the actual process send chunks of the file that can be resumed if any piece fails, etc. Combine that with the Azure Blob chunked-PUT mechanism and you can build a very robust storage mechanism right in the browser. I’m looking forward to trying it out.

One last thought- it would be useful to define a standard protocol for uploading content in chunks (and yes, this is distinct from an HTTP PUT/POST with chunked encoding). Something along the lines of what the Azure Blob store does but defined as a standard that various controls and services can all interoperate.

posted in Developers, Networking, Silverlight, Technology | 0 Comments

9th June 2009

Regular Expressions Book

Coding Horror has a post highly recommending the new book “Regular Expressions Cookbook”. Now, I have mixed feelings about regular expressions and get concerned when I see them since they are often overused and when misused can result in code that is very hard to understand and debug. Having said that, when used in the right situation they can be a perfect solution to otherwise complicated text parsing & validation. But the art of creating them is often a lot of voodoo, so a book that has good reference materials and examples would be very helpful. I’ll report on this one next week after I have a chance to look through it a bit.

posted in Developers, Software, Technology | 0 Comments