The OnTopic library is a .NET Core-based content management system (CMS) designed around structured schemas ("Content Types") and optimized to simplify team-based workflows with distinct roles for content owners, backend developers, and graphic producers.
The OnTopic library acknowledges that the roles of developers, designers, and content owners are usually compartmentalized and, thus, optimizes for the needs of each.
- Content owners have access to an editor that focuses exclusively on exposing structured data; this includes support for custom content types (e.g., "Job Posting", "Blog Post", &c.)
- Backend developers have access to data repositories, services, and a rich entity model in C# for consuming the structured data and implementing any business logic via code.
- Frontend developers have access to light-weight views based on purpose-built view models, thus allowing them to focus exclusively on presentation concerns, without any platform-specific knowledge.
This is contrasted to most traditional CMSs, which attempt to coordinate all of these via an editor by exposing design responsibilities (via themes, templates, and layouts) as well as development responsibilities (via plugins or components). This works well for a small project without distinct design or development resources, but introduces a lot of complexity for more mature teams with well-established roles.
In addition, OnTopic is optimized for multi-client/multi-device scenarios since the content editor focuses exclusively on structured data. This allows entirely distinct presentation layers to be established without the CMS attempting to influence or determing design decisions via e.g. per-page layout. For instance, the same content can be accessed by an iOS app, a website, and even a web-based API for third-party consumption. By contrast, most CMSs are designed for one client only: a website (which may be mobile-friendly via responsive templates.)
Fundamentally, OnTopic is based on structured schemas ("Content Types") which can be modified via the editor itself. This allows new data structures to be introduced without needing to modify the database or creating extensive plugins. So, for example, if a site includes job postings, it might create a JobPosting
content type that describes the structure of a job posting, such as job title, job description, job requirements, &c. By contrast, some CMSs—such as WordPress—try to fit all items into a single data model—such as a blog post—or require extensive customizations of database objects and intermediate queries in order to extend the data model. OnTopic is designed with extensibility in mind, so updates to the data model are comparatively trivial to implement.
OnTopic.All
The metapackage includes a reference to all of the core libraries discussed below under Domain Layer, Data Access Layer, and Presentation Layer. It is recommended that most implementations rely on this, instead of including package references for individual libraries.
OnTopic.Topics
: Core domain model including theTopic
entity and service abstractions such asITopicRepository
.
OnTopic.Data.Sql
:ITopicRepository
implementation for storing and retrievingTopic
entities in a Microsoft SQL Server database.OnTopic.Data.Sql.Database
: Microsoft SQL Server database schema, including tables, views, types, functions, and stored procedures needed to support theOnTopic.Data.Sql
library.
OnTopic.Data.Caching
:ITopicRepository
decorator that caches data accessed in memory for fast subsequent retrieval.
Note: Additional data access layers can be created by implementing the
ITopicRepository
interface.
OnTopic.AspNetCore.Mvc
: ASP.NET Core implementation, including a defaultTopicController
, allowing templates to be created using*.cshtml
pages and view components. Supports both ASP.NET Core 3.x and ASP.NET Core 5.x.OnTopic.ViewModels
: Standard view models using C# 9 records for exposing factory-default schemas of shared content types. These can be extended, overwritten, or ignored entirely by the presentation layer implementation; they are provided for convenience.
We maintain 99+% coverage on all core libraries via a combination of unit tests (for e.g. OnTopic
) and integration tests (for e.g. OnTopic.AspNetCore.Mvc
).
OnTopic.Tests
: xUnit.net Tests, broken down by target class.OnTopic.AspNetCore.Mvc.Tests
: xUnit.net Tests for theOnTopic.AspNetCore.Mvc
implementation.OnTopic.AspNetCore.Mvc.IntegrationTests
: xUnit.net integration tests for theOnTopic.AspNetCore.Mvc
implementation.OnTopic.Data.Sql.Database.Tests
: SQL Server Data Tools (SSDT) unit tests for evaluating the functionality of stored procedures and functions against a local SQL Server database.
Note: The one gap in our testing is the
OnTopic.Data.Sql
library, which doesn't currently have integration tests. That said, the underlying stored procedures it calls into are covered by the SSDT tests. Additionally, the extension methods it relies on, which contain most of the business logic, are well covered.
OnTopic.Editor.AspNetCore
: ASP.NET Core implementation of the editor interface. Supports both ASP.NET Core 3.x and ASP.NET Core 5.x.OnTopic.Data.Transfer
: .NET Standard library for serializing and deserializingTopic
entities into a data interchange format which can be used to import or export topic graphs via JSON.
OnTopic is owned and maintained by Ignia.