Ваші коментарі
Здравствуйте, Алексей!
Да, я сознательно решил не включать паттерн Интерпретатор в каталог. Этот паттерн самый сложный и самый редко-используемых среди всех классических паттернов. Он резко контрастирует с остальными паттернами, поэтому я и решил даже не упоминать его. Вот ещё хорошая статья на эту тему: http://blogs.perl.org/users/jeffrey_kegler/2013/03/the-interpreter-design-pattern.html
Thank you, Asim! I'm glad that you like it!
Здравствуйте!
Да, следующая редакция курса будет иметь примеры на Python. Она будет выпущена в конце 2020 года.
Thank you for the kind words, Ben! I'm still considering my options regarding publishing the print version of the book, but it's very likely that it'll be published in the future.
Thanks a lot, I'm glad that you like my work!
Здравствуйте!
Прошу прощения за задержку с ответом. Материалы курса не заточены под конкретный язык, поэтому если вы можете читать C#, Java или PHP, то курс для вас будет всё-равно полезен, т.к. в нём раскрываются общие техники рефакторинга ООП кода.
Прошу прощения за оформление ответа, надеюсь псевдокод выше хоть немного понятен.
Здравствуйте, Евгений.
Это очень хороший вопрос. Ниже — моё личное мнение, я не могу говорить за GoF. Полагаю, они имели в виду что-то вроде этого:
abstract class AbstractFactory abstract method createProductA: ProductA abstract method createProductB: ProductB class ConcreteFactoryViaPrototypes extends AbstractFacotry is field productAPrototype: ProductA field productBProtype: ProductA constructor ConcreteFactoryViaPrototypes(productA, productB) productAPrototype = productA productBProtype = productB method createProductA():ProductA is return productAPrototype.clone() method createProductB():ProductB is return productBPrototype.clone()
Клиент, вместо того, чтобы создавать несколько разных подклассов ConcreteFactory, имеет лишь один, и уже в клиентском коде настраивает разные фабрики под свои нужды.
modernFactory = new ConcreteFactoryViaPrototype(modernChairObject, modernCouchObject) classicFactory = new ConcreteFactoryViaPrototype(classicChairObject, classicCouchObject)
Hi!
Thanks for the question!
The Client should be able to deal with the Proxy and the Service directly. Proxy and Service should be interchangeable within the Client. For this to happen in most programming languages, the Proxy and Service classes should have some kind of common interface, be that the actual interface, or a common base class.
Please let me know if you have further questions.
Служба підтримки клієнтів працює на UserEcho
Hi Filip!
Thanks for the idea! The thing is, I have already exhausted the budget for making new localizations this year (there are 4 localizations in production right now). I'll consider making the Czech localization next year.