DEV Community

Discussion on: What Is Business Logic?

Collapse
 
kayis profile image
K

Imagine all logic you could technically write. The business logic is now that part of all logic that is needed for your use-cases.

A front-end example: You can create a slider that slides through hundreds of images for your home-page, but the use-case states that you only should slide through 3 and then start again from the first one, so your business logic restricts your software from doing "all thats possible" to a sub-set of actions.

A back-end example: You can create user records where multiple users have the same email address, but the use-case states that the email address should be unique for every user, so your business logic restricts the creation of multiple users with the same email address.