What is business logic in a computer program?

What is business logic in a computer program?

Business logic. In computer software, business logic or domain logic is the part of the program that encodes the real-world business rules that determine how data can be created, stored, and changed.

What does it mean to separate business logic?

When you write code, the parts of the code that can genrealize to solve problems of any other business are the parts that are not business logic. So when someone says to “separate business logic”, they’re basically saying the opposite – separate the generalizeable parts of the application from the requirements stemming from the business.

What’s the difference between business logic and business rules?

Welcoming a new visitor is a process (workflow) consisting of steps to be taken, whereas saying every new visitor must be welcomed is a business rule. Further, business logic is procedural whereas business rules are declarative.

Is it possible to reuse one business logic?

Multiple application, each with different application logic, can reuse one business logic. Imagine web app, web service and mobile app all operating using one business logic, but each clearly need different application logics.

How is business logic extracted from procedural code?

Business logic can be extracted from procedural code using a business rule management system (BRMS). The business rules approach of software development uses BRMSs and enforces a very strong separation of business logic from other code.

Which is the business rules approach of software development?

The business rules approach of software development uses BRMSs and enforces a very strong separation of business logic from other code. User interface management systems are another technology used to enforce a strong separation between business logic and other code.

What is business logic and what is infrastructure logic?

It’s easier to understand if you try to classify your code in two categories: business logic and infrastructure logic. Business logic, as other people commented, is the logic that is defined by the business. Infrastructure logic is the logic that makes your app work. Ideally, you want to separate both logics as much as possible.