Dear Couchers,
Context: This is a branch off of the CouchCMS v2.3 topic, in which there was discussion on ways of using Couch alongside a static site builder such as Mobirise. Of course, Couch can already retrofit itself into any statically generated site. However, some designers may prefer building only with the frontend builder of choice (Mobirise, Blocs, or even Vue/React), and may not prefer retrofitting Couch, as this would be a one-way street; any subsequent visual updates they'd like to make via the site builder app would require overwriting and another round of Couch retrofitting
To solve this problem, perhaps, in addition to our traditional manner of retrofitting Couch, there is a way of using existing Couch concepts to let it serve as a headless CMS, not necessarily concerned with frontend view -- thus making itself compatible with anything capable of making HTTP requests, including Vue/React, anything that uses cURL, or any site builder that is capable of making/managing HTTP requests and responses.
- - - - - - -
Link to prior thread: viewtopic.php?f=5&t=13148&start=10#p37736
@KK, almost! But instead of Mobirise fetching the content and then exporting the resulting content statically, it would (1) fetch the content from Couch, (2) preview those results in the app, and then (3) export whatever frontend javascript is required to render what Mobirise was previewing in the app. Put another way, the content itself would not be rendered on a server (as with Couch) or even exported to html (as with Mobirise) but rather fetched and rendered in the browser itself by the javascript written by the code builder app (Mobirise in this case).
This exchange would be similar to how a frontend Vue or React application is meant to be independent of its CMS of choice (if it even chooses to pair with one). They reach out to any HTTP based API and then render that dynamic content in the browser. Similar to the relationship between HTML and CSS, this separates the concerns of (1) the frontend design (static html, css, k_is_page, etc) and (2) the content management (Couch admin panel, Contentful, headless WordPress, etc).
Many site builders (not just Mobirise) would benefit from an ability to write/manage GET requests to any headless CMS that is capable of delivering raw JSON. The site builder itself would simply need to allow its user to craft GET requests and subsequently be able to render those results in the app and export whatever javascript is needed to render those results in the browser.
This would allow any site builder designer to design in their app of choice, hook it up to Couch via API requests, export their project, and still be able to come back to their site builder app to re-design anything, export it again, and not worry about overwriting any Couch code since there was no retrofitting Couch in the first place.
In summary, I think static site builders of any sort (Mobirise, Vue/React, etc) would greatly benefit from a Couch backend that is capable of elegantly delivering its contents in the form of JSON. Couch developers already love building sites with Couch. Being able to share the contents of a Couch site in raw JSON opens many doors for Couch developers to work in tandem with designers who use site builders or develop with Vue/React. Of course, the site builders need to be capable of designing GET requests and rendering their responses, which is not Couch's responsibility. Maybe Mobirise will develop an extension for this, and maybe there are other site builders that have this broad capability. Vue and React are already designed for this concept.
- - - - - - -
In fact, I've begun dipping my toes in this already, letting go of k_is_page and k_is_home in many cases. I've been working with Vue lately to build frontend markup based on parsed responses it gets from GET requests to custom routes that deliver JSON via <cms:content_editable 'application/json' />.
Using this approach has been nice and is keeping my projects tidy. It's pretty straight forward with GET and POST requests that are meant for public consumption and input. The only tricky part so far is handling richtext output and certain CRUD operations where security would be of concern. I usually stick to CRUD via the Couch admin panel, but having access to this via HTTP requests (from anywhere outside the couch admin panel) would be door-opening.
I may post some examples of where I've found this technique useful, and if anyone else uses this technique or has thoughts, I'd love to see them. Especially concerning how a headless CouchCMS approach might work alongside mobile app developers who may want to interface with a Couch project in some fashion (may just public consumption/input, but maybe also authenticated requests via secret key/token in lieu of cookies).
All in all, I think understanding this concept would open a lot of doors for Couch developers to work alongside non-Couch developers, and there seems to be a lot of site builder and Vue/React folks out there who may benefit from what Couch has to offer in the content management and ease-of-backend-development department.
I hope this sparks some interesting discussions and solutions
Context: This is a branch off of the CouchCMS v2.3 topic, in which there was discussion on ways of using Couch alongside a static site builder such as Mobirise. Of course, Couch can already retrofit itself into any statically generated site. However, some designers may prefer building only with the frontend builder of choice (Mobirise, Blocs, or even Vue/React), and may not prefer retrofitting Couch, as this would be a one-way street; any subsequent visual updates they'd like to make via the site builder app would require overwriting and another round of Couch retrofitting

