
Developers fight for a lot of time over the right way to develop software. An useful exercise instead can be to try to define one approach without moral...
0 replies - 6535 views - 01/02/13 by Giorgio Sironi in Articles

Dependency Injection Containers are often proposed as a quick way of writing creation and wiring code: instantation of classes, the connection of object...
0 replies - 5802 views - 10/22/12 by Giorgio Sironi in Articles

This year, I spent some time with Erlang by building a tuple space with it (a particular kind of distributed data structure oriented to concurrency). Although...
0 replies - 2714 views - 09/05/12 by Giorgio Sironi in Articles

This article is about a recurring pattern you can apply while encountering chain of conditionals or switch statements. Although their usage can be limited via...
0 replies - 4978 views - 08/29/12 by Giorgio Sironi in Articles

There is a diffused opinion in the PHP world that sometimes we are better off by defining functions in the global namespace than by organizing code into...
0 replies - 3434 views - 08/15/12 by Giorgio Sironi in Articles

This article implements the Beginner pattern.Sometimes you have to take a step back from discussions on coupling, cohesion, patterns and katas to give some...
0 replies - 12595 views - 07/23/12 by Giorgio Sironi in Articles

Metaphors are very diffused in programming, trying to bridge the technical part of it with comprehension of real world objects. For example, think of technical...
0 replies - 3874 views - 04/26/12 by Giorgio Sironi in Articles

PHP is unfortunately famous for spaghetti code, but instances of tangle logic is a product of the programmer and not of the language.One of the anti-patterns...
0 replies - 4298 views - 02/13/12 by Giorgio Sironi in Articles

We are entering into the final part of this series, on large scale refactorings: this kind of operations is less predictable and less immediate. However, it is...
0 replies - 3122 views - 02/06/12 by Giorgio Sironi in Articles

Delegation is a more flexible solution with respect to inheritance, because it allows to change collaborators by introducing new classes. However, it hides the...
0 replies - 3907 views - 02/01/12 by Giorgio Sironi in Articles

When a subclass violates the Liskov Substitution Principle, or uses only part of a superclass, it is a warning sign that composition can simplify the...
0 replies - 4678 views - 01/30/12 by Giorgio Sironi in Articles

In the scenario of today, a subclass and superclass are not very different: the evolution of the code has brought them to this situation. Behavior has been...
0 replies - 2997 views - 01/23/12 by Giorgio Sironi in Articles

This article shows an example of how the application of the Open/Closed Principle improved the design of a real project, the open source library...
0 replies - 5387 views - 01/12/12 by Giorgio Sironi in Articles

So far, we have only treated the movement of object members (fields and methods, and constructor as special methods); the assumption we made was that these...
0 replies - 2980 views - 01/11/12 by Giorgio Sironi in Articles

We are in the part of the series where refactorings target mostly the elimination of duplicated code. For now, most solutions will achieve this goal via...
0 replies - 2966 views - 12/28/11 by Giorgio Sironi in Articles