Blazique 0.1.53
dotnet add package Blazique --version 0.1.53
NuGet\Install-Package Blazique -Version 0.1.53
<PackageReference Include="Blazique" Version="0.1.53" />
<PackageVersion Include="Blazique" Version="0.1.53" />
<PackageReference Include="Blazique" />
paket add Blazique --version 0.1.53
#r "nuget: Blazique, 0.1.53"
#:package Blazique@0.1.53
#addin nuget:?package=Blazique&version=0.1.53
#tool nuget:?package=Blazique&version=0.1.53
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 aShouldRendermethod to check for changes.Component<TModel, TCommand>: Implements the MVU pattern with anUpdatemethod for model changes and aViewmethod 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
| Product | Versions 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. |
-
net8.0
- Microsoft.AspNetCore.Components (>= 8.0.3)
- Microsoft.AspNetCore.Components.Web (>= 8.0.3)
- Radix (>= 4.4.0)
- Radix.Generators (>= 4.4.0)
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 |