Dependency Injection


This pattern was originally described in Martin Fowler’s article!!

We can summarized it this way: Object A creation depends on another object properties. Therefore A have a dependecy of B. There are several ways to reduce this problem, and B creation is also possible easily using keyword arguments. I dont know why but they always use the engine/car example.

Interestingly to remark that for python it is debatable a useful pattern actually.  But there are many micro-frameworks and tools for python [5].









Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s