Have we forgotten business logic?

Hey fellow devs 👋

I've been thinking about something that's been bothering me throughout my career - the way we handle business logic in our codebases. You know, that thing we're supposed to protect "at all costs" with fancy patterns and principles?

Let's be real: when was the last time you saw business logic being treated with the respect it deserves? Instead, what I usually see is:

  • Services/controllers that are absolute units 🫃
  • ORM models polluted with business behavior
  • Massive scripts moving data between DB and UI with zero regard for separation
  • The loud silence of non-existent test coverage

Why did we let this happen? I think there are a few reasons:

  1. Our hiring practices are broken: Job posts be like "must know 17 JavaScript frameworks" but zero mention of problem-solving or domain knowledge

  2. Architecture? What architecture?: Clean/hexagonal/onion architectures get ignored because "we need to ship fast"

  3. The eternal time crunch: Always rushing, always cutting corners, always "we'll fix it later"

  4. Software engineers being just “ticket machines”: business logic is something that someone else has to define, we just implement it and we don’t need to understand it (depending on company’s culture of course)

What if, in our next project, we took a moment to really understand the "why" behind the features we're building? What if we advocated for separating out business logic in our code, even in small ways?

Perhaps we can share these ideas with our teammates, sparking conversations that lead to gradual shifts in how we work.

What’s been your experience with this?