DistributionSwitch: a flag that allows you to switch an application between distributed mode and single-process mode
Reasons for easily enabling single-process mode:
- more efficient for demos and standalone usage
- easier to run manual tests
- unit tests run faster
- facilitates debugging of non-network-related behavior
(coined by
JimLittle in
DistributionStories)
-- SteveHowell
I'm also a big fan of this pattern.
An implementation of this I have used looks like this:
Reason I like it include:
- the system can be installed on a stand alone laptop – to allow executive to give demos, very powerful
- the user interface team can test their GUI using local test data while the server team are still implementing the remote component. The project I used this on involved connecting to a legacy S/90 which had its own challenges
- by building the local proxy class the server team is forced to create an unambiguous interface, understanding exactly what the client team is expecting. This may change but at least the consequences are understood
- the local test data can also be used in the unit tests for the components
--
PaulCaswell
See also: HalfObjectPlusProtocol