Technical Practices: Never Return Your Data

No Getters That's the normal form of this technical practice. No Getters There's some uncertainity around what "No Getters" means. OK, there's two versions of it. Yegor Bugayenko in Elegant Objects Vol. 1 says, It's all about prefixes That's section 3.5.3 in Elegant Objects Vol. 1. I very strongly disagree with it. When it's all about the prefix, then you're not effectively encapsulating behavior. If you're [Read More]

µObjects: Fluent Types

I expect us all to be aware of the anti-pattern Primitive Obsession. If not - there are some quick resources available. Now that we have an idea of Primitive Obsession; I'll give my reason(s) for not using primitives. The core of Primitive Obsession is to not represent a concept with a data type that isn't explicitly that concept. A zip code (in the USA) is NOT a number. It's [Read More]

µObjects: Where our code meets the user

There's a couple types of places where the code we write interacts with the code someone else wrote. This could be another team, a 3rd party library, or the operating system. When we interact with these components, we're tying our code to their code in some fashion. The more these libraries are referenced in our code; the tighter we're coupling our code to their code. The issue here is that [Read More]

µObjects: Where code meets Operating System

There's a couple types of places where the code we write interacts with the code someone else wrote. This could be another team, a 3rd party library, or the operating system. When we interact with these components, we're tying our code to their code in some fashion. The more these libraries are referenced in our code; the tighter we're coupling our code to their code. The issue here is that [Read More]

µObjects: Composition over Inheritance

Inheritance is a code smell. Composition over Inheritance This is a known suggestion to improve the maintainability of software. How does this play into microObjects? Everything has a single responsibility. It's doing A thing; as I talk about in µObjects: Principles to code by. Composition over inheritance allows µObjects to control thier own behavior. It allows µObjects to have only the behavior; and responsibility; that the object wants. Nothing more [Read More]