Entries Tagged '.Net and Mono' ↓

Embedded Databases and all…

Been trying out different embedded databases for the past few days. And am not sure which one is the best. The background is this:

We have a desktop application in C#, and are sending data from desktop to the PHP backend on the server. Since the data is going to be large, we want to send only the changed data to the server. That too in the most optimized manner. We are using CSV file as data storage and doing a diff on it to create the delta that we can send on the server. We are even zipping the delta to make sure it’s good on the bandwidth.

And here’s the problem:

We want to pre-process the delta. So we convert the unified diff to CSV again. Now we want to push it to a temporary table, and update a few fields. E.g. we want to mark all new rows (+ in diff) as “I” (inserted), removed rows (- in diff) as “D” (deleted) and updated rows (- and + both in diff) as “U” (updated). To do this, we load the data into a DataTable and perform some queries on it.

But there’s a catch. The .Net DataTable can’t perform updates on CSV files. So we need a real database.

That’s where our search for embedded databases began.

We want something free and something that does not restrict redistribution in a commercial application.

The options were limited. SQL Server Express, Firebird and SQLite (didn’t want Access/MDB).

Frankly, it’s not been a simple ride so far. We are considering only Firebird and SQLite (open source etc). Neither had enough ready samples / documentation that could solve the problem for us readily. Firebird was more difficult - with a lot of confusion about setting it up and opening the fdb file from a GUI database administrator application. SQLite was easier.

We have to do INSERT queries on the table, as we do not know how many fields will be there in the CSV file, and we couldn’t figure out an easy way to load a CSV file into a new table.

At this stage, I am not sure which one to go for. We need something that will work fast. I know SQLite has an option to load CSV files directly into a table through command line, but we don’t want to do a system call.

Any suggestions?

 

Using XAML, and generating class diagrams from CLRs

Noticed two interesting articles from Sacha Barber on CodeProject.

The first one talks about developing applications using .Net 3.0 and XAML. XAML (pronounced Zammel, as in Camel) is Micorsoft’s language to develop user interfaces in the upcoming Windows Presentation Foundation. To make it simple, imaging XHTML/MXML doing the whole of your operating system UI. The technology is very interesting, and I have been impressed with the work Microsoft has done on it so far. So the article got my attention. Sacha does a good job on explaining how to develop a simple XAML application, using different tools - including the Expression Blend (touted as the Flash killer!)

The second article was about a tool that can generate class diagrams from CLRs. That was quite interesting for me because of two things - one using reflection to find the classes and the structure of the CLR, and two, actually generating a diagram that makes sense out of it. I have seen a number of reflection tools and frankly, it takes a while to get used to them and to actually make sense of the application. AutoDiagrammer makes this job easy.

Good reading for a .Net programmer!

 

SharpDevelop and dissecting it

SharpDevelop is an open source IDE for .Net. It allows you to create desktop and web applications in C# and VB.Net. The Beta of SharpDevelop 2 is now available and it support .Net 2.0 too.

The interface is very similar to Visual Studio, and I recommend you to try out SharpDevelop 2.0. If you want to be sure before you try, take this quick feature tour!

Another thing:

APress, a technical books publisher, has put up a few books for free download. They are PDF books and you can easily download them.

The one that looked most interesting to me was “Dissecting a C# Application: Inside SharpDevelop”. This book takes a peek inside how SharpDevelop works. The book is a bit advanced level, but a great resource to learn things! Published in 2004, it is still relevant. And the best thing I like about this book is the coding advice it provides!

 

AJAXing ASP.NET

Learn how to build AJAX (Asynchronous JavaScript And XML) applications in ASP.NET environment. Make your applications more interactive and realtime!

Here’s the MSDN article.

 

Glancer - conference planner and friend finder app specs

I wrote briefly about the idea of developing a conference planner and friend finder app for Foss.In/2005 about a week ago. We did some brainstorming on that yesterday and here is the specification we came up with.

This application will allow participants of a conference to plan their participation and also network with other participants. We are creating it for Foss.In/2005 and can extend it later. Something similar to IntroNetworks that Macromedia uses at its MAX conferences.

Continue reading →