W
W
webquestions2015-10-22 08:57:07
PHP
webquestions, 2015-10-22 08:57:07

Whose code is cleaner and more convenient to expand Bitrix or Modx?

The correct and logical structure is important. Initially, Bitrix
taught, but then I stumbled upon a sea of ​​criticism . has 1 Bitrix, 2 modX, 3 no difference, 4 and there and there is wrong, 5 and there and that one is correct for me, but this does not interfere with the correct (programming, studying, understanding site building, will not lead you astray), something else?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
M
MetaDone, 2015-10-22
@MetaDone

anything is better than Bitrix. And may the experienced Bitrixoids forgive me, but personally I don’t intend to work with such a mess.
Just a piece of code that Bitrix Small Business generates after installation in index.php

spoiler
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetTitle("Интернет-магазин \"Одежда\"");
?>
<h2>Лучшие коллекции</h2>
<?$APPLICATION->IncludeComponent("bitrix:catalog.top", "", array(
    "IBLOCK_TYPE_ID" => "catalog",
    "IBLOCK_ID" => "2",
    "ELEMENT_SORT_FIELD" => "name",
    "ELEMENT_SORT_ORDER" => "asc",
    "ELEMENT_SORT_FIELD2" => "name",
    "ELEMENT_SORT_ORDER2" => "asc",
    "HIDE_NOT_AVAILABLE" => "N",
    "ELEMENT_COUNT" => "8",
    "LINE_ELEMENT_COUNT" => "4",
    "PROPERTY_CODE" => array(0=>"MINIMUM_PRICE",1=>"MAXIMUM_PRICE",2=>"",),
    "OFFERS_FIELD_CODE" => array(0=>"NAME",1=>"",),
    "OFFERS_PROPERTY_CODE" => array(0=>"ARTNUMBER",1=>"COLOR_REF",2=>"SIZES_SHOES",3=>"SIZES_CLOTHES",4=>"MORE_PHOTO",5=>"",),
    "OFFERS_SORT_FIELD" => "sort",
    "OFFERS_SORT_ORDER" => "asc",
    "OFFERS_SORT_FIELD2" => "id",
    "OFFERS_SORT_ORDER2" => "desc",
    "OFFERS_LIMIT" => "0",
    "VIEW_MODE" => "SLIDER",
    "TEMPLATE_THEME" => "site",
    "PRODUCT_DISPLAY_MODE" => "Y",
    "ADD_PICT_PROP" => "MORE_PHOTO",
    "LABEL_PROP" => "NEWPRODUCT",
    "OFFER_ADD_PICT_PROP" => "MORE_PHOTO",
    "OFFER_TREE_PROPS" => array(0=>"COLOR_REF",1=>"SIZES_SHOES",2=>"SIZES_CLOTHES",),
    "SHOW_DISCOUNT_PERCENT" => "Y",
    "SHOW_OLD_PRICE" => "Y",
    "ROTATE_TIMER" => "30",
    "MESS_BTN_BUY" => "Купить",
    "MESS_BTN_ADD_TO_BASKET" => "В корзину",
    "MESS_BTN_DETAIL" => "Подробнее",
    "MESS_NOT_AVAILABLE" => "Нет в наличии",
    "SECTION_URL" => "",
    "DETAIL_URL" => "",
    "BASKET_URL" => "/personal/cart/",
    "ACTION_VARIABLE" => "action",
    "PRODUCT_ID_VARIABLE" => "id_slider",
    "PRODUCT_QUANTITY_VARIABLE" => "quantity",
    "PRODUCT_PROPS_VARIABLE" => "prop",
    "SECTION_ID_VARIABLE" => "SECTION_ID",
    "CACHE_TYPE" => "A",
    "CACHE_TIME" => "180",
    "CACHE_GROUPS" => "Y",
    "DISPLAY_COMPARE" => "N",
    "PRICE_CODE" => array(0=>"BASE",),
    "USE_PRICE_COUNT" => "N",
    "SHOW_PRICE_COUNT" => "1",
    "PRICE_VAT_INCLUDE" => "Y",
    "PRODUCT_PROPERTIES" => array(),
    "USE_PRODUCT_QUANTITY" => "Y",
    "CONVERT_CURRENCY" => "N",
    "OFFERS_CART_PROPERTIES" => array(0=>"ARTNUMBER",1=>"COLOR_REF",2=>"SIZES_SHOES",3=>"SIZES_CLOTHES",)
  ),
  false
);?>
<h2>Тренды сезона</h2>
<?$APPLICATION->IncludeComponent(
  "bitrix:catalog.top",
  "",
  Array(
    "IBLOCK_TYPE" => "catalog",
    "IBLOCK_ID" => "2",
    "VIEW_MODE" => "SECTION",
    "TEMPLATE_THEME" => "site",
    "PRODUCT_DISPLAY_MODE" => "Y",
    "ADD_PICT_PROP" => "MORE_PHOTO",
    "LABEL_PROP" => "NEWPRODUCT",
    "OFFER_ADD_PICT_PROP" => "MORE_PHOTO",
    "OFFER_TREE_PROPS" => array("COLOR_REF", "SIZES_SHOES", "SIZES_CLOTHES"),
    "SHOW_DISCOUNT_PERCENT" => "Y",
    "SHOW_OLD_PRICE" => "Y",
    "MESS_BTN_BUY" => "Купить",
    "MESS_BTN_ADD_TO_BASKET" => "В корзину",
    "MESS_BTN_DETAIL" => "Подробнее",
    "MESS_NOT_AVAILABLE" => "Нет в наличии",
    "ELEMENT_SORT_FIELD" => "sort",
    "ELEMENT_SORT_ORDER" => "asc",
    "ELEMENT_SORT_FIELD2" => "name",
    "ELEMENT_SORT_ORDER2" => "asc",
    "SECTION_URL" => "",
    "DETAIL_URL" => "",
    "BASKET_URL" => "/personal/cart/",
    "ACTION_VARIABLE" => "action",
    "PRODUCT_ID_VARIABLE" => "id_section",
    "PRODUCT_QUANTITY_VARIABLE" => "quantity",
    "PRODUCT_PROPS_VARIABLE" => "prop",
    "SECTION_ID_VARIABLE" => "SECTION_ID",
    "DISPLAY_COMPARE" => "N",
    "ELEMENT_COUNT" => "12",
    "LINE_ELEMENT_COUNT" => "4",
    "PROPERTY_CODE" => array("MINIMUM_PRICE", "MAXIMUM_PRICE"),
    "OFFERS_FIELD_CODE" => array("NAME"),
    "OFFERS_PROPERTY_CODE" => array("ARTNUMBER", "COLOR_REF", "SIZES_SHOES", "SIZES_CLOTHES", "MORE_PHOTO"),
    "OFFERS_SORT_FIELD" => "sort",
    "OFFERS_SORT_ORDER" => "asc",
    "OFFERS_SORT_FIELD2" => "id",
    "OFFERS_SORT_ORDER2" => "desc",
    "OFFERS_LIMIT" => "0",
    "PRICE_CODE" => array("BASE"),
    "USE_PRICE_COUNT" => "N",
    "SHOW_PRICE_COUNT" => "1",
    "PRICE_VAT_INCLUDE" => "Y",
    "PRODUCT_PROPERTIES" => array(),
    "USE_PRODUCT_QUANTITY" => "Y",
    "CACHE_TYPE" => "A",
    "CACHE_TIME" => "180",
    "CACHE_GROUPS" => "Y",
    "HIDE_NOT_AVAILABLE" => "N",
    "CONVERT_CURRENCY" => "N",
    "OFFERS_CART_PROPERTIES" => array("ARTNUMBER", "COLOR_REF", "SIZES_SHOES", "SIZES_CLOTHES")
  )
);?>
<?$APPLICATION->IncludeComponent("bitrix:sale.bestsellers", ".default", array(
    "HIDE_NOT_AVAILABLE" => "N",
    "SHOW_DISCOUNT_PERCENT" => "Y",
    "PRODUCT_SUBSCRIPTION" => "Y",
    "SHOW_NAME" => "Y",
    "SHOW_IMAGE" => "Y",
    "MESS_BTN_BUY" => "Купить",
    "MESS_BTN_DETAIL" => "Подробнее",
    "MESS_NOT_AVAILABLE" => "Нет в наличии",
    "MESS_BTN_SUBSCRIBE" => "Подписаться",
    "PAGE_ELEMENT_COUNT" => "4",
    "LINE_ELEMENT_COUNT" => "4",
    "TEMPLATE_THEME" => "site",
    "DETAIL_URL" => "",
    "AJAX_MODE" => "N",
    "AJAX_OPTION_JUMP" => "N",
    "AJAX_OPTION_STYLE" => "Y",
    "AJAX_OPTION_HISTORY" => "N",
    "CACHE_TYPE" => "A",
    "CACHE_TIME" => "86400",
    "BY" => "AMOUNT",
    "PERIOD" => "30",
    "FILTER" => array(
      0 => "CANCELED",
      1 => "ALLOW_DELIVERY",
      2 => "PAYED",
      3 => "DEDUCTED",
      4 => "N",
      5 => "P",
      6 => "F",
    ),
    "DISPLAY_COMPARE" => "N",
    "SHOW_OLD_PRICE" => "N",
    "PRICE_CODE" => array(
      0 => "BASE",
    ),
    "SHOW_PRICE_COUNT" => "1",
    "PRICE_VAT_INCLUDE" => "Y",
    "CONVERT_CURRENCY" => "N",
    "BASKET_URL" => "/personal/cart/",
    "ACTION_VARIABLE" => "action",
    "PRODUCT_ID_VARIABLE" => "id",
    "PRODUCT_QUANTITY_VARIABLE" => "quantity",
    "ADD_PROPERTIES_TO_BASKET" => "Y",
    "PRODUCT_PROPS_VARIABLE" => "prop",
    "PARTIAL_PRODUCT_PROPERTIES" => "N",
    "USE_PRODUCT_QUANTITY" => "N",
    "SHOW_PRODUCTS_2" => "Y",
    "CART_PROPERTIES_2" => array(
      0 => "BRAND_REF",
      1 => "NEWPRODUCT",
      2 => "SALELEADER",
      3 => "",
    ),
    "ADDITIONAL_PICT_PROP_2" => "MORE_PHOTO",
    "LABEL_PROP_2" => "SALELEADER",
    "CART_PROPERTIES_3" => array(
      0 => "COLOR_REF",
      1 => "SIZES_SHOES",
      2 => "SIZES_CLOTHES",
      3 => "",
    ),
    "ADDITIONAL_PICT_PROP_3" => "MORE_PHOTO",
    "OFFER_TREE_PROPS_3" => array(
      0 => "COLOR_REF",
      1 => "SIZES_SHOES",
      2 => "SIZES_CLOTHES",
    ),
    "AJAX_OPTION_ADDITIONAL" => ""
  )
);?>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>

