StardustDL / modulight

Modulight is a light modular framework aimed to be low intrusive based on dependency injection for .NET, ASP.NET, Blazor, and command-line.

Home Page:https://stardustdl.github.io/modulight/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

modulight

Modulight is a light modular framework aimed to be low intrusive based on dependency injection for .NET, ASP.NET, Blazor, and command-line.

Features

  • Dependency injection
  • Unified services registering
  • CommandLine (cooperated with CliFx)
    • Hosting in generic host Microsoft.Extensions.Hosting.IHost
    • Dependency injection, logging & hosting services
    • Extensible & Composable
  • Blazor Client & Server
    • Unified CSS & JS lazy loading & prerendering. No need to append <script> and <link> repeatedly for every razor components, especially when use different hosting models.
    • Unified assembly lazy loading.
    • Interop between modules and host.
    • A builtin hosting implementation with prerendering.
  • ASP.NET Server
    • Custom middlewares
    • Custom endpoints
  • GraphQL Server (cooperated with ChilliCream GraphQL Platform)
    • Unified query/mutation/subscription definition
  • Builtin module dependencies, options & services support

Usage

Use modules

See here for details.

Addition steps

Use Command line modules

See here for details.

Use Razor component modules

See here for details.

Use Blazor UI hosting template

See here for details.

Use ASP.NET modules

See here for details.

Use GraphQL modules

See here for details.

Example codes

They are based on nightly build package at:

NUGET source

Design and use a command line module in console application

Design a client (Blazor) module

  • HelloModule.cs Client module definition.
  • Index.razor Client module pages. It belongs to a different assembly from which Module belongs to because we want this assembly is lazy loading.

Design a GraphQL server module

Use a client module in Blazor websites

Use a GraphQL server module

Project guide

About

Modulight is a light modular framework aimed to be low intrusive based on dependency injection for .NET, ASP.NET, Blazor, and command-line.

https://stardustdl.github.io/modulight/

License:Mozilla Public License 2.0


Languages

Language:C# 91.1%Language:HTML 6.9%Language:JavaScript 1.9%Language:PowerShell 0.0%Language:CSS 0.0%