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:
Labels: SILVERLIGHT, SILVERLIGHT 2 BETA 2


6 Comments:
what about sqlite or sql any where?
SQLite cannot be ported to Silverlight because it is native C++ (or in the case of ADO.NET SQLite provider, a mixed mode assembly). Same with SQL Server Compact 3.5.
use Gears
Can't do it. Gears isn't managed code - its SQLite, and you cannot build it into a Silverlight application.
Maybe we can use Bamboo.Prevalence(http://bbooprevalence.sourceforge.net/)
You know what? I completely forgot about that. Here's an article I wrote:
http://www.eggheadcafe.com/articles/20031028.asp
Post a Comment
Links to this post:
Create a Link
<< Home