Contentstack SaaS Headless CMS UI Extension Hosting

This short blog post explains some differences between Contentstack hosting and external hosting of custom user interface extensions to its headless content management system.

As described in the following blog post, you can extend Contentstack with three types of user interfaces: custom field types (at the field level), custom widgets (at the entry level), and dashboard widgets (at the global level).

Regardless of which type of extensions you implement, when you define the extension in Contentstack, you can choose for the extension to be “Hosted by Contentstack” or whether it will use “External hosting”. In either case, the extension generates HTML and uses the Contentstack UI extension stylesheet and JavaScript SDK. There is no difference to the JavaScript SDK used to interact with Contentstack regardless of how you choose to host the UI extension.

Hosted by Contentstack

If you choose Hosted by Contentstack when you define a UI extension, then you can paste the extension code directly into the Contentstack UI and you are finished – there is nothing else for you to deploy or host. You can store a copy of the code in a source code management system for maintenance, and then overwrite the code in Contentstack if it changes. The code is static; no application server to generates HTML or JavaScript dynamically, though static JavaScript can implement dynamic features.

External Hosting

If you choose External hosting when you define a UI extension, then you need to enter the URL of your UI extension, which you must deploy to a web host. Contentstack loads the extension URL into something like an <iframe> within the larger user interface. For development and testing, you can use localhost in the URL of the UI extension. For production, use a URL that is available to all CMS users. With external hosting, you can use an application server such as ASP.NET to generate HTML, handle HTTP posts, and otherwise. This code fits more naturally into a source code management system.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: