DEV Community

loading...

Discussion on: How you can reduce usage of getter methods in your code

aleksikauppila profile image
Aleksi Kauppila Author

As implied in code examples, this is business layer code. Yes, i expect people working with applications to be able to change their code

When you're working with libraries, you usually don't have to worry about them containing entities such as Company or Employee. But defensive practices work well when designing a library too. If there's only one way to use a class, it's virtually impossible to break the code.

Forem Open with the Forem app