Courses🔥 10th Anniversary 🔥AI WorkshopCompaniesPricingBlogConfAiBotSubscribeSign in
  • Courses
  • 🔥 10th Anniversary 🔥
  • AI Workshop
  • Companies
  • Pricing
  • Blog
  • ConfAiBot
Subscribe
  • Courses
  • Companies
  • Communities
  • Blog
  • Gift card
  • Newsletter
  • Help
  • Shop
  • ConfAiBot
  • Contact
  • Legal notice
  • General conditions
  • Privacy policy
  • Cookies policy
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium
10 years of Codely: 100 € discount on Premium

Why Not to Use Static

5 February 2016 | screencasts

What is wrong with static methods? Why is it said that they "damage Object Orientation"? What do they have to do with coupling? In this video, we will answer these questions based on 3 main points regarding the harmful aspects of static class methods and attributes:

  • They break the Object-Oriented paradigm
  • They promote coupling
    • Harming changeability (violating the Open/Closed Principle of SOLID)
    • Making testability more difficult
  • They hide dependencies between classes

I recommend checking out the videos on How to Listen to Your Tests (as we also talked about how coupling made test development difficult), and the one on SOLID's Dependency Inversion Principle (as it is one of the aspects discussed in today's video). In the upcoming videos, we will talk about topics such as:

  • How to test classes that call static methods
  • Under what circumstances it is not harmful to use static methods

Tags

Clean CodeCode SmellsBasic LevelObject-Oriented ProgrammingSOLIDTesting
AnteriorHow to Test Coupled Code: Seams
SiguienteSemantic Constructors - Named Constructors #CleanCode

Pay according to your needs

lite (only monthly)

19 €
per month
  • Essential programming courses to build a solid foundation
  • Company invoice

standard

24,92 €
Save vs monthly of 49 €
Annual payment of 299 €
per month
  • Main catalog to master writing maintainable, scalable, and testable code
  • Receive job offers verified by Codely
  • Company invoice
Save 189 €

premium

33,25 €
Save vs monthly of 89 €
100 € anniversary discount
Annual payment of 399 €
per month
  • Exclusive AI courses to keep you always up to date
  • Early access to new courses
  • Discount on workshops
  • Receive job offers verified by Codely
  • Company invoice

We won't increase the price while your subscription is active