DEV Community

Discussion on: What Is Business Logic?

papaponmx profile image
Jaime Rios • Edited

The term refers to those rules, that are defined buy business and that should be implemented within an application.

For example: Imagine that you have an online store where you want to sell all of your products.

You could expect the items to be organized by categories. Maybe you want to show the cheapest first, or the most frequently purchased. Maybe you want to have some featured products, but only during the black Friday.

You might want to sell candy bars at a specific price, and maybe limit that offer to one candy bar per customer.

All those rules are what we call business logic.