I
I
Ivan Teodorovich2018-07-17 23:50:10
Software design
Ivan Teodorovich, 2018-07-17 23:50:10

What is the business logic of an android application?

I study pure architecture, I don’t quite understand what business logic is, what logic should be in this layer, what is a business model? I'd love to hear a detailed answer with an example

Answer the question

In order to leave comments, you need to log in

5 answer(s)
K
Konstantin Nagibovich, 2018-07-18
@nki

Remove the word business and everything becomes clearer, but the meaning does not change.

A
Anton Kucherov, 2018-07-18
@DexterHD

Business logic is the rules of a business. A business model is a model that describes the business processes of an organization / company / community, etc.
For example, it could be the logic for calculating "bonuses" for employees. This could be logic such as calculating a late payment penny. Or, for example, in a company there are criteria and rules by which the best employee of the month is determined. Or maybe you have a company that deals with logistics and there are certain rules by which the company calculates the delivery route and modes of transport by which the goods will be delivered. The description of these criteria and rules in the program code is the business logic.
As a rule, business logic does not change from application to application and does not depend on platforms and frameworks in general. It changes when the business itself changes, the structure of the organization, interactions within the company whose business you automate using the application.

M
Mercury13, 2018-07-18
@Mercury13

Business logic is what the program does from the user's point of view. In a different way (and more understandable) - the logic of the subject industry.
For example, we have a game of chess. Business logic is the rules of chess, the principles of the clock, the commands “ask for a move back”, “surrender” and “agree to a draw”. If you need to start not from the original position, but from any position, then the editor.
It is extremely debatable whether to attribute to business logic - animation of figures in the manner of Battle Chess and bots.
Logic, which is not business, is working with the network, graphics, configuration files, saving boards and games, anti-cheat and much more. In general, what is needed for the life support of the program, and not for the subject industry. Save games in PGN or XML, how to transfer packets over the network and what settings to keep for compatibility ...

M
MaxLich, 2018-07-18
@MaxLich

This is the part of the code that does what this application is written for. In addition to business logic, an application may contain code that is responsible for displaying information, managing information, working with external resources/services, some auxiliary code (for example, removing all 'x' characters in a string), etc.

S
Saboteur, 2018-07-18
@saboteur_kiev

Let's say you want to write a program that calculates utility bills.
The business logic here is simple - you need to enter meter readings on a monthly basis and form a price based on the tariff. Therefore, it is necessary to give the opportunity to set a tariff for each month and the ability to enter meter readings. Maybe you mistakenly entered incorrect meter readings - it means that it should be possible to delete the readings or edit them.
Let's take something more difficult. Program for an online store. Think over business logic - for example, bonuses, or discounts on goods, while someone could already place an order that travels from Poland and will be delivered to the client in a week. Apparently in the order, in addition to the list of goods, you need to separately add the price for this particular order. The bonus can be calculated if several specific products were selected - all this must be provided for. Well, and so on.
Business logic is part of the technical task, when the program does what the client needs. Technical algorithms are not so important to the client. Will you use arrays or a b-tree, a database or store everything in a CSV file - this is the technical part.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question