Blazique 0.1.53

This package has a SemVer 2.0.0 package version: 0.1.53+f93b6ad6e7.
dotnet add package Blazique --version 0.1.53
                    
NuGet\Install-Package Blazique -Version 0.1.53
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Blazique" Version="0.1.53" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Blazique" Version="0.1.53" />
                    
Directory.Packages.props
<PackageReference Include="Blazique" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Blazique --version 0.1.53
                    
#r "nuget: Blazique, 0.1.53"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Blazique@0.1.53
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Blazique&version=0.1.53
                    
Install as a Cake Addin
#tool nuget:?package=Blazique&version=0.1.53
                    
Install as a Cake Tool

CD NuGet Badge

Blazique Logo

Blazique: A Modern MVU Library for Blazor

Blazique is a library designed to enhance the development of Blazor applications using the Model-View-Update (MVU) architecture. For an elaborate explanation on how this library came to be, read this blog post.

Target Audience

Blazique is ideal for teams with extensive C# expertise who prefer to stay within the C# context. Blazor is already very much suited to building applications in which both client-side (minimizing the need for JavaScript) as well as server-side code can be written in C#. This library will take you the last mile so that even the markup code is pure C#.

Requirements Summary

Blazique aims to provide a library that:

  • Avoids markup languages for output generation.
  • Supports efficient DOM updates with minimal performance impact.
  • Allows embedding of Razor components within MVU components and vice versa.
  • Maintains readability and structure similar to markup languages using C# features.

Key Features

  • Three Types of Components: Blazique introduces three base classes for component creation:

    • Component: For pure C# markup components without a model or MVU interaction.
    • Component<TModel>: Adds a model representing the component's state, with a ShouldRender method to check for changes.
    • Component<TModel, TCommand>: Implements the MVU pattern with an Update method for model changes and a View method for UI rendering.
  • Code Layout & Design: The library ensures that the code layout is readable and similar to markup languages, utilizing C# 12 features like "Collection Expressions" for a cleaner syntax.

  • Integration with Blazor: Designed to work seamlessly with Blazor's features, Blazique components can be composed with Razor-based components and vice versa.

  • Code only page components: Use the appropriate attributes to make a page routeable and set the rendermode using attributes (which was depricated from .NET 8 on):

    [Route("/")]
    [InteractiveServerRenderMode]
    public class Index : Component
    {
    }
    

Possible Advantages and Disadvantages

  • Pros:

    • Simplifies testing with pure functions and immutable data.
    • Enhances debugging with a clear unidirectional data flow.
    • Offers a familiar development environment for C# developers.
  • Cons:

    • Steeper learning curve for those new to a functional programming style.
    • Less mature tooling and ecosystem compared to MVC or MVVM patterns.

Status

Stabalizing the API surface by implementing the RealWorld sample application Conduit, from the RealWorld open source project. This could lead to breaking API changes up untill the release of version 1.x. The reo for the implementation can be found here. This also serves as an up to date sample.

Installation

To install Blazique, run the following command in your terminal:

dotnet add package Blazique

Benchmark Results

View Benchmark Results

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.53 128 5/17/2024
0.1.52 91 5/17/2024
0.1.51 97 5/17/2024
0.1.49 83 5/13/2024
0.1.48 97 5/10/2024
0.1.47 98 5/10/2024
0.1.46 92 5/10/2024
0.1.45 109 4/22/2024
0.1.44 107 4/19/2024
0.1.43 98 4/18/2024
0.1.42 107 4/15/2024
0.1.41 105 4/15/2024
0.1.40 103 4/15/2024
0.1.39 98 4/15/2024
0.1.38 101 4/15/2024
0.1.37 98 4/15/2024
0.1.35 107 4/12/2024
0.1.34 99 4/12/2024
0.1.32 98 4/12/2024
0.1.31 98 4/11/2024
Loading failed