From 5d2a4e677e05b0c5e0a8f33bbafbb5dc55acc286 Mon Sep 17 00:00:00 2001 From: Yousri <54667@etu.he2b.be> Date: Mon, 9 May 2022 12:12:37 +0200 Subject: [PATCH 1/8] Start- Intro_to_Solid.md --- Intro_to_Solid.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Intro_to_Solid.md diff --git a/Intro_to_Solid.md b/Intro_to_Solid.md new file mode 100644 index 0000000..39d8381 --- /dev/null +++ b/Intro_to_Solid.md @@ -0,0 +1,29 @@ +# Object-Oriented class design + + +## SOLID +SOLID coding is a principle created by Robert C.Martin, he is a famous computer scientist. +SOLID is an acronym for his five conventions of coding. +With their conventions, you can improve the structure of your code, reduce time to implement changes and technical debts, etc. +It is a collection of best practices. +And it was developed through this decades. +Principles of SOLID acronym are: + +* The Single-Responsibility Principle (**SRP**) +* The Open-Closed Principle (**OCP**) +* The Liskov Substitution Principle (**LSP**) +* The Interface Segregation Principle (**ISP**) +* The Dependency inversion Principle (**DIP**) + +The first conventions is **SRP**, that means that all classes of your code must do one thing. +That is an important principle. +That is the best way to work with others people in the same project. +Version control is easier, +You will never have _Merge conflicts_, because other people works in an another operations. +So, he will never have two same things in the code. + + + + + + -- 2.30.2 From 1bc82d4956de57e567855365c1d6eb24f62aaf08 Mon Sep 17 00:00:00 2001 From: Yousri <54667@etu.he2b.be> Date: Mon, 9 May 2022 17:04:21 +0200 Subject: [PATCH 2/8] Talk about OCP(not finish) --- Intro_to_Solid.md | 111 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 108 insertions(+), 3 deletions(-) diff --git a/Intro_to_Solid.md b/Intro_to_Solid.md index 39d8381..49a0a03 100644 --- a/Intro_to_Solid.md +++ b/Intro_to_Solid.md @@ -6,7 +6,7 @@ SOLID coding is a principle created by Robert C.Martin, he is a famous computer SOLID is an acronym for his five conventions of coding. With their conventions, you can improve the structure of your code, reduce time to implement changes and technical debts, etc. It is a collection of best practices. -And it was developed through this decades. +And it was developed through this decade. Principles of SOLID acronym are: * The Single-Responsibility Principle (**SRP**) @@ -15,15 +15,120 @@ Principles of SOLID acronym are: * The Interface Segregation Principle (**ISP**) * The Dependency inversion Principle (**DIP**) -The first conventions is **SRP**, that means that all classes of your code must do one thing. +The first convention is **SRP**, that means that all classes of your code must do one thing. That is an important principle. That is the best way to work with others people in the same project. Version control is easier, -You will never have _Merge conflicts_, because other people works in an another operations. +You will never have _Merge conflicts_, because other people work in other operations. So, he will never have two same things in the code. +### Single-Responsibility +Let's start something ! +We will make common mistake that violate **SRP** and correct them. +Let's code a bookstore invoice. + +```python +class Book(object): + def __init__(self, name, authorName, year, price, isbn): + self.name = name + self.authorName = authorName + self.year = year + self.price = price + self.isbn = isbn +``` + +As you can see, there is a class named Book with some fields. +This fields are public and characterize a book. + +OK ! Now we can start the invoice class. +This class will calculate the final price for a customer. + +```python +class Invoice: + def __init__(self, book, quantity, discountRate, taxRate, total): + self.book = book + self.quantity = quantity + self.discountRate = discountRate + self.taxRate = taxRate + self.total = total + def calculateTotal(self): + self.price = ((self.book.price - self.book.price * self.discountRate)*self.quantity) + + self.priceWithTaxes = self.price * (1 + self.taxRate) + + return self.priceWithTaxes + + def printInvoice(self): + print(self.quantity, "x", self.book.name,"", self.book.price, "$"); + print("Discount Rate: ", self.discountRate) + print("Tax Rate: ", self.taxRate) + print("Total: ", self.total) + def saveToFile(self, fileName): + pass +``` + +Alright, now we have the _Invoice_ class, he had 3 methods (calculateTotal, printInvoice, saveToFile) and some fields too. +Why this code violate the first convention of **SOLID** ? + + +The _printInvoice_ method violate this one because the **SRP** told us to make just one thing per classes. +Here, our printing logic is in the same class than _calculateTotal_ method. +So, the printing logic is mixed with business logic in the same class. +As you think, the _saveToFile_ method violate this convention too. + +Let's correct this example. +```python +class InvoicePrinter(object): + def __init__(self, invoice): + self.invoice = invoice + def printInvoice(self): + print(self.invoice.quantity, "x", self.invoice.book.name,"", self.invoice.book.price, "$"); + print("Discount Rate: ", self.invoice.discountRate) + print("Tax Rate: ", self.invoice.taxRate) + print("Total: ", self.invoice.total) +``` + +```python +class InvoicePersistence(object): + def __init__(self, invoice): + self.invoice = invoice + + def saveToFile(self): + pass +``` + +We have now two others classes, _InvoicePrinter_ class and _InvoicePersistence_ class. +The _InvoicePrinter_ is used to print information. +And the _InvoicePersistence_ is used to save information. + +With these three classes, we respect the first principle of **SOLID**. + +### Open-Closed Principle + +This principle says that classes are open for extension and closed to modification. +Extension mean news functionality and modification mean modifying your code. +If you want to add new functionalities, you are able to add it without manipulating the existing program. +If you touch the existing code, you have a risk to have news bugs. +So, if you want to add something else, you can use abstract classes and help of interface. + +Ok so, let's add new functionality in the _InvoicePersistence_ class. + +```python +class InvoicePersistence(object): + def __init__(self, invoice): + self.invoice = invoice + + def saveToFile(self): + pass + + def saveToDataBase(self): + pass +``` +The _saveToDataBase_ method is used to save information in a Data Base. +We have modified the _InvoicePersistence_ class. +This class will be more difficult to make easily extendable. \ No newline at end of file -- 2.30.2 From 6a7f4d1205e80b8e440c8977f2a7f029e12722a5 Mon Sep 17 00:00:00 2001 From: Yousri <54667@etu.he2b.be> Date: Tue, 10 May 2022 10:54:02 +0200 Subject: [PATCH 3/8] OCP UML Starting --- Intro_to_Solid.md | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/Intro_to_Solid.md b/Intro_to_Solid.md index 49a0a03..adc6da5 100644 --- a/Intro_to_Solid.md +++ b/Intro_to_Solid.md @@ -44,7 +44,7 @@ OK ! Now we can start the invoice class. This class will calculate the final price for a customer. ```python -class Invoice: +class Invoice(object): def __init__(self, book, quantity, discountRate, taxRate, total): self.book = book self.quantity = quantity @@ -111,7 +111,7 @@ With these three classes, we respect the first principle of **SOLID**. ### Open-Closed Principle This principle says that classes are open for extension and closed to modification. -Extension mean news functionality and modification mean modifying your code. +Extension mean news functionalities and modification mean modifying your code. If you want to add new functionalities, you are able to add it without manipulating the existing program. If you touch the existing code, you have a risk to have news bugs. So, if you want to add something else, you can use abstract classes and help of interface. @@ -131,4 +131,36 @@ class InvoicePersistence(object): ``` The _saveToDataBase_ method is used to save information in a Data Base. We have modified the _InvoicePersistence_ class. -This class will be more difficult to make easily extendable. \ No newline at end of file +And this class will be more difficult to make easily extendable. +So, we violate the **OCP** convention. +If you want to respect this principle, you have to create a new class. + +```python +class InvoicePersistence(abc.ABC): + @abstractmethod + def save(self, invoice): + pass +``` +The new _InvoicePersistence_ class has an abstract method. +So, if a class inherits the _InvoicePersistence_ class, you have to implement the _save_ method. + +And for example, we will create a _DataBasePersistence_ class, and this class inherit the abstract _InvoicePersistence_ class. +```python +class DatabasePersistence(InvoicePersistence): + def __init__(self, invoice): + self.invoice = invoice + self.save(self.invoice) + + def save(self, invoice): + print("Save in database ...") +``` +Let's make the same thing with _FilePersistence_ class. +```python +class FilePersistence(InvoicePersistence): + def __init__(self, invoice): + self.invoice = invoice + self.save(self.invoice) + + def save(self, invoice): + print("Save to file ...") +``` -- 2.30.2 From a52ad438557d258fc4bc6b2edf7b3ec9fee65c2f Mon Sep 17 00:00:00 2001 From: Yousri <54667@etu.he2b.be> Date: Tue, 10 May 2022 11:15:24 +0200 Subject: [PATCH 4/8] UML OCP finished, Start with Liskov Substitution Principle --- Intro_to_Solid.md | 14 ++++++++++++-- assets/UML_Solid | Bin 0 -> 32602 bytes 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 assets/UML_Solid diff --git a/Intro_to_Solid.md b/Intro_to_Solid.md index adc6da5..32c79c5 100644 --- a/Intro_to_Solid.md +++ b/Intro_to_Solid.md @@ -144,7 +144,7 @@ class InvoicePersistence(abc.ABC): The new _InvoicePersistence_ class has an abstract method. So, if a class inherits the _InvoicePersistence_ class, you have to implement the _save_ method. -And for example, we will create a _DataBasePersistence_ class, and this class inherit the abstract _InvoicePersistence_ class. +And for example, we will create a _DataBasePersistence_ class, and this class inherits the abstract _InvoicePersistence_ class. ```python class DatabasePersistence(InvoicePersistence): def __init__(self, invoice): @@ -154,7 +154,7 @@ class DatabasePersistence(InvoicePersistence): def save(self, invoice): print("Save in database ...") ``` -Let's make the same thing with _FilePersistence_ class. +Let's do the same thing with _FilePersistence_ class. ```python class FilePersistence(InvoicePersistence): def __init__(self, invoice): @@ -164,3 +164,13 @@ class FilePersistence(InvoicePersistence): def save(self, invoice): print("Save to file ...") ``` +Ok, we do a lot of things, let's make a UML to represent our class structure. + +
+ +
+ +That will be more simple to do extension. + +### Liskov Substitution Principle + diff --git a/assets/UML_Solid b/assets/UML_Solid new file mode 100644 index 0000000000000000000000000000000000000000..a2581d6c6937b4506260e883f680715e3f2415e2 GIT binary patch literal 32602 zcmeFZc{r78-#5M*6e&re2rU&tlm=zCLZ*-*GZmGLB_VS=k|ZR_6p}eahRjVuGKFNW z%qvpH5PqM_-ur&`z3=@z&->T=$M1O8aoo3dvaIX6&hz{IOyAQ_L+$9gHEe50B+@!1 zMLA6pX~k6%Y1snpa{NvD_NYXBS#gP?q)kgp+x}Vo6aJI#f};K<5@~fk{!CgX`D;H7 ziL{NRBqyuw95vi|MQ@{SxAa0t^T}m&-UpWH|K{^y4O{GmRs%=FmGTJ>xo=pc=V|8V z-&B#^ePb%MIVo4ZBkN(8<&$UmT@&^NR`U9fPRQ=mzAGOPd*h@YWo*vu0dJXGt4`&^ z(H7H?edlW3ct#TJ>Z;z=-&NkZjMS;2r^m!}Fb$>bLn#!8ms3GpjGZNrM6{QcW3zOVM~ z-FwmAo=wztYcqF9mA0#}ap8WCU(WRO^ep~o&Yz$8QNd+eU@t%aol`uy$ZcjUR`#03 z{s@_E&#sK0l{Vf$B29?mVx0Al9XodU^5w-}<8=-3N9o88V(#zm?`_H$9v+_VaupUA zpZomE*S^4rKlEn#X*;{o#w7LW>}!Prx*4}PB@0VSyJ~B{brf8(E1gMvlYw`gWf9>c z6+eFcT23hJYj3Z^(EFW~%C=mq6!|L!Mp91Sj0%j@k{Z`8|pbK#r!mvFUEl)igBC&CQ3!#2!d{c2!j=vA5t6xUax%nf;i3raC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Ol29OfE0%Rx`_|5E@eQ+)BO(M)QJdgEELo(PV!?o;M1#n%g`wLL~(dZc9xOwLjr~az;3d)fK-=8h>;?P;Ff=Uyx#0xR7!PYX z(jD;oDfjKQ6-nnxQVvV7-3gmB#&*>bl$9hvJ4%}>{sO9|61t}YN z#`QH(`;4ciVld>PWMTQ&qs(V!W%2V-3=Z<$#KME*AKiUNdri%e>8~m`C)2sWgY43Yk}$!y(xvVjCo~IMk+=54Z|nCl9S%wdS^WL z(ZjvJ(&~Xn)Ya{hm94F)2ucD%Fbi`5U17loKP2G+|D<4D;Z<|5(quj zVv(=synx05Js*yyL{HIHDj#WjzZnEDSZ{bUL0@|K8NZTCwn&8e**bmjHbBh^XMBYkfC zF{aM}azGjKvB)17_-|re0^x)o9%w!KdpO5Ya48ld z{?ejeTi=}mZ3H^3U_u{{vTfYWb3b3}KSk$f^jD>IwoXbS&Xk4#5V|2$ z8pl}>1`q<`?AIKiuDI=murN?~vGYtLc8Iz)$#}50*90|kkE=%I->UT?QLJC#Yc^(B z#Kb=N4PXuQuXZa zuWtNWnVpcvF4yAFZ~uoC5*UG+7q8n0&NdLdjjjZK`f(f@cEsH)`kCRa?+IX;{3W$Xfx|4(b&Ti(D?Rm z5j~&zv;R;k;^BS<(E<)UPr2h~$W7Jp1TvoJ67SD`uLLYYwXg3(%J=yL-2 z)LhQQpI1G`;#Tt1(DEv9W|7I|j++5=Ba?KOzxI-9fkMN~P0xIL_H(mXX2RBq-EIg} z{tAP1g|+B<@PVYul6z^NDt$Zg1wKjRkT*D5F7ns$!G(h%wBhYPik>kp4&q1tTk?~& Zz`m{PRBUcsgER5xhYlXmOw%|K^k4d|Moj Date: Tue, 10 May 2022 12:03:43 +0200 Subject: [PATCH 5/8] Information of Liskov Substitution Principle and Interface Segregation Principle: make example --- Intro_to_Solid.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Intro_to_Solid.md b/Intro_to_Solid.md index 32c79c5..4522e8b 100644 --- a/Intro_to_Solid.md +++ b/Intro_to_Solid.md @@ -174,3 +174,12 @@ That will be more simple to do extension. ### Liskov Substitution Principle +This convention tells us to create a substitutable subclass for their parents. +So, if you want to create an object in the subclass, you have to be able to pass it in the interface. + +### Interface Segregation Principle + +The _Interface Segregation Principle_ means that all interfaces have to be separated. +That means that clients has not functions that they do not need. + +### Dependency Inversion Principle -- 2.30.2 From 93422cad7f588383f2e81a4b062bd04a23f7e844 Mon Sep 17 00:00:00 2001 From: Yousri <54667@etu.he2b.be> Date: Tue, 10 May 2022 12:07:39 +0200 Subject: [PATCH 6/8] Resize Images --- Intro_to_Solid.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Intro_to_Solid.md b/Intro_to_Solid.md index 4522e8b..6811078 100644 --- a/Intro_to_Solid.md +++ b/Intro_to_Solid.md @@ -167,7 +167,7 @@ class FilePersistence(InvoicePersistence): Ok, we do a lot of things, let's make a UML to represent our class structure.
- +
That will be more simple to do extension. -- 2.30.2 From 920982a7413ed7cb64e448f35d5ea94ae3916c8f Mon Sep 17 00:00:00 2001 From: Yousri <54667@etu.he2b.be> Date: Tue, 10 May 2022 15:28:26 +0200 Subject: [PATCH 7/8] DIP explication starting --- Intro_to_Solid.md | 153 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) diff --git a/Intro_to_Solid.md b/Intro_to_Solid.md index 6811078..e668b80 100644 --- a/Intro_to_Solid.md +++ b/Intro_to_Solid.md @@ -177,9 +177,162 @@ That will be more simple to do extension. This convention tells us to create a substitutable subclass for their parents. So, if you want to create an object in the subclass, you have to be able to pass it in the interface. +Let's make an example ! +We will write a _Walk_ class and his subclass, _Jump_ class. +```python +class Walk(abc.ABC): + def __init__(self): + abc.ABC.__init__(self) + @abc.abstractmethod + def Speed(self): + pass + @abc.abstractmethod + def Ahead(self): + pass + '''the player walk ahead''' + + @abc.abstractmethod + def Behind(self): + pass + '''the player walk behind''' +``` +And the _Jump_ subclass. +```python +class Jump(Walk): + def __init__(self): + pass + + def Speed(self): + pass + + def Ahead(self): + pass + + def Behind(self): + pass +``` +As you can see, the _Jump_ subclass has all abstract method of _Walk_ class. +But we have a big problem ! +The _Jump_ subclass need a new method, the _height_ method. +And he does not need the _Ahead_ and _Behind_ method. +If you remove abstract method and add a new method in _Jump_ subclass, you will be in a big trouble. +This subclass will be different about mother class. +The simple way to resolve this trouble is to create a new mother class for _Walk_ and _Jump_ class. + +```python +class Movement(abc.ABC): + def __init__(self): + abc.ABC.__init__(self) + + @abc.abstractmethod + def Speed(self): + pass + + @abc.abstractmethod + def Animation(self): + pass + + @abc.abstractmethod + def Direction(self): + pass +``` +The _Movement_ class will be the mother class of _Walk_ and _Jump_ classes. +These subclasses will have three methods (_Speed_, _Animation_ and _Direction_ methods). +The problems that we had is resolved with the _Direction_ method. +With this method, you have choices to go ahead, behind, height, etc. + +
+ +Subclasses + +The _Walk_ subclass: + +```python +class Walk(Movement): + def __init__(self): + pass + + def Speed(self): + pass + + def Animation(self): + pass + + + def Direction(self): + pass + +``` +And the _Jump_ subclass: + +```python +class Jump(Movement): + def __init__(self): + pass + def Speed(self): + pass + + def Animation(self): + pass + + def Direction(self): + pass + +``` + +
+ ### Interface Segregation Principle The _Interface Segregation Principle_ means that all interfaces have to be separated. That means that clients has not functions that they do not need. +OK ! So, let's make an example with client manager. + +```python +class GoodCustomer(abc.ABC): + def __init__(self): + abc.ABC.__init__(self) + + @abc.abstractmethod + def FirstName(self): + pass + @abc.abstractmethod + def LastName(self): + pass + @abc.abstractmethod + def Address(self): + pass + + @abc.abstractmethod + def Work(self): + pass +``` +The _GoodCustomer_ mother class is a class where good customer information are saved. + +```python +class BadCustomer(GoodCustomer): + def __init__(self): + pass + + def FirstName(self): + pass + + def LastName(self): + pass + + def Address(self): + pass + + def Work(self): + pass +``` +The _BadCustomer_ subclass is a class where bad customer information are saved. +For this example, we don't want to know the addresses of bad guys. +So what can we do ? + +You have to create a new mother class for these two classes like the preceding example. ### Dependency Inversion Principle + +This convention says that all classes that we use depends on the interface or abstract classes. +Like precedents example, all methods was abstracts. -- 2.30.2 From 9a09ff821f48555859f9b74da30f94b85ad2c2fa Mon Sep 17 00:00:00 2001 From: Yousri <54667@etu.he2b.be> Date: Tue, 10 May 2022 16:08:05 +0200 Subject: [PATCH 8/8] Quote Added --- Intro_to_Solid.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Intro_to_Solid.md b/Intro_to_Solid.md index e668b80..a2c228c 100644 --- a/Intro_to_Solid.md +++ b/Intro_to_Solid.md @@ -336,3 +336,6 @@ You have to create a new mother class for these two classes like the preceding e This convention says that all classes that we use depends on the interface or abstract classes. Like precedents example, all methods was abstracts. + +>The Dependency Inversion principle states that our classes should depend upon interfaces or abstract classes instead of concrete classes and functions. +>We want our classes to be open to extension, so we have reorganized our dependencies to depend on interfaces instead of concrete classes. \ No newline at end of file -- 2.30.2