Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly consists of 'Business Logic' in an application? [closed]

Tags:

I have heard umpteen times that we 'should not mix business logic with other code' or statements like that. I think every single code I write (processing steps I mean) consists of logic that is related to the business requirements..

Can anyone tell me what exactly consists of business logic? How can it be distinguished from other code? Is there some simple test to determine what is business logic and what is not?

like image 762
Niyaz Avatar asked Sep 02 '08 11:09

Niyaz


People also ask

What is business logic in an application?

Business logic is the programming that manages communication between an end user interface and a database. The main components of business logic are business rules and workflows.

Which contains business logic of an application?

The business logic layer contains objects that execute the business functions. The Command pattern should be considered to implement these objects. With the Command pattern, each use case in the requirements document is implemented as a separate command or set of commands executed in the business logic layer.

What do you expect in business logic?

Business logic determines how data may be shown, stored, created, and altered. It provides a system of rules that guides how business objects (parts of software that control how data is transported) work with one another. Business logic also guides how business objects within software are accessed and updated.

What contains the business logic and the business data?

The Business Logic Layer also known as BLL act as an intermediate between the Presentation Layer and the Data Access Layer (DAL). This layer handles the business logic, business rules as well as calculations.


1 Answers

Simply define what you are doing in plain English. When you are saying things businesswise, like "make those suffer", "steal that money", "destroy this portion of earth" you are talking about business layer. To make it clear, things that get you excited go here.

When you are saying "show this here", "do not show that", "make it more beautiful" you are talking about the presentation layer. These are the things that get your designers excited.

When you are saying things like "save this", "get this from database", "update", "delete", etc. you are talking about the data layer. These are the things that tell you what to keep forever at all costs.

like image 123
Serhat Ozgel Avatar answered Sep 17 '22 19:09

Serhat Ozgel