vendredi 1 juin 2007

The Law of Demeter, part 1/2 | 0 vote(s)

Contrary to the French version of this post, I decided to break the English version in two parts. The first part deals with the law formulation, and the second part deals with the application of the law. The reason for that is that it gives me a good reason to continue the translation. I know, that's a strange reason.

In addition to the multiple object oriented software design principles that have been discussed in previous blog tickets, the tool box of the software architect contains many other tools, including a set of "laws".

Of course, these are not law in the juridic meaning of the word. They must be seen as guides whose clever use allows us to simplify the code or the software design. Actually, most of these laws are not fully applied, and they often feature logical restrictions when it comes to their application. As we'll see it later, this is the case of the Law of Demeter.

Lire la suite

Tags:

jeudi 15 février 2007

La Loi de Demeter | 3 vote(s)

En plus des différents principes d'architecture orienté objet qui ont déjà été discutés dans des billets antérieurs, la boite à outil de l'architecte logiciel contient bien d'autres choses, et en particulier un certain nombre de "lois".

Bien évidemment, ces lois ne sont pas des lois au sens strict. Il faut les voir comme des guides dont l'utilisation intelligente permet de simplifier le code ou l'architecture du logiciel en cours de construction. Pour la plupart, ces lois ne peuvent même pas être appliquées à 100%, et énoncent souvent des restrictions logiques en ce qui concerne leur application. C'est le cas, comme nous le verrons plus tard, de la Loi de Demeter.

Lire la suite

Tags: