Saturday, March 19, 2005

ForeSight Linux

We are mirroring the FSL project [http://www.foresightlinux.org]. This is a new Linux idstribution based on the conary package system. It comes with mono, beagle, f-spot, howl, hal and much more. Now it is in the initial stages of range development.

Our mirror is hosted in TuxSM: http://tuxsm.org/mirror/foresight/

Friday, March 18, 2005

Thursday, March 10, 2005

Hazent in the North of Spain

Jaime and me are working in several projects using open source software in the North of Spain. Yesterday we were in Cantabria, and now we are in Vizcaya. We will back home tomorow.

Aspaldiko

Monday, March 07, 2005

Starting with wsdl in mono

Webservices allows us to call remote methods through HTTP, using XML. A web server will export the methdos usind WSDL, so it will be transparent for us.

A simple example could be the Google API, which can be found at http://api.google.com/GoogleSearch.wsdl

You can use wsdl.exe to generate a proxy code to make use of these methods.

Implementing the API:
wsdl http://api.google.com/GoogleSearch.wsdl

Compiling the API:
mcs GoogleSearchService.cs -r:System.Web.Services -target:library

We can build a simple program using the Google API so:
mcs google.cs -r:GoogleSearchService.dll -r:System.Web.Services

Gnome SpellChecker - Proof of concept

Run monodevelop and open a new solution/project. Copy the GoogleSearchService.dll library into your project directory. Go to Solution->References->Edit references->.Net Assembly and select the GoogleSearchService.dll file.

Create a GUI with Glade with: a Label, an Entry and a Button in such a way that when you click the button, our GetSpellingSuggestion(string s) method be called with the s parameter as the Entry.Text content.

private void GetSpellingSuggestion(string s)
{
   try{
        GoogleSearchService svc=new GoogleSearchService();
        string result=svc.doSpellingSuggestion(this.key,s);
        label1.Text="Usted quiso decir: "+result;
   }catch(Exception ex){
        Console.WriteLine(ex.ToString());
   }
}        
The 'key' variable is a string containing the hascode provided by Google, which allows us to access its API. (More information is available at http://www.google.com/apis/)