For further actions, you may consider blocking this person and/or reporting abuse
Read next
How to make an AI agent with OpenAI, Langgraph, and MongoDB 💡✨
zpillsbury -
Enhancing Hybrid Search in MongoDB: Combining RRF, Thresholds, and Weights
Shannon Lal -
5 Open-Source AI Tools You’ve Probably Missed.
Balraj Singh -
Generative AI: A Personal Deep Dive - My Notes and Insights Part-2
Boopathi -
Top comments (4)
Business logic is the code that implements the business rules for an application.
I tend to think of it as the "core" logic of an application. If you remove the code that is about how the user interacts with the application, (presentation logic), and you remove the code that has to do with I/O more generally (like persistence logic for example), the business logic is what is left over.
I use the term business logic even for non-business software. For instance, let's say you're building a video game, like pacman. The business logic would include things like the hunting strategies that the different ghosts use; how they behave when pacman activates a power pellet, or when they get eaten by pacman; the basic layout of each maze expressed as a data structure; score tracking; how many lives pacman starts with; what it takes to get an extra life, etc.
The business logic would not include the code that actually handles the joystick input, nor would it include the code that actually displays and animates the game.
In the original pacman game code from the 1980s, I suspect that the business logic code and all of the other code was probably mixed together, because computers in those days had very little memory and cpu. Nowadays, maintainability is more important, so we usually try to create separate modules of code across different concerns. So we'd have a module just for the business logic, then we'd have a separate module that handles the input, graphics, and animation.
"There is only one valid definition of business purpose: to
create a customer" Peter F Drucker
Everything surrounds it is to create a customer or maintain a great relationship with your customers who use your product or services.
It is the people who pay you directly or indirectly.
You run a financial institution which issues bonds to investors.
The formula: assets / bonds = price is your business logic.
Everything that makes you, you