6
votes

I'm looking for design patterns (GOF, but others would be welcome too) for Delphi 2009.

There are some very good and classic articles about Design Patterns in Delphi:

Additionally, the newer Delphi's have some design patterns built in into the IDE via the model view.

However, none of them seem to make good use of the new features that Delphi has to offer, like generics and anonymous methods. There are C# examples that use generics and anonymous methods, but they can't really be translated 1:1 to Delphi, and I'd like to get some advice from people who've got hands-on experience with these specific features in Delphi.

Are any example available online, or in a book, or can anyone provide some useful examples or tips maybe?

2

2 Answers

4
votes

I've got a fairly simple example of a Generic Factory that uses anonymous methods up here

1
votes

GOF patterns are the same for any object oriented language. Delphi 2009 is not an exception. Generics and anonymous methods features are just a syntactic sugar, to make our life easier. So if your read the original GOF Design Patterns book, you can easily apply its concepts to Delphi 2009 and all its previous versions (even some of Turbo Pascal).