Closed scls19fr closed 8 years ago
Hi,
Factory pattern is necessary for Reader and Hardware. It will be possible to use an other kind of NFC reader and hardware (RaspberryPi, BeagleBone Black...) Moreover it will be possible to use a FakeBoard a fake NFC reader for unit tests.
Reader
Hardware
See factory pattern: https://en.wikipedia.org/wiki/Factory_method_pattern
This gist implements such features:
https://gist.github.com/scls19fr/6fba064b025c774e0ce5
Kind regards
Factory, BaseReader and ReaderFactory done https://github.com/RaspberryPi-Samples/py-my-key/commit/548cf5789b09eb533b6b5f34c86cf96b19ef170b
BaseHardware, HardwareFactory: ToDo
Hi,
Factory pattern is necessary for
Reader
andHardware
. It will be possible to use an other kind of NFC reader and hardware (RaspberryPi, BeagleBone Black...) Moreover it will be possible to use a FakeBoard a fake NFC reader for unit tests.See factory pattern: https://en.wikipedia.org/wiki/Factory_method_pattern
This gist implements such features:
https://gist.github.com/scls19fr/6fba064b025c774e0ce5
Kind regards