Skip to content

RoadMap

GioviQ edited this page Jun 5, 2020 · 27 revisions

Blazor Boilerplate Project Roadmap

Blazor Boilerplate has a decent start but we have several features that could use additional collaborator support to tackle. Below is the initial list. As more collaborator's join please make suggestions on the Gitter community

Project | Assigned Contributor

  • Review Logging and Test on local & published | n/a
  • Add Local Storage for User Profile & Theme options | n/a
  • Create Wiki for Deployment both IIS and Azure | n/a
  • Simple CRUD for Customers -> Orders or or Blog | n/a
  • Unit, Integration and Automatized Tests | n/a
  • Simple Chat using SignalR - maybe this repo can be a resource: https://github.com/conficient/BlazorChatSample | n/a

Development branch

Breeze

Breeze integration completed with ToDo example.

With Breeze the API design takes less code and makes easy some complex update.

In this project the Breeze Controller is ApplicationController. The EFPersistenceManager is ApplicationPersistenceManager and the Breeze.Sharp Entities (i.e. the Dto) are in BlazorBoilerplate.Shared.Dto.Db.

The breeze.sharp library is rarely updated, so to make BlazorBoilerplate working with Breeze I used my fork. You can find the package in folder nupkg and nuget.config tells Visual Studio to use this folder as a package source.

The ApplicationController has no Authorize attribute, because to keep policy management with Breeze, I implemented a simple custom policy management in ApplicationPersistenceManager.

First of all you can mark the EF entities with Permissions attribute which takes CRUD Actions flag enum as parameter. Examples:

[Permissions(Actions.Delete)]
public partial class Todo
{
 ...
}

[Permissions(Actions.Create | Actions.Update)]
public partial class Todo
{
 ...
}

[Permissions(Actions.CRUD)]
public partial class Todo
{
 ...
}

In BeforeSaveEntities method of ApplicationPersistenceManager the actions of the entities to be saved are compared with the claims of permission type of the current user. If a policy is violated an EntityErrorsException is thrown.

To check Actions.Read in ApplicationController you have to access EF DbSet with GetEntities method of ApplicationPersistenceManager.

Auditable shadow properties are nice, but what about reading in ToDo list page who created a Todo and when? Shadow properties are not exposed, so to expose them without manually create them for every entity implementing IAuditable, I introduced Source Generator with project BlazorBoilerplate.SourceGenerator.

AuditableGenerator generates for every class implementing IAuditable the needed properties. Remember to make partial all classes implementing IAuditable.

To access ApplicationController from client, you have to inject IApiclient (ApiClient).

Modularization

Goal: web application starts and reads from database which modules to load for the current tenant.

At the moment the modules are implemented in folder Modules:

BlazorBoilerplate.Theme.Material is the main theme with general purpose pages. It is based on MatBlazor. All UI modules depends on main theme.

BlazorBoilerplate.Theme.Material.Admin is the admin UI. If the current tenant is the master tenant, you can manage tenant CRUD actions.

BlazorBoilerplate.Theme.Material.Demo contains the application UI, in this case BlazorBoilerplate Demo.

BlazorBoilerplate.GoogleAnalytics injects Google Analytics script with TrackingId read from appsettings.json.

Every module has to contain a class implementing IModule or deriving from BaseModule. If the module is also a theme a class has to implement ITheme.

Clone this wiki locally