Principles to desing better software, less couplig

  • Single Responsibility: every class should have a single responsibility/purpose.
  • Open/Closed: "software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification" which means you should be able to extend a class behavior, without modifying it.
  • Liskov’s Substitution: "Derived or child classes must be substitutable for their base or parent classes". any class that is the child of a parent class, should be usable in place of its parent, with the same interface.
  • Interface Segregation: "do not force any client to implement an interface which is irrelevant to them". "Keep It Simple" / KISS
  • Dependency Inversion Principle: High-level modules/classes should not depend on low-level modules/classes. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions.

Notice: Undefined variable: browserName in /var/www/taziomirandola.it/lib/Visitors.php on line 86

Notice: Undefined variable: browserName in /var/www/taziomirandola.it/lib/Visitors.php on line 96

Deprecated: strripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior in /var/www/taziomirandola.it/lib/Visitors.php on line 96

Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /var/www/taziomirandola.it/lib/Visitors.php on line 39

Fatal error: Uncaught TypeError: Argument 1 passed to safe_text() must be of the type string, null given, called in /var/www/taziomirandola.it/lib/Visitors.php on line 39 and defined in /var/www/taziomirandola.it/lib/Visitors.php:162 Stack trace: #0 /var/www/taziomirandola.it/lib/Visitors.php(39): safe_text() #1 /var/www/taziomirandola.it/lib/Visitors.php(124): Visitors::getData() #2 [internal function]: Visitors::log() #3 {main} thrown in /var/www/taziomirandola.it/lib/Visitors.php on line 162