To solve this problem, perhaps, in addition to our traditional manner of retrofitting Couch, there is a way of using existing Couch concepts to let it serve as a headless CMS, not necessarily concerned with frontend view -- thus making itself compatible with anything capable of making HTTP requests, including Vue/React, anything that uses cURL, or any site builder that is capable of making/managing HTTP requests and responses.
- - - - - - -
Link to prior thread: viewtopic.php?f=5&t=13148&start=10#p37736
@KK, almost! But instead of Mobirise fetching the content and then exporting the resulting content statically, it would (1) fetch the content from Couch, (2) preview those results in the app, and then (3) export whatever frontend javascript is required to render what Mobirise was previewing in the app. Put another way, the content itself would not be rendered on a server (as with Couch) or even exported to html (as with Mobirise) but rather fetched and rendered in the browser itself by the javascript written by the code builder app (Mobirise in this case).
This exchange would be similar to how a frontend Vue or React application is meant to be independent of its CMS of choice (if it even chooses to pair with one). They reach out to any HTTP based API and then render that dynamic content in the browser. Similar to the relationship between HTML and CSS, this separates the concerns of (1) the frontend design (static html, css, k_is_page, etc) and (2) the content management (Couch admin panel, Contentful, headless WordPress, etc).
Many site builders (not just Mobirise) would benefit from an ability to write/manage GET requests to any headless CMS that is capable of delivering raw JSON. The site builder itself would simply need to allow its user to craft GET requests and subsequently be able to render those results in the app and export whatever javascript is needed to render those results in the browser.
This would allow any site builder designer to design in their app of choice, hook it up to Couch via API requests, export their project, and still be able to come back to their site builder app to re-design anything, export it again, and not worry about overwriting any Couch code since there was no retrofitting Couch in the first place.
In summary, I think static site builders of any sort (Mobirise, Vue/React, etc) would greatly benefit from a Couch backend that is capable of elegantly delivering its contents in the form of JSON. Couch developers already love building sites with Couch. Being able to share the contents of a Couch site in raw JSON opens many doors for Couch developers to work in tandem with designers who use site builders or develop with Vue/React. Of course, the site builders need to be capable of designing GET requests and rendering their responses, which is not Couch's responsibility. Maybe Mobirise will develop an extension for this, and maybe there are other site builders that have this broad capability. Vue and React are already designed for this concept.
- - - - - - -
In fact, I've begun dipping my toes in this already, letting go of k_is_page and k_is_home in many cases. I've been working with Vue lately to build frontend markup based on parsed responses it gets from GET requests to custom routes that deliver JSON via <cms:content_editable 'application/json' />.
Using this approach has been nice and is keeping my projects tidy. It's pretty straight forward with GET and POST requests that are meant for public consumption and input. The only tricky part so far is handling richtext output and certain CRUD operations where security would be of concern. I usually stick to CRUD via the Couch admin panel, but having access to this via HTTP requests (from anywhere outside the couch admin panel) would be door-opening.
I may post some examples of where I've found this technique useful, and if anyone else uses this technique or has thoughts, I'd love to see them. Especially concerning how a headless CouchCMS approach might work alongside mobile app developers who may want to interface with a Couch project in some fashion (may just public consumption/input, but maybe also authenticated requests via secret key/token in lieu of cookies).
All in all, I think understanding this concept would open a lot of doors for Couch developers to work alongside non-Couch developers, and there seems to be a lot of site builder and Vue/React folks out there who may benefit from what Couch has to offer in the content management and ease-of-backend-development department.
I hope this sparks some interesting discussions and solutions
