Archive for January, 2009

SQLite – a database for .Net applications

SQLite is a well known alternative for developers wishing to provide a light database embedded with the application. Moreover SQLite is in the public domain and thus allows many developpers to rely on this SQL database engine.

For .Net developpers who needs a local databse, you can use SQLite in application developped in C# or VB.net by using one of the following wrappers:

  1. System.Data.SQLite is the original SQLite database engine. It is a complete ADO.NET 2.0 provider and can be used as full replacement for the original sqlite3.dll. It has no linker dependency on the .NET runtime so it can be distributed independently of .NET.
  2. Finisar.SQLite was the original ADO.NET Data Provider for accessing SQLite-Databases using the .NET-Framework. It is no longer under active development and has been replaced by System.Data.SQLite.
  3. SQLite.NET wrapper  is a simple wrapper composed by a couple of classes in C# to allow access to SQLite databases. This is not an ADO.NET provider, but instead it provides a simple set of methods to access and retrieve data in a result set class.

I recommend this 2 quick tutorials to get started with SQLite in a .Net environment: SQLite on .NET – Get up and running in 3 minutes and Using sqlite with .NET.

Last but not least, if you need some visual database manager (GUI), you can try SQLite2008 Manager, SQLite Administrator or SQLiteTool. See also SQLite Trac for a more comprehensive list or this link.

Win32 API from .Net application

When you use .Net, you sometimes need some old win32 api’s. Even if a managed environment is really appreciable and confortable, there are some part of windows you can’t access from C# or VB .net code. Then you often have no other choice than rely on old windows system calls.

This generally implies a lot of marshalling and interop to wrap unmanaged windows functions into nice managed .Net namespaces. And this is also true for mobile developpers interacting with Windows CE dll, see Interop for .Net Compact Framework.

I just discovered that  a couple of Win32 functionnalities are already bundled in the Microsoft.Win32 namespace of the .Net framework.

Another great resource for COM interop is the P/Invoke wiki !

And for those who are (still) more familiar with the old school windows functions, you can refer to this map to find your way in the .Net environment.

Groovy ecosystem

Among the devoxx 2008 university slides, you can find a Groovy/Grails presentation. This document contains interesting references:

  • Griffon is a Grails like application framework for developing desktop applications in Groovy. You can begin with the quick start guide.
  • Gradle is a build system like Ant, Maven or Ivy but trying to get the best from all. It supports multi-project build and  dependency management. And you still can use you old Ant tasks.
  • Easyb is Behavior Driven Development framework (BDD). It uses a specification based Domain Specific Language (DSL).  The main idea is to keep really close to the business needs all along the development process. With this tool you’ll have a readable documentation AND a unit-testing all-in-one. You may start by reading first this tutorial.
  • Compass is an open source project built on top of Lucene, to simplify the integration of search capabilities in your java applications .

And of course you can still refer to the Groovy and Grails websites.

.Net auto update application

I’m looking for a way to insert an auto-update functionnality in a .Net application.  So far, I found only 3 approaches to easily update an application:

  1. Microsoft Patterns & Practices provide an Updater Application Block v2.0. An application block is a kind of reusable and extensible module. This specific application block provide a quick and easy mean to add self updating capabilities to .NET-based smart client solutions, like Windows Forms applications. Here you can find the Introduction, the Design overview and an article on how to use this application block.
  2. Sharp AutoUpdater is a library providing an auto-update feature for .NET applications. It relies on XML configuration files and handles the detection of a new version, downloads, unzips, and installation of the new files.
  3. Microsoft also has a ClickOnce deployment solution that handles updates. It is similar to the  java webstart solution. You can find more information here, in this article or among the wikipedia external links

ClickOnce seems fully integrated in a .Net environment, but as far as I know there is no solution to use a standard webserver (not IIS) to handle updates. I should definitely give it a try and see if IIS is really mandatory or if you can use some workaround.

