Quantcast
Channel: Dave++ » LaTex
Viewing all articles
Browse latest Browse all 2

Design Patterns in Python

$
0
0

This post is 2 things;

  1. A statement of intent
  2. An apology for inaction

Recently this blog has not been nearly as active as I would like it to be. This is due to many things but mostly me simply being very busy.

So that’s the apology done, now for the statement of intent!

I have intended to write a short e-book about design patterns using the python programming language. This is inspired by the aptly titled Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides who are collectively known as the Gang of Four (GOF).

While I started to write this as an e-book, I now think the way to do this is write a blog post per design pattern and then compile them into a guide which I will keep here. This is much in the same way that Rafe Kettler wrote his guide to pythons magic methods which can be found here.

Why do I want to do this? I want to write this to pass on some knowledge which I have gained working as a software engineer, but also to learn a lot. I think of these as the twin goals of this blog because if I write about something I want to get it right. While I know quite a bit about some design patterns there are others I definitely don’t.

Here is the list of the design patterns I hope to tackle.

  • Creational
    • Abstract Factory
    • Builder
    • Factory Method
    • Prototype
    • Singleton
  • Structural
    • Adapter
    • Bridge
    • Composite
    • Decorator
    • Facade
    • Flyweight
    • Proxy
  • Behavioural
    • Chain of Responsibility
    • Command
    • Interpreter
    • Iterator
    • Mediator
    • Memento
    • Observer
    • State
    • Strategy
    • Template
    • Visitor
  • UI Patterns
    • Model View Presenter (MVP)
    • Model View Controller (MVC)
    • Model View View-Model (MVVM)

The first 3 sections are directly from the GOF book and that is where I am drawing most of my inspiration from. However that book used examples from C++ and smalltalk and I believe that writing in python will simplify this hugely.

I have already started this endeavour writing in LaTex and it and my examples are already on my gitHub account here.

Hopefully my first article will be along shortly. (oh and Happy New Year and thanks for reading)



Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images