Carlos Ble

Carlos Ble

I am a professional software developer, I solve problems.

I also teach and mentor developers to build better software.

Developing software since 2001.

Can I help you?

  • Do you need high quality tailor-made software?
  • Need training on TDD, clean code or refactoring?
  • Do you need a technical consultant?
  • May I pair with you to write better code?

Events

Upcoming training courses:

  1. TDD - [en Español] - 6 y 7 Octubre
    Gran Canaria
  2. TDD - [in English] - October 20, 21 & 22
    London, UK
  3. TDD - [en Español] - 29, 30 y 31 de Octubre.
    Madrid, Spain

Conferences:

  1. I'll be at the Agile Testing Days 2014
  2. I'll be at the London Test Gathering Workshops.

Archive for October, 2006



Now Reading

"Now Reading" is a new category in this blog. Sometimes I read interesting books, papers, essays, or just inquiring links and I want to share the information with my visitors. Enjoy this new section.

Well, nowdays Im reading the followin books:

To bring the books from Amazon in US to my house in Spain took 1 month!.
Yes, these books are not new but I think that they are a "must" if you are a .Net/Mono developer. Im focused in several .Net/Mono projects at the moment so this is a good reason to read them.

The next document which is inside Juval's book can be downloaded from:

I was following the guidelines described in it but I wasn't know about it. I will change some Boxerp code to comply with a few Juval guidelines.

Today I have been attending a MySQL Web Seminar: Web 2.0 and MySQL. It has been interesting and the spoken english of the presenter (Jimmy Guerrero) has been crystal clear for me. The sound is sended by a telephone call but its free and the slideshow and Q&A session is performed using WebEx, a Java application. It has been a new and exciting experience for me and I will repeat on next seminar. The presentation hasn't been very technical but some ideas and charts have been really impressive: Wikipedia bears 25000 SQL requests per second. Mixi.jp has a MySQL cluster with 100 servers which is bearing more than 3 million users, 70% of them active.

Nowdays Im focused on Boxerp development in my spare time. The old 0.0.1 version is deprecated since I am rewriting the whole framework. Now I have powerful development tools which provide agile development, facilities, reliability and high performance. Desktop applications development using Gtk# is a better experience for me than web development. Iam really having fun writing the Gtk# client using MonoDevelop (Stetic GUI Designer).

In the server side, the ORM is the wonderful Castle.ActiveRecord which let me play with relational objects in a fancy way. Remoting is the communication technology, which let me send ActiveRecord models (relational objects) between client and server without problems (No circular reference problems). Furthermore, the CallContext avoids to send the session token in every remote call. However, there is a little problem with the CallContext because if I use independent threads I should manually pass the session token between them and I need different threads to keep the client application responsive. This is not very important, just one line of code.
The client code is clear thanks the Stetic designer. It uses XML to store the forms (is a Glade evolution) and the code is clean, it just contains the controller code, not widgets initializations neither something like that.

Look at the administrator's main window file (at the moment it just loads data from server and shows them if login was correct because the ssession token is going to be sent in the CallContext):

using System;

using Gtk;

namespace administrator{

  
public class MainWindow : Gtk.Window{

    
protected MainHelper helper;

    
protected widgets.SimpleTreeView streeviewEnterprises;

    
protected widgets.SimpleTreeView streeviewUsers;

    
protected widgets.SimpleTreeView streeviewGroups;

    
public MainWindow () : base ""){

      Stetic.Gui.Build(
thistypeof (MainWindow));

      helper=
new MainHelper(refthis.streeviewEnterprises, refthis.streeviewUsers, 
refthis.streeviewGroups);

      helper.Init(
this);

      helper.StartDownload();

    }

    
protected void OnDeleteEvent (object sender, DeleteEventArgs a){

      Application.Quit();

      a.RetVal=
true;

    }

  }

}

And now take a look at the helper code, it downloads data from server but keep the application responsive:



using System;

using System.Collections;

using clientlib;

using widgets;

using Boxerp.Models;

using Boxerp.Objects;

using Gtk;

namespace administrator{

  
public class MainHelper : ResponsiveHelper{

    widgets.SimpleTreeView streeviewEnterprises, streeviewUsers, streeviewGroups;

    Enterprise[] enterprises;

    User[] users;

    Group[] groups;

    IAdmin adminObj;

    
public MainHelper (ref SimpleTreeView e, ref SimpleTreeView u, ref SimpleTreeView g) {

      
this.streeviewEnterprises=e;

      
this.streeviewUsers=u;

      
this.streeviewGroups=g;

      adminObj=(IAdmin)RemotingHelper.GetObject(
typeof (IAdmin));

    }

    [Responsive(ResponsiveEnum.Download)]

    
public void LoadEnterprises (){

      
try {

        enterprises=adminObj.GetEnterprises();

      }

      
catch (Exception ex){

        Console.WriteLine(
"LoadEnterprise:"+ex.Message);

        enterprises=
null;

      }

    }

    [Responsive(ResponsiveEnum.Download)]

    
public void LoadUsers (){

      
try {

        users=adminObj.GetUsers();

      }

      
catch (Exception ex){

        users=
null;

      }

    }

...
  public override void PopulateGUI (){

      InitTreeViews();

      
if (enterprises!=null

      foreach (Enterprise i in enterprises){

        ArrayList columns=
new ArrayList();

        columns.Add(i.Id.ToString());

        columns.Add(i);

        columns.Add(i.Description);

        
this.streeviewEnterprises.InsertRow(TreeIter.Zero, columns);

      }

...

Cool!

I have updated the Gtk# NPlot Control to the last NPlot 0.9.9.2. Now I am the maintainer of the control. I want to say thanks to Miguel de Icaza to grant me svn write access and to Matt Howlett to accept the tarball and include it in nplot.com. NPlot rocks ;-)