Inventory, or, factoring reusable business apps

3 views
Skip to first unread message

bobhaugen

unread,
Mar 31, 2009, 5:56:05 PM3/31/09
to pinax-business
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?

Carl Meyer

unread,
Apr 11, 2009, 11:31:49 AM4/11/09
to pinax-business
Hi Bob,

I hadn't replied to this in part because it looked fine, and in part
because I find it hard to think very usefully about this sort of
design (beyond recognizing designs that are obviously broken) in the
absence of concrete use cases.

Carl

bobhaugen

unread,
Apr 11, 2009, 11:49:24 AM4/11/09
to pinax-business
I understand, Carl. I have the same probleNo problem with code-
without-use-case.

Probably posted it prematurely. But we were sitting at Pycon when
jtauber proposed this head design for proxy objects within a reusable
app for external objects that want to use the app. Inventory seemed
like a good example of such a reusable app, and I was trying to sketch
out what is within the boundaries of a reusable inventory app, and
what are the external proxy links.

The use case I have in mind is a multiple-seller social ecommerce
site. More particularly, a multiple CSA site where the CSAs also sell
some items individually.
Reply all
Reply to author
Forward
0 new messages