Tomas Tulka's Blog

Random thoughts about programming and other stuff.


How Cohesion and Coupling Correlate

Cohesion done right reduces coupling and complexity of systems.

The Interface Segregation Principle with Lambdas

How to implement the ISP using simple functions to reduce coupling and complexity at the same time.

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?

No Internals in Configuration API

Configuration is part of the application API, so the same rules apply to it: no leak of implementation detail.

Colored Services

Defining service boundaries is hard. Let's bring some colors and make it fun!

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).

Events vs. Commands in DDD

There are situations where events and commands seem to be a good solution for a problem. Where to use events and where are commands the best fit?