F
F
foonfyrick2022-01-03 17:03:18
1C
foonfyrick, 2022-01-03 17:03:18

One form for two documents, why is it bad?

From different documents, call the same processing form, but focusing on the owner of the form, fill in the called form with certain values. For example, if I am going to buy something, then I open a processing form on which all the goods necessary for the purchase are written, and if I want to sell something, the same processing form opens, but the goods that are already shown in stock. I did like this, but just read that such an idea is bad, but why?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Nagibovich, 2022-01-03
@foonfyrick

Logically, the form is a visual representation of the operation. Mixing business logic in one form is bad because of the further support of this form. Processes can change in the company and you will need to implement them with a constant eye on the neighboring process. Are you familiar with the KISS principle in development?

D
Dmitry Kinash, 2022-01-08
@Dementor

The idea is good and corresponds to the principles of programming engineering. At my department, even diplomas were defended on the topic of code reuse.
The execution of an idea is usually bad. Yes, and the 1C platform involves multiple duplication of the same type of code with minor edits. This gives rise to holivars and numerous petitions to the platform developers both on form inheritance (you change one and all related ones change), and on encapsulation (to make one work with goods and insert it into others) ... But at the moment, "best practice" it is considered to copy the form into a second document and develop it independently there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question