One-page application + node.js backend (REST) ​​+ CMS - best concepts / practices

We are going to create a great social web application. We must implement 2 large modules:

  • FrontEnd - single page application (Backbone.js)
  • CMS - FrontEnd content management system (daily content, sponsors, banners, links, special offers, downloadable media, etc.)

FrontEnd will use the Node.js powered REST api, which will use DB in the cloud (PG or Mongo - not yet decided).

My question is: should CMS use the same REST api as FrontEnd? Or should we make a separate application (not Node.js neccessery) for the CMS that will "talk" to db in the cloud directly? My question arises because in the previous project we had this problem:

  • Single REST api for FrontEnd and CMS.
  • When we needed new functionality in CMS, we had to implement it in RESTapi - and then we had to restart all APP (RESTapi), which was problematic in production ...

So:

  • Implement 2 RestApis - one for FrontEnd and one for BackEnd?
  • Implement 1 RestApi for FrontEnd and implemnt CMS as a standalone application that speaks directly to the database?

How do you do this?


The goal is to implement the ultrafast FrontEnd and Big / Heavy CMS (it will be larger than FrontEnd). Therefore, we are thinking about the complete separation of the CMS module with the FrontEnd module. A possible need for communication between modules will be implemented through redis pub / sub, for example, - What do you think?

+4

Source: https://habr.com/ru/post/1528969/


All Articles