You are here |
algorithmicpattern.org | ||
| | | |
johannesbrodwall.com
|
|
| | | | ||
| | | |
blog.planethawleywood.com
|
|
| | | | How about delivery service that only delivers halfway? Like, you call to order a pizza, and they say, okay, I'll meet you in the Marc's parking lot in a half-hour. | |
| | | |
blog.nuculabs.de
|
|
| | | | Hello, In this article we're going to explore the Method Injection and Property Injection design patterns. To demonstrate the patterns I'm going to add a new interface named Encoder to the printer.py file and a concrete implementation for two encoders: Rot13Encoder and NullEncoder. 1 2 3 4 5 6 7 8 9 10 11 12 13 class Encoder(metaclass=abc.ABCMeta): def encode(self, message: Message) -> Message: raise NotImplementedError("encode must be implemented!") class Rot13Encoder(metaclass=abc.ABCMeta): def encode(self, message: Message) -> Message: return Message(codecs.encode(str(message), 'rot_13')) class NullEncoder(metaclass=abc.ABCMeta): def encode(self, message: Message) -> Message: return message The Encoder will be used by the printer in order to encode the messages before printing them. | |
| | | |
mijndertstuij.nl
|
|
| | Joining the bandwagon of sharing my default apps for 2024. |