Liskov Substitution Principle and legacy code

How do you determine whether a change should affect the entire application or just a slice? One way is to employ the LSP. Simply put, LSP says that a class should do what it sounds like it does. Any behavior change that would change that should be a different dependency.

That is, any change that changes behavior should probably be a new method or a new class with the appropriate method in it. This will prevent accidental side effects in the rest of the application and keep your code cleaner.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.9.179