Do you know other methods? Sometimes deployment tools include auto-update container to bundle an generic updater with your application (like install4J).

Are bookmarks useful?

There is a question I keep asking myself: “are bookmarks useful?”
In this first part, I will try to describe my own experience with bookmarks but hopefully you could help me to find a decent answer by sharing your own habits…  In a second post, I will gather my thoughts on what (I think) the bookmarks are focused and which goal they pretend to achieve. Last, I’ll try to list which key features I look for as a web user willing to use better bookmarks.

At first, back around 1996, I discovered the web pre-1.0 and started to use my wonderful netscape browser to store bookmarks for every website that took me more than 2 minutes to find with altavista or yahoo. Yeah that sounds like some old tale for the web 2.0 generation, but anyway at this time there was no google (and life did go on) and sometimes it was really easier to save your almost unknown favourite website in some mozilla html file. Of course after a while, this wild storage needed some folders, subfolders, subsbufolders, … and there you go for bookmarks tree with so many entries and levels that the most trained gamer would be in real pain to click on the right link. But the worse was….I didn’t really go back to these bookmarks!

Why? When there are too many things to read, filter and sometimes analyze (due to lame bookmark’s titles), you just scan-read or skip and then go back and loose a great amount of time and effort to find something you knew before.  So I broke up with my bookmarks toolbar! I kept only a few links, didn’t update the others and eventually deleted all of them. Go back to square one :s

Here come the long period between 2000 – 2007, where I didn’t use any bookmarking tool. Well, that’s not entirely true, I did use time and scope limited lists of websites, e.g for my thesis. But I regularly deleted any obsolete bookmarks folder. It’s like a Bookmark Zero Principle. And guess what, that worked pretty well…because you basically remember the websites you need.

At this time, my theory could be summarized as: Bookmarks are like post-it… when you got you fridge totally covered, it defeats the purpose! Then the new 2.0 websites with the social theme printed all over in capital letters  “came to the rescue”. They added the wisdom of crowds effect to the already messy bookmark problem. The usual belied is that a collective approach can help to filter and auto-organize information through tagging, sharing and popularity. Now is the time of folksonomy applied to bookmarks and del.icio.us is probably one of the most dominant service.

So far, I’ve used del.icio.us as a replacement of my traditional bookmarks in firefox. And I got 3 phases:

  1. First contact: I only saved a couple of new websites I discovered. At this time, I used as few tags as possible… in a way I was recreating a kind of taxonomy. I also never bookmarked my most popular websites since I was used to remember them.
  2. Long distance lover: after the first day of passion, I merely used delicious for a couple of months. The old UI was also not the best argument to keep early adopters. But in the end, we didn’t broke up ;)
  3. Sharing everything: now I share almost every cool or new website I discover. I try to add more tags than before (but I often converge to the same keywords) to increase the “wisdom of crowds” aspect.

My current use habits are covering 2 main use cases:

  1. Share and Store websites with services or  information about these main topics: development, finance , fun/entertainment content, startup, 2.0, …
  2. Find and Discover new websites based on specific tags. (and sometimes I use a subscription or follow a specific user)

But I still have 2 issues with the bookmarking concept.

First, I regularly bookmark again a website I already saved in delicious. So what’s really the point of saving information, If you never use it back and/or cannot even remember you already read or see this website ?

Second, to find interesting websites, the social tagging of a large community is useful. But, is it really the popularity I’m looking for ? Let’s assume it is, delicious still do not offer a way to sort multiple tags search by popularity! The only way is some GreaseMonkey script that reorder the results.

That’s all for this firts post. Stay tuned for the next one ;)

Reblog this post [with Zemanta]

Mad Money with Eric Schmidt

Hello ! I just wanted to share a video on CNBC – Mad Money where Jim Cramer interviewed Eric Schmidt (Google CEO) about how US could “change”. They also talk about creation of new white color jobs since the tech employees are also highly impacted by the recession.

Eric Schmidt On Tech Jobs