A great book: Design Patterns in Ruby
I have been reading Design Patterns in Ruby. It’s a quite intrestring read, the author explain the GOF patterns in a very clear and readable way. For example, in chapter 3 “Varying the Algorithm with the Template Mothod”, the author explaing the ‘Template Method’ pattern quite clearly by employing a example project which I did have to do something similiar many years ago– spewing out reports with some contents but in many different formats such as HTML, PDF, plain text …etc. In chapter 14 ‘Easier Object Construction with the Builder’, the author simulates the computer building process by using ‘Builder’ Pattern. The “Builders in the Wild” section in this chapter mentioned that MailFacotory in Ruby is a builder pattern example which remind me that email.mimi.text.MIMEText in Python is also a builder pattern example. Anyway, it’s good to see finally there is a design patterns book from the perspective of dynamic language.