Skip to content

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

License

Notifications You must be signed in to change notification settings

StardustDL/modulight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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