VistaDB with Silverlight

Tags: .NET, Silverlight

Today I read on the VistaDB blog that their database engine will run on Silverlight. I'm not sure if I want to put a complete database engine in Silverlight applications. Do I have to put the database files into IsolatedStorage or will it be only in-memory?

"OK, great you have this Silverlight application, how are you going to store the data? That’s right, using VistaDB! Since we are 100% managed we can live inside the Silverlight runtime and store the data for you. I think this is where the power of VistaDB being 100% managed is really going to start showing. You simply cannot embed any other type of database into Silverlight. Unless they are written in C#, and are 100% typesafe they cannot run in Silverlight. You cannot call COM interop, you cannot use a Delphi app with a managed wrapper. It must be 100% dot net."

I hope to have some time to look at VistaDB during the weekend. 100% .NET does not mean that everything that is written in C# is running in Silverlight automatically. Silverlight has only a subset of the .NET Framework included to have smaller plugin download size. So I'm more anxious to see it running in a Silverlight Web application.

Update 1: I got a message from VistaDB that it is not yet available, but I will get some bits and bytes next to test it.

Update 2: Here is the answer I got from Jason: "We already work with the CF, so we know how to scale back API's already. And yes, we work with isolated storage, and in memory databases today already (and we support partially trusted environments). So we feel there will be very little changes required to support Silverlight. I actually got a note from a MS employee telling me that they had us working with some tweaks internally to test Silverlight already. So that is what got me fired up to make it work out of the box so to speak. He told me that VistaDB under Silverlight would be a big success story for the framework and he wants to give us whatever resources we need to make that happen."

 

 

Maybe you have already heared about Google Gears. It is a small plugin that can act as a server to cache and serve application resources i.e. HTML, JavaScript or images. Another features is the database which is accessible like SQLLite database system. You can create and access tables with common SQL commands directly in JavaScript:

var db = google.gears.factory.create('beta.database', '1.0');

var rs = db.execute('SELECT recipe.rowid FROM recipe, recipe_aux ' +
                    ' WHERE recipe.rowid = recipe_aux.rowid AND ' +
' recipe_aux.rating > ? AND recipe MATCH ?'
, [3, 'cheese']); while (rs.isValidRow()) { console.log(rs.fieldName(0) + " == " + rs.field(0)); rs.next(); } rs.close();

I found an example where the Google Gears database is used from Silverlight, so this is working, too.

2 Comments

  • Jason Short said

    I would invite the comment above to come and look at VistaDB. It is not unstable. In fact we have public NUnit tests for anyone to run now. The company was acquired by me earlier this year. I am attempting to "right the ship" as it were with production stability and trust of users. I have also updated my blog with an additional entry about Silverlight and CLR Functionaility.

Comments have been disabled for this content.