Community Coding : Design Patterns



hei all,

I started reading this book (Head First Design Patterns, O’Reilly) that gives an introduction to design patterns and thought it would be a nice exercise to try to implement those in VL. Then, @sebl suggested it could be a cool communitythingy on the forums, so let’s do it :)

I’ve set-up a repo so anyone can contribute and see what’s going on. The idea would be to produce a series of documented patches that could serve as a learning resource for anyone interested in the topic.

Also, you can check out Christopher Okhravi’s YouTube channel where he (brilliantly) explains in details the patterns of the book.

Any comments/suggestions welcome!




first pattern is very simple in vl, i can try to patch something if no one is working on it already.


working on it but i’d be curious to see how you handle it :)


here is a patch that implements some ducks from the first video with the strategy pattern and draws them with skia. also made a pull request (edit: now merged):

there is a Root and DuckManager patch to actually make some different ducks and manage them:

the output looks a bit silly tho, but i didn’t want to clutter it with too much functionality:


Thanks @tonfilm, merged !
A bit busy these days but I should be able to study it and maybe come up with something by the end of the week.


great, so next up, observer pattern! this is basically two nodes in vl, who is up for it? … hint hint:


Ok, not really sure where I’m going with this, so I’ll post here first.

I was trying to patch the thing with ToObservable nodes when I remembered something @Elias showed at LINK about Subjects. Despite the OnNext node being a bit counter intuitive at first, it seems pretty straightforward now, almost feels “too easy” to be the right thing to do :)

What would you think about that approach ?


VVVV.DesignPatterns.Observer.vl (49.2 KB)