Still all this heresy shamelessly torments a DB.
And if you look at the core, then there, despite all sorts of invented things like namespaces, traits, etc. still global variables and a bunch of constants. There are classes whose methods wrap superglobal arrays for no clear reason. In general, see for yourself, this is purely my opinion and I am not going to work with Bitrix, which is what I wish you

I
index0h, 2015-10-22
@index0h

Here, the judgments of Mr. Escobar from the Bredor group come in handy .
CMS, as a rule, are tailored for specific use-cases. MODx, for example, is good for business cards, Bitrix is ​​probably also good for something.
Any system, even not based on a CMS, can have the correct structure, code, or vice versa, but it depends on the requirements for the system being developed .

K
kompi, 2015-10-22
@kompi

There is even nothing to compare here, Bitrix is ​​full of legacy code from the time of php 4.x.

T
Timofey, 2015-10-22
@mr_T

If you want to do programming, and not fight with the code, then you need to take the framework. Any CMS is a solution that is primarily focused on content management (hence, in fact, the name), and programming is secondary.

A
Andrew, 2015-10-23
@ntzch

I remember Bitrix as a nightmare after I switched to Drupal. This CMS is very popular in the west. With programming skills in Drupal API, it is not difficult to understand and you can expand the site as you like on it.

N
Nikolai Pinevich, 2016-05-18
@Afres

Definite answer Modx. There are many articles devoted to this, here are some of them One , Two

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question