Blog

System.Threading.Tasks

In essence, the classes in this namespace serve the same purpose as the IJob interface and the JobDispatcher classes.  But the implementation is quite different.

Read more

Definition of interface

If inheritence reflects a is-a relationship between a class and its parent, the interface is more a can-be relationship between the class and the code using it.

The interface must be simple but  not simplistic. It must also be unambiguous and favor the ease of implementation. As such, methods overloading must be avoided. Only the most complete method should be declared.

Read more

Managing commands

Handling commands through menu or toolbar event in .Net is easy: you click on the item and choose the handler for the Click event. If two items have the same purpose (the FileOpen menu item and the Open button for instance), you simply use the same handler.

Read more

Control(ler)

I used to consider the controls as User Interface, so as "View" in the Model/View/Controller pattern. But in fact, as the name states, the control might be seen as the controller between the 5 following parts:

  1. model, containing the data to present
  2. behavior, managing user input
  3. renderer, to paint the visual
  4. visual state, to store the state the control itself is into
  5. layout, when the control is a container of other controls or simply to make specify client and non client area.

Read more