Answer the question
In order to leave comments, you need to log in
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
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(){
// .. полезные действия
});
Yes, it is possible that you will have to write the entire API layer yourself using the internal Bitrix.
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.
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 questionAsk a Question
731 491 924 answers to any question