You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did an initial review of the documentation to account for the 4.0.0 release. Most importantly, updated the references from `Ignia.Topics` to `OnTopic`, as well as the references to `OnTopic.Web` and `OnTopic.Web.Mvc` to point to their new external repositories. In addition, updated the language as appropriate while reviewing the documentation.
Copy file name to clipboardExpand all lines: OnTopic.AspNetCore.Mvc/README.md
+16-17Lines changed: 16 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
-
The `Ignia.Topics.AspNetCore.Mvc` assembly provides a default implementation for utilizing OnTopic with the ASP.NET Core 3.x Framework.
2
1
# OnTopic for ASP.NET Core 3.x
2
+
The `OnTopic.AspNetCore.Mvc` assembly provides a default implementation for utilizing OnTopic with the ASP.NET Core 3.x Framework. It is the recommended client for working with OnTopic.
3
3
4
4
[](https://igniasoftware.visualstudio.com/OnTopic/_packaging?_a=package&feed=46d5f49c-5e1e-47bb-8b14-43be6c719ba8&package=4db5e20c-69c6-4134-823a-c3de06d1176e&preferRelease=true)
@@ -19,13 +19,13 @@ The `Ignia.Topics.AspNetCore.Mvc` assembly provides a default implementation for
19
19
20
20
## Components
21
21
There are five key components at the heart of the ASP.NET Core implementation.
22
-
-**`TopicController`**: This is a default controller instance that can be used for _any_ topic path. It will automatically validate that the `Topic` exists, that it is not disabled (`IsDisabled`), and will honor any redirects (e.g., if the `Url` attribute is filled out). Otherwise, it will return a `TopicViewResult` based on a view model, view name, and content type.
23
-
-**`TopicViewLocationExpander`**: Assists the out-of-the-box Razor view engine in locating views associated with OnTopic, e.g. by looking in `~/Views/ContentTypes/ContentType.cshtml`, or `~/Views/ContentType/View.cshtml. See [View Locations](#view-locations) below.
22
+
-**`TopicController`**: This is a default controller instance that can be used for _any_ topic path. It will automatically validate that the `Topic` exists, that it is not disabled (`!IsDisabled`), and will honor any redirects (e.g., if the `Url` attribute is filled out). Otherwise, it will return a `TopicViewResult` based on a view model, view name, and content type.
23
+
-**`TopicViewLocationExpander`**: Assists the out-of-the-box Razor view engine in locating views associated with OnTopic, e.g. by looking in `~/Views/ContentTypes/ContentType.cshtml`, or `~/Views/ContentType/View.cshtml`. See [View Locations](#view-locations) below.
24
24
-**`TopicViewResultExecutor`**: When the `TopicController` returns a `TopicViewResult`, the `TopicViewResultExecutor` takes over and attempts to identify the correct view based on the `accept` headers, `view` query string parameter, topic's default `View` attribute and, finally, the topic's `ContentType` attribute. See [View Matching](#view-matching) below.
25
-
-**`ServiceCollectionExtensions`**: A set of extensions to be used in an ASP.NET Core website's `Startup` class that automatically handle registering services, controllers, and other extensions from `Ignia.Topics.AspNetCore.Mvc`.
26
-
-**`ITopicRepositoryExtensions`**: A set of extensions that allows loading topics based on an ASP.NET Core `RouteData` collection, including `Ignia.Topics` route variables, such as `path` and `contenttype`.
25
+
-**`ServiceCollectionExtensions`**: A set of extensions to be used in an ASP.NET Core website's `Startup` class that automatically handle registering services, controllers, and other extensions from `OnTopic.AspNetCore.Mvc`.
26
+
-**`ITopicRepositoryExtensions`**: A set of extensions that allows loading topics based on an ASP.NET Core `RouteData` collection, including `OnTopic` route variables, such as `path` and `contenttype`.
27
27
28
-
> **Note:** In [`Ignia.Topics.Web.Mvc`](../Ignia.Topics.Web.Mvc/), the `TopicViewEngine` took on the responsibilities now handled by the `TopicViewLocationExpander`, the `TopicViewResult`took on responsibilities now handled by the `TopicViewResultExecutor`, and the `MvcTopicRoutingService`took on responsibilities now handled by the`ITopicRepositoryExtensions`.
28
+
> **Note:** In [`OnTopic.Web.Mvc`](https://github.com/OnTopic/OnTopic-MVC/), the `TopicViewEngine` took on the responsibilities now handled by the `TopicViewLocationExpander`, `TopicViewResult` responsibilities for `TopicViewResultExecutor`, and the `MvcTopicRoutingService` responsibilities for`ITopicRepositoryExtensions`.
29
29
30
30
## Controllers and View Components
31
31
There are six main controllers and view components that ship with the ASP.NET Core implementation. In addition to the core **`TopicController`**, these include the following ancillary classes:
@@ -97,18 +97,17 @@ Installation can be performed by providing a `<PackageReference /`> to the `OnTo
97
97
98
98
### Application
99
99
In the `Startup` class, OnTopic's ASP.NET Core support can be registered by calling the `AddTopicSupport()` extension method:
> *Note:* This will register the `TopicViewLocationExpander`, `TopicViewResultExecutor`, as well as all [Controllers](#controllers) that ship with `Ignia.Topics.AspNetCore.Mvc`.
107
+
> *Note:* This will register the `TopicViewLocationExpander`, `TopicViewResultExecutor`, as well as all [Controllers](#controllers) that ship with `OnTopic.AspNetCore.Mvc`.
109
108
110
109
In addition, within the same `ConfigureServices()` method, you will need to establish a class that implements `IControllerActivator` and `IViewComponentActivator`, and will represent the site's _Composition Root_ for dependency injection. This will typically look like:
> *Note:* Because OnTopic relies on wildcard pathnames, a new route should be configured for every root namespace (e.g., `/Web`). While it's possible to configure OnTopic to evaluate _all_ paths, this makes it difficult to delegate control to other controllers and handlers, when necessary. As a result, it is recommended that each root container be registered individually.
134
+
>*Note:*BecauseOnTopicreliesonwildcardpathnames, anewrouteshouldbeconfiguredforeveryrootnamespace (e.g., `/Web`). Whileit's possible to configure OnTopic to evaluate _all_ paths, this makes it difficult to delegate control to other controllers and handlers, when necessary. As a result, it is recommended that each root container be registered individually.
For a complete reference template, including the ancillary controllers, view components, and a more maintainable structure, see the [`OrganizationNameActivator.cs`](https://gist.github.com/JeremyCaney/00c04b1b9f40d9743793cd45dfaaa606) Gist.
151
+
Foracompletereferencetemplate, includingtheancillarycontrollers, viewcomponents, andamoremaintainablestructure, seethe [`OrganizationNameActivator.cs`](https://gist.github.com/JeremyCaney/00c04b1b9f40d9743793cd45dfaaa606) Gist. Optionally, you may use a dependency injection container.
153
152
154
-
> *Note:* The default `TopicController` will automatically identify the current topic (based on the `RouteData`), map the current topic to a corresponding view model (based on [the `TopicMappingService` conventions](../Ignia.Topics/Mapping/)), and then return a corresponding view (based on the [view conventions](#view-conventions)). For most applications, this is enough. If custom mapping rules or additional presentation logic are needed, however, implementors can subclass `TopicController`.
Copy file name to clipboardExpand all lines: OnTopic.Data.Caching/README.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,12 @@
1
-
The `CachedTopicRepository` provides an in-memory wrapper around an `ITopicRepository` implementation. When topics are requested, they are pulled from the cache, if they exist; otherwise, they are pulled from the underlying `ITopicRepository` implementation, and then cached. Similarly, when topics are e.g. saved, the updated versions are persisted to the underlying `ITopicRepository`, and then updated in the cache.
2
1
# OnTopic Cached Repository
2
+
The `CachedTopicRepository` provides an in-memory wrapper around an `ITopicRepository` implementation.
3
3
4
4
[](https://igniasoftware.visualstudio.com/OnTopic/_packaging?_a=package&feed=46d5f49c-5e1e-47bb-8b14-43be6c719ba8&package=3dfb3a0a-c049-407d-959e-546f714dcd0f&preferRelease=true)
When topics are requested, they are pulled from the cache, if they exist; otherwise, they are pulled from the underlying `ITopicRepository` implementation, and then cached. Similarly, when topics are e.g. saved, the updated versions are persisted to the underlying `ITopicRepository`, and then updated in the cache.
9
+
7
10
## Installation
8
11
Installation can be performed by providing a `<PackageReference /`> to the `OnTopic.Data.Caching`**NuGet** package.
Copy file name to clipboardExpand all lines: OnTopic.Data.Sql.Database/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# SQL Schema
2
-
The `Ignia.Topics.Data.Sql.Database` provides a default schema for supporting the [`SqlTopicRepository`](../Ignia.Topics.Data.Sql).
2
+
The `OnTopic.Data.Sql.Database` provides a default schema for supporting the [`SqlTopicRepository`](../OnTopic.Data.Sql).
3
3
4
4
> *Note:* Not all SQL objects are documented here. Missing objects are primarily intended for infrastructure support and used exclusively by stored procedures or administrators.
Copy file name to clipboardExpand all lines: OnTopic.Data.Sql/README.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,10 @@
1
1
# OnTopic SQL Repository
2
2
The `SqlTopicRepository` provides an implementation of the `ITopicRepository` interface for use with Microsoft SQL Server. All requests are sent to the database, with no effort to cache data.
3
3
4
-
> *Note:* The schema for the Microsoft SQL Server implementation can be found at [`Ignia.Topics.Data.Sql.Database`](../Ignia.Topics.Data.Sql.Database). It is not currently distributed as part of the `SqlTopicRepository` and must be deployed separately.
5
-
6
4
[](https://igniasoftware.visualstudio.com/OnTopic/_packaging?_a=package&feed=46d5f49c-5e1e-47bb-8b14-43be6c719ba8&package=15c8a666-efa5-4b23-b08b-1de907478d2d&preferRelease=true)
> *Note:* The schema for the Microsoft SQL Server implementation can be found at [`OnTopic.Data.Sql.Database`](../OnTopic.Data.Sql.Database/README.md). It is not currently distributed as part of the `SqlTopicRepository` and must be deployed separately.
9
8
10
9
## Installation
11
10
Installation can be performed by providing a `<PackageReference /`> to the `OnTopic.Data.Sql`**NuGet** package.
@@ -25,4 +24,4 @@ Installation can be performed by providing a `<PackageReference /`> to the `OnTo
> *Note:* In real-world applications, it is recommended that the `SqlTopicRepository` be wrapped by the [`CachedTopicRepository`](../Ignia.Topics.Data.Caching), which provides an in-memory cache of any `ITopicRepository` implementation.
27
+
> *Note:* In real-world applications, it is recommended that the `SqlTopicRepository` be wrapped by the [`CachedTopicRepository`](../OnTopic.Data.Caching/README.md), which provides an in-memory cache of any `ITopicRepository` implementation.
Copy file name to clipboardExpand all lines: OnTopic.TestDoubles/README.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# `TestDoubles`
2
-
Provides test doubles for use in testing the **OnTopic Library**.
2
+
Provides common test doubles for use in testing the **OnTopic Library**.
3
3
4
4
[](https://igniasoftware.visualstudio.com/OnTopic/_packaging?_a=package&feed=46d5f49c-5e1e-47bb-8b14-43be6c719ba8&package=3a741b7a-7fa1-4bdb-bc55-efbac3f04e6c&preferRelease=true)
@@ -16,3 +16,16 @@ Installation can be performed by providing a `<PackageReference /`> to the `OnTo
16
16
```
17
17
18
18
> *Note:* This package is currently only available on Ignia's private **NuGet** repository. For access, please contact [Ignia](http://www.ignia.com/).
19
+
20
+
## Inventory
21
+
22
+
### Dummies
23
+
Dummies provide no actual functionality and are not expected to function correctly if called. They are simply provided to satisfy the inferface requirement of dependencies, so that a service can be constructed.
Stubs not only satisfy the interface, but will return canned data that tests can operate against, thus allowing unit tests to interact with predetermined scenarios against the service.
0 commit comments