DEV Community

Discussion on: What Is Business Logic?

Collapse
 
monknomo profile image
Gunnar Gissel • Edited

I write lots of business logic so I feel kinda qualified to have an opinion here. I’m excited!

There is the normal control flow logic - if/else’s, while loops and for loops. There’s the logic that glues together a program - event handlers, state management, etc.

Then there is business logic. It’s the rules your users make up. In my case, my users are fisheries managers, so business logic is like: if this landing of fish puts them over their quota limit, lock their account and notify the ticket writing department. Or a person in program A may transfer quota to some else in program A, but not someone in program B unless they have a valid medical transfer certificate.

Business logic is the weird flows and rules that only make sense in the context of the user’s business