CMS 11 VS CMS 12
Outline
- CMS 11: ASP.NET 4, Windows/IIS, WebForms + MVC
- CMS 12: ASP.NET Core, cross-platform, Razor Views only, modern PaaS-ready
- Focus: Architecture, rendering, DI, configuration, authentication, headless support
Introduction
Understanding the evolution from CMS 11 to CMS 12 is essential for developers. CMS 12 introduces a significant architectural shift by moving to ASP.NET Core, offering modern performance, cloud readiness, and simplified development workflows. This guide highlights key differences in architecture and rendering approaches.
1. Key Architectural Differences
The biggest shift is the framework foundation:
1.1 Framework Foundation: ASP.NET 4 vs. ASP.NET Core
- CMS 11: Built on ASP.NET 4 (.NET Framework). Windows-only, hosted on IIS, older libraries.
-
CMS 12: Built on ASP.NET Core (.NET 6+). Cross-platform, high-performance, open-source.
- Implications: Runs on Windows, Linux, macOS. Supports Docker. Streamlined development and access to latest .NET libraries.
1.2 Application Startup and Configuration
-
CMS 11: Startup via
Global.asaxandOwinStartup. Configuration inweb.config(XML). -
CMS 12: Unified
Program.cshandles startup. Configuration inappsettings.json, environment variables, and modern providers.
1.3 Dependency Injection (DI)
- CMS 11: Optional DI via third-party containers (StructureMap, Unity).
- CMS 12: Uses native ASP.NET Core DI container. Seamless registration of Optimizely services, promoting modular and testable code.
1.4 Logging and JSON Serialization
-
CMS 11: log4net or NLog; JSON via
Newtonsoft.Json. -
CMS 12:
Microsoft.Extensions.Logging; JSON viaSystem.Text.Jsonby default for better performance.
1.5 Authentication
- CMS 11: ASP.NET Identity + OWIN middleware.
- CMS 12: OpenID Connect (OIDC), commonly with Azure AD / Microsoft Entra ID, aligning with cloud security standards.
1.6 NuGet Packages and API Compatibility
- CMS 11: Packages targeting .NET Framework.
- CMS 12: Requires .NET Standard 2.0 or .NET 6+ packages. Some breaking changes due to ASP.NET Core migration; careful review needed during upgrade.
2. Key Rendering Differences
Rendering approaches evolved significantly:
2.1 View Engines and Rendering Methods
- CMS 11: ASP.NET WebForms and MVC (Razor Views).
- CMS 12: WebForms removed. Razor Views only. Streamlined rendering aligned with ASP.NET Core.
2.2 Headless Capabilities
- CMS 11: Limited headless support, more custom development required.
- CMS 12: Full headless support with comprehensive REST APIs, SDKs, and multi-channel content delivery (React, Vue, Angular, or other backends).
2.3 Block Controllers to Components
- CMS 11: Blocks rendered using MVC controllers.
- CMS 12: Shift toward View Components or simpler reusable patterns, following ASP.NET Core best practices.
3. Implications for Developers
-
Migrate Project Files: Update
.csprojto target .NET 6+ and NuGet packages. -
Refactor Startup Logic: Adapt
Global.asax/Startup.cstoProgram.csmodel. -
Update Configuration: Move from
web.configtoappsettings.json. - Address Breaking Changes: Fix API changes in ASP.NET Core and Optimizely.
- Remove WebForms: Convert existing WebForms views to Razor Views.
- Re-evaluate Integrations: Ensure third-party libraries are ASP.NET Core compatible.
Benefits include better performance, security, cross-platform deployment, and a modern development workflow.
Conclusion
Optimizely CMS 12 is a leap forward, embracing ASP.NET Core. The migration from .NET Framework changes how apps are built, configured, and deployed, offering performance, flexibility, and cloud-readiness. Developers gain modern startup patterns, configuration models, and rendering workflows for a future-proof CMS platform.
