Client-side database with Silverlight?
I’ve seen some discussion threads about doing things like putting VistaDb (a 100% managed code database) into a Silverlight app. Most of this was wishful thinking, IMHO. If you are going to put a database into a Silverlight app, obviously the data file(s) need to go in IsolatedStorage. So that’s one hurdle – handling file access. And VistaDb is kind of on the large side for inclusion in a Silverlight app that’s designed to download into the browser.
I took a look at SharpHsql, which a much simpler managed – code database effort that has had its ups and downs since being ported from the JAVA implementation. I tried ripping out the Provider (which depends on System.Data – not present in Silverlight Framework) and thought I was making progress, but then I saw that there were still too many other dependencies on stuff from the full Framework that just isn’t there in Silverlight, so I gave up for now.
However, I still think this is an idea that has merit. Think of a notetaking app that you could run locally off Cassini or IIS, that used a database to store your stuff on the client. You could even LINQ-ify it. Then, you could sync your stuff through a WCF service to a central SQL Server database running on a website somewhere.
One thing SharpHSQL has in it is some very good routines for parsing textual SQL – that could be used to save a lot of time on writing a new one that’s more Silverlight – friendly.
I think it’s got some real potential – after all, you have up to 1MB of IsolatedStorage to work with. Just thought I’d throw it out as an idea. Ah, well – maybe my Tweeter is just over capacity with too many Twits. Who knows? We could always go back to these: