in reply to Phases Of The Spoon

I have no experience with internet commerce, but have programmed plugins before.

Breaking down the process of checkout into subprocesses just seems like good sense from a software engineering point of view. The real question is should individual plugins deal with one subprocess at a time or should they deal with all of them in one module?

The answer is that it really depends on the coupling of the subprocesses. If one subprocess depends on the result of another, then it makes sense to deal with both in the same module. But if the subprocesses are independent of each other, it is much simpler to write plugins that perform a single task well. For instance, I would guess that method of order delivery doesn't depend on the payment authorization method; all 9 possible combinations could happen. In this case programming 6 individual modules is much better than creating 9 combo modules.

Update: fixed a typo.

-Mark

Replies are listed 'Best First'.
Re^2: Phases Of The Spoon
by jk2addict (Chaplain) on Mar 28, 2005 at 22:50 UTC

    True, delivery doesn't depend on authorization (unless auth fails of course, then the whole order execution is aborted).

    However, I was thinking that in mostly rare instances, one would like to have the same package/plugin/module handle more than one phase. Let's say a Handel::Checkout::Plugin::PayPal plugin might handle the address verification, the payment autho AND the order delivery, while another Handel::Checkout::Plugin::AddressScrubber simply does it's best to clean addresses.

    So I guess I answered my own quesiton somewhat. :-)