2 ms·
In OOP world things can be hard to change if there is a over reliance on encapsulation and inheritance. For some people, making things easy yo change means mak
by DeathArrow 4y ago
In OOP world things can be hard to change if there is a over reliance on encapsulation and inheritance.
For some people, making things easy yo change means making them more complicate, adding more layers of abstractions and patterns.
I am using a more Data Oriented Approach [1] in which I keep the data separated from code, try to use immutable data structures and try to use methods and functions with as little side affects as possible. I am also trying to architect the software to be modular. I.e. split the code in classes grouped by functionalities, split it in different projects.
And I have success at this even if I am using a language that's very object oriented and being part of a community who was used to put a very high price on object orientation, abstraction and design patterns. I'm referring to C#/.Net.
[1] https://www.manning.com/books/data-oriented-programming https://www.manning.com/books/data-oriented-programming
PS. This book and some articles and videos made by others on Data Oriented Programming can be huge helpers and big time savers for me. I'm no longer thinking in objects, I'm thinking in data and functions which process the data.
I'm no longer a prisoner in the Kingdom of Nouns. [2]
[2] http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom...