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:
what about sqlite or sql any where?
ReplyDeleteSQLite 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.
ReplyDeleteuse Gears
ReplyDeleteCan't do it. Gears isn't managed code - its SQLite, and you cannot build it into a Silverlight application.
ReplyDeleteMaybe we can use Bamboo.Prevalence(http://bbooprevalence.sourceforge.net/)
ReplyDeleteYou know what? I completely forgot about that. Here's an article I wrote:
ReplyDeletehttp://www.eggheadcafe.com/articles/20031028.asp
Peter,
ReplyDeleteSolution on this was just released.
Siaqodb is Silverlight client-side database that you can save an object with just one line of code and retrieve back objects stored via LINQ just by reference an assembly of 87KB as size. For more info take a look on http://siaqodb.com
Peter Bromberg
ReplyDeleteThis is a good LINQ provider for VistaDB.
https://www.kellermansoftware.com/p-47-net-data-access-layer.aspx