Why is IoC / DI not common in Python?

I don’t actually think that DI/IoC are that uncommon in Python. What is uncommon, however, are DI/IoC frameworks/containers. Think about it: what does a DI container do? It allows you to wire together independent components into a complete application … … at runtime. We have names for “wiring together” and “at runtime”: scripting dynamic So, a DI container is nothing … Read more

Why is IoC / DI not common in Python?

I don’t actually think that DI/IoC are that uncommon in Python. What is uncommon, however, are DI/IoC frameworks/containers. Think about it: what does a DI container do? It allows you to wire together independent components into a complete application … … at runtime. We have names for “wiring together” and “at runtime”: scripting dynamic So, a DI container is nothing … Read more

What is a JavaBean exactly?

A JavaBean is just a standard All properties are private (use getters/setters) A public no-argument constructor Implements Serializable. That’s it. It’s just a convention. Lots of libraries depend on it though. With respect to Serializable, from the API documentation: Serializability of a class is enabled by the class implementing the java.io.Serializable interface. Classes that do not implement this interface will not … Read more

What is Inversion of Control?

The Inversion of Control (IoC) and Dependency Injection (DI) patterns are all about removing dependencies from your code. For example, say your application has a text editor component and you want to provide spell checking. Your standard code would look something like this: What we’ve done here creates a dependency between the TextEditor and the … Read more