Тёмный

If You Want To Face LESSER Exceptions ... 

About Clean Code
Подписаться 4,2 тыс.
Просмотров 797
50% 1

The best way to handle exceptions is to avoid them by design.
Source Code: github.com/plainionist/AboutC...

Опубликовано:

 

29 окт 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@wcypierre1989
@wcypierre1989 7 месяцев назад
Can you tell why did you choose to use Code Contracts?
@AboutCleanCode
@AboutCleanCode 7 месяцев назад
@wcypierre1989 I am using "Design-by-Contract" almost everywhere in my code to make expectations and assumptions explicit. See ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE--3YfmHfZp-U.html (i am not using microsoft "code contracts")
@wcypierre1989
@wcypierre1989 7 месяцев назад
@@AboutCleanCode now I get it, thanks!
@cuongphung-5089
@cuongphung-5089 8 месяцев назад
Could you share source code and explain more about the design pls. many thanks
@AboutCleanCode
@AboutCleanCode 8 месяцев назад
@cuongphung-5089 you can find the source code here: github.com/plainionist/AboutCleanCode/tree/main/AllKeywordGroup - The idea of this design is basically to avoid forcing the clients to deal with "null" by providing a special object (could be a special implementation of an interface or a derived class as in this example) which encapsulates the intended behavior (null object pattern). In this example the intended behavior was "matches all" so i also changed the design of the initial KeywordGroup class to be able to implement this behavior
@cuongphung-5089
@cuongphung-5089 8 месяцев назад
@@AboutCleanCodeThanks.🥰🥰🥰🥰