We had a previous discussion thread in pinax-users about this topic:
http://groups.google.com/group/pinax-users/browse_thread/thread/75bbc844904ccfa9/8c8c34878a946833
And I have run into several subsequent discussions of the same topic.
The Pinax rule of thumb for reusable apps is "drummers, not whole
rythm sections". That is, the app should do one and only one thing,
and do it well.
So what is the proper factoring for reusable business apps?
As a contribution to the discussion, I have posted a candidate
Inventory model here:
http://dpaste.com/21877/
One feature of the model is that those classes that might have many
instances do *not* contain GenericForeignKeys. The GFK's are
contained in proxy classes that link to the objects that will normally
belong to other apps. And the classes with many instances contain
regular ForeignKeys to the proxy objects.
So, for example, InventoryItem has a ForeignKey to Inventory, which
has a GenericForeignKey to whatever object (group, company, person)
owns this set of InventoryItems.
So what do y'all think?
Is this a good factoring of Inventory? (Recognizing that it is a bit
sketchy in places.)
What should be added, if anything?
What should be removed?
What is unclear?
What are your suggestions for improvement?
What other reusable business apps interest you?