Category Archive for 'Patterns'

Patterns represent a couple (intent, solution), where the intent matters most. Based on that intents, that can be generic or specialized, I propose to consider patterns like types in languages with strong typing, for the compiler to enforce their constraints. Declaring patterns: what for? Consider the very simple Quantity pattern from Analysis Patterns (Fowler): Represent [...]

Low coupling between objects is a key principle to help you win the battle against software entropy. Making sure your dependencies are under control matters. Several tools can enforce dependencies restrictions, such as JDepend. However in a real project with many classes, packages and modules, the real issue is how to decide and configure the [...]

In finance, options are powerful tools for traders, and many design practices including design patterns can be seen as options. Options can -perhaps- yield a great benefit for a certain and immediate cost. If this cost is cheap enough it can be quite attractive. An option to buy a stock is a right to buy [...]

Not all participants in a pattern are equal, some are aware there is a pattern, while other participants do not, cannot and must not. Let us have a look at that principle and its consequences for coupling and dependencies management. Some patterns are intrusive, which means that adding them to an existing code base requires [...]

Bill Venners from Artima recently published « How Scala Changed My Programming Style« . This echoes the advise that you should « Learn a new language every year (Pragmatic Programmers) », but this time, this was about Scala (of course): How did Scala change how I think about programming? In short: I learned to appreciate the functional style. The [...]

The more patterns developers know, the most efficient they become within a team: it only takes one or two words (the pattern name) to communicate a design decision or proposal, instead of 10 mn of explanations. Communication also gets much more accurate and to-the-point (or less fuzzy). Because patterns often form a pattern language, not [...]

Composite patterns, such a the Bureaucracy pattern, are patterns built by the composition of other « smaller » patterns. However even usual design patterns can be considered composite patterns made of smaller subpatterns. The goal is therefore to find out which are the main subpatterns that enable to reconstruct as many design patterns as possible. The subpatterns [...]

I’m a big fan of design patterns, they do make my work easier, more explicit, more maintenable and also more enjoyable; however I’m surprised that not everyone knows them and actually uses them. What’s wrong with design patterns ? Some facts: they are difficult to learn and to teach, it is nearly impossible to teach [...]