Posts Tagged ‘meta’

Django polymorphism: Mixins vs Inheritance Models

January 15, 2010

Relational databases are not the greatest storage destination for polymorphic data structures (stack overflow). Polymorphism allows you to have heirarchies of objects that perform similar actions. By defining this action once, you can re-use it for its subclasses. It makes code cleaner and easier to maintain. I experimented with a few different ways of doing some of my subclassing and came away with an approach involving mixins that I really like so far.

(more…)


Follow

Get every new post delivered to your Inbox.