Orchard Core is an open-source, modular framework built with ASP.NET Core. Orchard Core Content Management System (CMS) is built on top of the Orchard modular framework. It’s designed to provide developers with a flexible and customizable platform for building multitenant SaaS-based web applications.
One of the unique features of Orchard Core is that you can use it as a headless framework for building modular SaaS-based applications. You can also use it as a multitenant CMS framework for content management.
In this article, we’ll explore how to use Orchard Core as a headless CMS and why it’s a good choice for developers.
Different Application Building Strategies
Orchard Core supports all major website building strategies:
- Full CMS (Like ORM) – Using Orchard Core as a full CMS entails little to no custom development. The website employs a theme and templates to deliver content.
- Decoupled CMS – Under a decoupled CMS, the website is blank to begin with, except for the content management backend. You develop the templates you require using MVC actions or Razor Pages and can access your website content via content services.
- Headless CMS – Under a headless CMS, the website only manages the content, and you create a separate application that fetches the managed content using GraphQL or REST APIs.
What is a Headless CMS?
A headless CMS is a content management system that provides content via an API rather than rendering it to a website or application. This allows developers to separate the content from the presentation layer, providing greater flexibility and control over how content is displayed.
With a top headless CMS, developers can access content programmatically and deliver it to any channel, including web, mobile, or IoT devices.
Using Orchard Core as a Headless CMS
Orchard Core was designed to be a modular and extensible platform. As such, it provides a flexible framework for building headless CMS applications. Its modular architecture allows developers to easily add or remove modules as required, making it an excellent choice for building headless CMS solutions.
Orchard Core has a feature called Data Migrations. You can create content types, content parts, and fields using this feature. You can also use it for creating custom database tables as well.
Moreover, Orchard Core offers a highly adaptable GraphQL API for headless CMS. This allows any authorized external application, such as single-page applications (SPAs) or static site generators, to reuse your content.
To use Orchard Core as a headless CMS, developers can set up a back-office CMS and create content types and content items using the built-in content management features like data migration as per their needs. Content types define the structure of the content, while content items are actual content pages under that content type. Developers can then use the Orchard Core GraphQL API to retrieve content items programmatically and deliver them to any channel.
Benefits of Using Orchard Core as a Headless CMS
- Scalability: Orchard Core offers the ability to host multiple websites within a single deployment, allowing for unlimited website hosting. With the use of a typical cloud machine, thousands of sites can be hosted simultaneously, each with separate databases, content, themes, and user isolation.
- Portable: The development and deployment of the Orchard Core framework are now possible on Windows, Linux, and macOS. Docker images are also available for easy use.
- Document database abstraction: While still requiring a relational database, Orchard Core CMS now utilizes a document abstraction called YesSql. This provides a document database API for storing and querying documents, improving CMS performance significantly. It is compatible with SQL Server, MySQL, PostgreSQL, and SQLite.
- NuGet Packages: Orchard Core allows you to share modules and themes as NuGet packages. The process for developing a new website with Orchard Core is as straightforward as referencing a single meta package from the NuGet gallery. This approach also simplifies the updating process, as it only requires changing the version number of the package to migrate to a newer version.
- Live preview: During content editing, Orchard Core allows users to see a real-time preview of how the content will appear on the website before saving. This feature also extends to templates, enabling users to view the impact of template changes as they type.
- Liquid templates support: Editors can safely modify the HTML templates with the Liquid template language.
- Flexibility: Utilizing Orchard Core as a headless CMS empowers developers to deliver content to various channels, including web, mobile, and IoT devices
- Open-source: Orchard Core is an open-source framework, which means developers can use it without any licensing fees.
- Extensible: Orchard Core is an extensible framework, allowing developers to customize and extend it to meet their specific needs.
Orchard Core is a powerful and flexible open-source CMS framework that users can also use as a headless CMS. Its modular architecture, extensibility, and ASP.NET Core foundation make it an excellent choice for developers looking to build custom headless CMS solutions. One of its most significant benefits is that it enables you to deliver content to any channel, including web, mobile, or IoT devices, giving you greater flexibility and control over how content is displayed.