Skip to main content

Outline



Section 6: Migrating to CMS 12 & Commerce 14

At a glance:
  • Migration strategies: Upgrade, Refactor, Rebuild.
  • Decision factors: technical debt, customizations, business goals, budget, team expertise.
  • Upgrade is fastest, rebuild is cleanest, refactor balances cost vs modernization.

This module explores the critical decision-making process when migrating existing Optimizely solutions to CMS 12 and Commerce 14. Development teams are often faced with three primary strategies: a direct upgrade, a comprehensive refactor, or a complete rebuild. Selecting the most appropriate path is paramount for project success, impacting timelines, budgets, and long-term maintainability.


Understanding the Migration Strategies

1. Upgrade

A direct upgrade involves updating the existing solution's dependencies to target Optimizely CMS 12 and Commerce 14, primarily resolving compilation errors and adapting to breaking changes introduced by the new platform and ASP.NET Core.

  • Characteristics:
    • Minimal architectural changes.
    • Focus on dependency updates (NuGet packages).
    • Addressing breaking API changes (e.g., EPiServer.Framework to Microsoft.Extensions.DependencyInjection).
    • Adapting configuration from web.config to appsettings.json.
    • Retaining existing custom code.
  • Advantages:
    • Fastest Time to Market
    • Lower Initial Cost
    • Reduced Risk
  • Disadvantages:
    • Technical Debt Carryover
    • Limited Modernization
    • Future Maintenance Challenges
    • Potential Hidden Issues
2. Refactor

Refactoring involves systematically restructuring the existing codebase without changing its external behavior while improving architecture, code quality, and adopting ASP.NET Core and Optimizely best practices.

  • Characteristics: Includes upgrade steps, code cleanup, adopting Dependency Injection, using IOptions for configuration, improving modularity and testability, re-architecting modules.
  • Advantages: Reduced technical debt, improved performance, better developer experience, adoption of new features.
  • Disadvantages: Longer timeline, higher cost, risk of new defects.
3. Rebuild

Rebuild entails developing a new solution from scratch on CMS 12 and Commerce 14, discarding old code, and often rethinking architecture, UX, and integrations.

  • Characteristics: Fresh template, re-implement features, migrate content, adopt headless/API-first if desired.
  • Advantages: Eliminates technical debt, optimal performance, future-proof, opportunity for innovation, reduced long-term maintenance.
  • Disadvantages: Longest timeline, highest cost, higher risk, content migration complexity.


Decision Criteria

Choosing between upgrade, refactor, or rebuild requires careful assessment of:

Key Factors
  • Current Solution's Health: High technical debt → Rebuild/Refactor; Low debt → Upgrade.
  • Customizations/Integrations: Complex modifications → Rebuild; Standard → Upgrade/Refactor.
  • Business Goals: Innovation → Rebuild; Incremental improvements → Refactor/Upgrade; Speed → Upgrade.
  • Budget & Timeline: Limited → Upgrade; Moderate → Refactor; Generous → Rebuild.
  • Team Expertise: Limited ASP.NET Core knowledge → Upgrade; Strong expertise → Refactor/Rebuild.


Conclusion

Migration strategy should be chosen early, balancing technical debt, business objectives, resources, and future goals. A thoughtful assessment ensures minimized risk, optimized investment, and positions the Optimizely DXP for long-term success.