View on GitHub

CoreXF

CoreXF is a ASP.NET Core eXtensibility Framework.

Introduction

Another feature not available prior to ASP.NET Core is TagHelpers. Many sources exists but you can read about them here and here. In fact, ViewComponents can be used as TagHelpers too.

Exporting TagHelpers

No need to do that! Yes, that’s right – TagHelpers are just pieces of code and can be put easily in a class library.

However, having a TagHelper in a context, that is a MVC application, benefits in retaining the initial context as well as a good testing environment for the TagHelper. Provided there’s one controller with a single action, having a single view, the overhead of such an environment is not too big.

This is why, TagHelpers acn be turned into extensions and managed as such.

Needless to way, either IExtension must be implemented or ExtensionBase must be inherited.

Realistic scenario

In a future version of CoreXF framework, when an Extension Manager is available, extensions will be turned on and off (made active or inactive), thus changing the application’s functionality with just a mouse-click. This is why having TagHelpers as extensions is a good path to follow.