Pages

Sunday, November 18, 2012

Fancy a cup of tea?

In most parts of Eastern Europe, they often drink it with lemon and honey,
in India with milk and cardamom,
in Spain they drink it just with sugar,
in Ireland they drink it with milk and some people with a fascinating new taste called brown sauce (If you dont belive me see this movie: Intermission).

But in all cases the recipe has 2 mandatory components:
  1. Boiling water
  2. Tea

In this video I am going to talk about a new design pattern that was created by Marco Castigliego, called
"The Step Builder".

"The Step Builder" is a variant of the creational pattern "Builder".
The advantages of using Castigliego's pattern are:

  • The user will see only one or few selected methods per time during the Object creation.
  • Based on the user choice different paths can be taken during the Object creation.
  • The final build step will be available only at the end, after all mandatory steps are completed returning an Object in a consistent state.
  • The user experience will be greatly improved by the fact that he will only see the next step

 methods available.

More information about this pattern and also a wiki definition of it can be found at Marco Castigliego's blog: Remove duplications and fix bad names

 Note: Don't forget to select the maximum quality in the video player




2 comments:

  1. Such an interesting new pattern.
    The video fabolous as always. Well done!

    ReplyDelete

Share with your friends