C
C
colobot2018-03-01 13:11:41
1C-Bitrix
colobot, 2018-03-01 13:11:41

Can Bitrix be used as a headless CMS?

There are several projects on Bitrix that are long and expensive to completely transfer to another platform. But there is absolutely no strength to support the frontend inside Bitrix. I want to switch to React or Vue.
Is it possible that Bitrix only gives data to the frontend through the API, and the entire frontend would be implemented completely separately on React / Vue?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Andrey Nikolaev, 2018-03-03
@gromdron

With the release of the new d7 approach to building components (the so-called Engine\Controller), you can use any front-end and call your component's methods quite simply.
For example: you have a reviews component in the colobot space.
Accordingly, it has an action: getList (function getListAction).
In order to send a request and receive a response, you can use a construction like:

BX.ajax.runComponentAction('colobot:reviews::getList',{
  // .. параметры которые будут отправлены в метод getListAction
  // компонента reviews в пространстве имен colobot
}).then(function(){
  // .. полезные действия
});

But as colleagues have already pointed out above, it is possible, but you will have to write the API yourself (it is not yet available in BUS)

V
Vladimir Skibin, 2018-03-01
@megafax

Yes, it is possible that you will have to write the entire API layer yourself using the internal Bitrix.

D
Dmitry, 2018-03-02
@mrsoul

As already noted, this can be done, for example, through an interlayer. But you can also do without it, just connect the service parts of the prologue and epilogue, i.e. without patterns. It will turn out to fully use all the Bitrix API, and the front-end will be separate. It is difficult to answer the question in more detail, because it is worded too broadly.

S
schekinfs, 2019-08-05
@schekinfs

Refuse Bitrix. It actually becomes completely unnecessary when developing a SPA application. Take the sensible Ruby On Rails framework (there is excellent support for jsonapi). It is also very super-duper EmberJS, with such support. I don’t recommend React & Vue, there you need to invent a bunch of bicycles.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question