: Minimize the effort of component development overhead during initial development phase.
: When designing a component based solution you want to focus on program structure and business functions instead of getting down to the nitty-gritty of component based development. You also want the opportunity to play around with the structure and interfaces without the extra effort of re-deploying etc.
: Following the principle DoTheSimplestThingThatCouldPossiblyWork
, you start out small and create a dummy implementation of the interface. As you go along and learn more about the problem and other components that interface with this component knows what they need from yours becomes clear, your mock implementation becomes your component interface and you can now get down to the nitty gritty.
: You can start with the nitty gritty earlier as well (just to get a feel for transactional attributes and persistent framework) but without publishing the interfaces to other components. They will use your mock implementation for now until it becomes clear what those components need from yours.
: Since it is a wise thing to EncapsulateDesignDecisions?
you will probably use FactoryMethod
to return the MockImplementation?
as an interface but you could as well return the simple mock implementation as such.
And at first read I tought the "MockImplementation?
" in MockImplementationBecomesComponentInterface
referred to an actual MockObject
, which got reused as ComponentInterface?
. But maybe this could really be done.