Why Bitrix? Or the fairy world 1C

One day, on Monday, the thought occurred to me - “but I dig in the new core” (relatively new, but more on that later). The thought did not appear out of the blue, but the prerequisites for it were:









So, I want to share the story of this campaign in the dense tropical jungle.







A short introduction



I do not consider myself a programming guru either on Bitrix, or on anything else. The article reflects my observations, experience and thoughts. Constructive criticism is welcome, as well as well-reasoned disputes (as Socrates bequeathed). The background has highlighted three broad topics that will not be addressed. Like their main aspect - programming working with data within the framework of the Bitrix D7 kernel (ORM), although it is a fundamental factor for writing it.







In the pool with the head



The aspect of working with data is fundamental and without it, nowhere, I thought, and decided to go right away google look through the documentation, hoping for a detailed description and the availability of examples, and of course look at the courses. With a light hand and hope for something tasty and new. Seeing no cause for concern, I went camping. The clouds were gathering ...







What you need to know about the jungle or the rules of survival



Rule number 1 - Beware of unscrupulous travel agents



I decided to start with the courses, having seen the menu items that interest me (module and ORM), I thought a bunch of texts and code inserts - everything will be fast, let's go ... So my next mistake was made. In fact, it turned out:









Of course, the plus is that, in principle, there are courses. Probably a plus, because writing something only on their basis is still that task. Anyway. After reviewing the courses, mostly inserting the code, I decided to try, but there is still documentation. It started to drizzle ...







Rule number 2 - Beware of dense thickets



Having made a couple of simple samples using Scotch documentation, I decided to try to get a discount on the goods. And then the rain began. Pseudon core and easter eggs:









DiscountTable - discounts on goods, belong to the module Trade Catalog, the functionality is outdated and not used. We recommend using the Cart Rules.




The documentation for creating the Basket Rules is still in development.




To get the rules for working with the basket that apply to the product, you will need to create a basket object and perform the calculation for the product.




To add product discounts, use the call CCatalogDiscount :: Add ()




All this is very depressing and makes you indignant, to say the least. And besides this, there are other inconveniences.







Rule 3 - Damn Insects



Bitrix has a number of strange and intrusive features that you constantly forget about, but they again flash before your eyes:









UPD 1. Amendment for Vue

Delved into the question.

In fact, BX claims the following Vue wrapper benefits:







  1. Support for multilingualism (Bitrix Framework) - you can add some functions from BX js to the Vue component, with reactivity disabled for them;
  2. Global Event Bus - for communication between applications (if there are several);
  3. Component inheritance - syntactic sugar, simple extends;
  4. Customization of components - syntactic sugar, something like a substitution (like / bitrix / components / and / local / components /);
  5. A single version of the library (within the framework of the site) - it is logical, I did not immediately think (thanks k0rinf ).




Trifles, but they are always nearby.







Rule number 4 - Strangers and natives are dangerous



Bitrix has one more benefit (no) - a large community. You can find any information, but its correctness and relevance will be a big question. Often, you can only learn how to create crutches or use an ancient code that already has an adequate replacement. But there are also messiahs who can show the way to their flock. One of these said:







To work with infoblocks, use the old kernel, which works well and stably.

I think I will do so.







Rule number 5 - Predators somewhere nearby



Marketers praising a product. Comparative articles where Bitrix is ​​the undisputed leader. A bunch the floor programmers, as I am. Many sites that ask to end their torment. Also the scourge of the community.







Rule # 6 - Have Water



With each new problem and the lack of an adequate solution, morality falls and you miss a move thoughts come, but is it all that is needed for this waste of time. The framework, containerization, and continuous integration may be better, rather than these half measures. In such cases, only a strong-willed decision well, demand saves the situation.







Rule number 7 - Tropical rain is hard



And it finishes one unpleasant fact, for attempts at programming, searching and structuring information, communicating with experts and returning to the past, learning something new, it takes a lot of time, in the absence of an intelligible result - it is constantly depressing.







Civilization aka conclusions



And here you come out of the jungle. Shabby but alive. Broken but still not broken. Your tired eyes are open and they see everything. A path where it really is worth moving and trails where special care is needed.







Bitrix is ​​a controversial product, saying that he generally developing develops incorrectly - not worth it. But to say that he is the best without noticing the flaws is blindly believing.







For myself, I decided, Bitrix - no. A complete failure, of course, will not work, but to develop a product in which for 5 years there has been no support for the basic functionality and intelligible documentation, for the new and announced kernel - I see no reason. It’s better to write a simple solution that will be used from project to project on the old core and go learn a new one.







Old man Frankenstein, of course, is worthy of life, at least a couple of worthy ideas in it. After all, we are not in the Middle Ages to burn at the stake all those who think differently. Or is it still worth what you think?







PS The article was written in haste, if you could not build a consistent chain of thoughts.








All Articles