-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interface Power #6
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, ale generalnie wydaje mi się, że trochę rozmywa się co chcesz powiedzieć. Cała wstawka o Liskov mnie zaskoczyła… Nie do końca pokazujesz, że jesteś niezgodny z Liskov, a potem tłumaczysz na abstrakcyjnym przykładzie jak być zgodnym.
_posts/2018-10-11-interface-power.md
Outdated
author: frost-fox | ||
--- | ||
|
||
### Abstraction and polymorphism |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zacznij z 2-go poziomu nagłówka
_posts/2018-10-11-interface-power.md
Outdated
|
||
In object oriented programming such principles as Polymorphism and Abstraction are considered as golden rules, and we | ||
all understand theoretical basis of this principles and their simplistic beauty. Abstraction allows us to create | ||
functions defined as **abstract**, without specifying it's details at the beginning and deferring this moment to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chyba to zbyt szybki przeskok od „abstrakcji” do „abstrakcyjnej klasy / metody”…
_posts/2018-10-11-interface-power.md
Outdated
``` | ||
|
||
By adding `getDescription` logic `WebPage` we have used **inheritance** concept in programming language, now every logic | ||
introduced in parent class is inherited by it's child. Main point here is that we have tried to predict the future and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its
_posts/2018-10-11-interface-power.md
Outdated
* Liskov Substitution Principle | ||
|
||
### Cure | ||
There is a way how you can reduce damage of Liskov in your code and completely omit inheritance chains and Parent and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Liskov powoduje jakiś damage w Twoim kodzie?
_posts/2018-10-11-interface-power.md
Outdated
``` | ||
This approach will leave abstraction and polymorphism to serve us, but will remove any inheritance. | ||
What we can see here: | ||
1) We cannot inherit undesirable logic and dependencies from `WebPage` class - it simply can't have logic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To jest markdown? Nie jeśli nie, to użyj 1.
itd
tak przy okazji, warto oglądać finalny produkt. Które wygląda lepiej? |
Chciałem o zupewnie inny napisać ale poleciałem...