Part 3 : Developping Backends



All backends are based on the same interface. Reguardless if they are Mock backends or production backends. This unified interface allows developpers to swap backends as they want. And event to make multiple backends inside an other one and change is on the fly during the execution of the program.

This could be usefull for mocking. We could have a muliple mock backend which contains :
  • The default PMockControlBackend used in unit tests to mock all the interactions and internal behaviour of the program.
  • A text backend to have human readable feedback on exchanged data and calls.
  • A binary backend which can record all the events on the client/server but which keeps only the N last events to use less memory in case we are waiting for but for example.