Tomas Tulka's Blog

Random thoughts about programming and other stuff.


OOP

OOP Is Still Cool in 2021

Object-oriented programming might not be perfect but it is still the best we have.

Monolithic Objects

Don't model the real world, model your business!

Java Records Aren’t Necessarily Evil

How do Java Records fit to the object-oriented design?

Too Many Interfaces

Interfaces are good stuff. Does that mean the more the better?

What Is a Repository

Which purpose has a Repository? To which layer does it belong to? And how to implement it correctly?

Domain Collections

Collection, List and Set are terms very familiar to developers but hardly used by business experts. Therefore, they should not be part of the domain (API).

Object-Oriented Design vs. Persistence

From time to time I attend discussions about OOP. Every time someone comes up with the argument of dealing with persistence. The typical question can be reduced to “should an object persist itself or rather be persisted?” I believe the question is fundamentally wrong.

Treat Data as Data

Object-oriented approach is a mighty concept making software more maintainable, which means cheaper and easier to understand. Problems come at boundaries, where objects have to be passed on into a different layer or another system. There, the objects become just data and should be treated like that.

Glass-Box Testing Does Not Need Mocking

Black-box testing is testing of a component via its API without any knowledge of its implementation details. As the opposite there is the white-box testing. And it about testing implementation, right? Well, no...