Skip to content

v4.0.0

Choose a tag to compare

@JeremyCaney JeremyCaney released this 29 Dec 01:00
· 2148 commits to master since this release
62cc797

The 4.0.0 release represents a significant update to the OnTopic library, both in terms of API as well as functionality. It contains major features, refactorings, and updates introduced over the last year.

Highlights

  • Migrated library from .NET Framework 4.7 to .NET Standard 2.x
  • Introduced entirely new ASP.NET Core 3.1 presentation layer (OnTopic.AspNetCore.Mvc)
  • Introduced Reverse Topic Mapping Service, for mapping from data transfer objects back to topics
  • Renamed all namespaces from Ignia.Topics* to OnTopic* (e.g., Ignia.Topics.Data.Sql is now OnTopic.Data.Sql)

New Features

Library

  • Introduced Reverse Topic Mapping Service, for mapping from data transfer objects back to topics
  • Introduced Hierarchical Topic Mapping Service for mapping constrained hierarchies (e.g. menus)
  • Introduced support for mapping double, Uri, as well as nullable types (e.g. Int?, DateTime?)
  • Introduced new AttributeTypeDescriptor support for configuring attributes via topic attributes, instead of DefaultConfiguration
  • Fully commented the OnTopic.ViewModels library to provide e.g. Visual Studio IntelliSense support

Frontend

  • Introduced entirely new ASP.NET Core 3.1 presentation layer (OnTopic.AspNetCore.Mvc)
  • Introduced support for view components in ASP.NET Core 3.x implementation (e.g., MenuViewComponentBase<T>)
  • Introduced new extensions to simplify Startup configuration (e.g., IMvcBuilder.AddTopicSupport(), IEndpointRouteBuilder.MapTopicRoute())
  • Expanded conventions for view locations to include areas, nested shared folders (e.g., /view/ContentType/Shared/)
  • Moved topic validation logic for controllers to a new [ValidateTopic] attribute, allowing it to be applied on a per-action basis
  • Moved all sitemap logic into the SitemapController, so it no longer requires a (complicated) view

SQL

  • Introduced locks and transactions to DeleteTopic and MoveTopic stored procedures
  • Introduced new refactorlog file to simplify updating the SQL Schema
  • Introduced new VersionHistoryIndex for centralizing the logic of pulling the last five version numbers for each topic
  • Introduced new ValidateHierarchy stored procedure for detecting potential problems with the nested set model

Code Changes

Library

  • Migrated library from .NET Framework 4.7 to .NET Standard 2.x
  • Replaced legacy Code Contracts (RIP) with OnTopic.Internal.Diagnostics.Contract class
  • Migrated to C# 8.0's new nullable annotation context
  • Migrated to Visual Studio 2019's support for <inheritDoc /> on XMLDOCs
  • Migrated to Visual Studio 2017's new project format
  • Adopted Visual Studio's code analysis conventions such as expression bodied members
  • Consistently applied e.g. CultureInfo and StringComparison to avoid inconsistencies with localization
  • Ensured all dependencies are marked readonly and uninitialized (as they are set in the constructor)
  • Established new DummyTopicMappingService and DummyTopicRepository as placeholders when no data is required
  • Fully adopted semantic versioning via GitFlow and GitVersion
  • Began using git merge --no-ff so we can better track merges independent from feature commits
  • Renamed FakeTopicRepository to StubTopicRepository, and placed it in the new OnTopic.TestDoubles package, allowing reuse between projects

Frontend

  • Moved legacy OnTopic.Web project to new OnTopic-WebForms repository
  • Moved legacy OnTopic.Web.MVC project to new OnTopic-MVC repository
  • Introduced barebones Host projects for testing OnTopic.Web, OnTopic.Web.Mvc, and OnTopic.AspNetCore.Mvc

SQL

  • Migrated to tab spaces of 8 characters—now enforced via a .editorconfig—to simplify alignment
  • Standardized the nomenclature around relationship types as relationshipKey (was previously scope, key, or namespace)

Breaking Changes

Library

  • Renamed all packages from Ignia.Topics* to OnTopic* (e.g., Ignia.Topics.Data.Sql is now OnTopic.Data.Sql)
  • Renamed all namespaces from Ignia.Topics* to OnTopic* (e.g., Ignia.Topics.Data.Sql is now OnTopic.Data.Sql)
  • Renamed OnTopic.ViewModels namespace to OnTopic.Models to account for new binding models (e.g., ITopicBindingModel)
  • Moved topic mapping attributes into new OnTopic.Mapping.Annotations namespace
  • Moved classes related to topic attributes (namely, AttributeValue and [AttributeSetter]) into new OnTopic.Attributes namespace
  • Moved strongly type AttributeValueCollection methods (e.g., GetBoolean(), SetBoolean()) into new extensions class in OnTopic.Attributes namespace
  • Moved infrastructure related classes into new OnTopic.Internal namespace (e.g., TypeMemberInfoCollection, PropertyConfiguration)
  • Moved Oroborous Configuration related classes into new OnTopic.Metadata namesace (e.g., ContentTypeDescriptor, AttributeDescriptor)

Frontend

  • Dependencies for some services and controllers may have been updated to reflect new features
  • The new ASP.NET Core 3.1 presentation layer no longer includes an ErrorController or FallbackController

SQL

  • Removed the topics_ prefix from all objects in the SQL Schema (OnTopic.Data.Sql.Database)
  • Migrated the GetTopics, CreateTopic, and UpdateTopic stored procedures to use new user-defined table valued types (AttributeValues, TopicList)
  • Removed unused parameters from GetTopics, CreateTopic, UpdateTopic (e.g., @IsDraft)
  • Renamed PersistRelations to UpdateRelationships