The three principles of object-oriented programming:
Automatic data processing application:
Abstract Class: a class whose implementation is not complete and which is not instantiable.
Allows passing a contract. Child classes will have to implement what is missing.
Advantages:
ABC 👨👩👧👦Currently, 3 data formats in our application:
Do you see a problem?
BUT
Pattern Bridge
Découpage d’une grosse classe en un groupe de petites classes avec leur propre hiérarchie qu’il faut ensuite assembler.
if/elif/else 🐱🏍Writing quality code is like doing precision craftsmanship; it requires tools, experience, and methods.
if/elif/elseImportant
Low coupling, high cohesion
Limit the risk of errors when modifying code (avoid spaghetti code) 🍝
if/elif/else. Each part of our code handles only one thingChaque partie de notre code s’occupe d’une seule chose
“In computer science, and more specifically in software development, a design pattern is a characteristic arrangement of modules, recognized as a best practice in response to a software design problem. It describes a standard solution, usable in the design of different software.” — Source
Is a tool that is there to help you
Recurring Problem:
Important
Faible couplage, forte cohérence