Comments (6)
Hi,
Blazor is not yet supported, but it will be in active development after the next release, which focuses on .NET 5 compliance
from prise.
Thanks a lot for your response. If you need help with anything, don't hesitate to reach out.
from prise.
@serge-wq there are two stories to Blazor (server-side, client-side).
For the server-side, the app would load the plugin assemblies from the server directory (wwwroot).
For client-side, it becomes a bit trickier.
The client would need to download these plugins over the network (I believe it should be packaged, like nuget packages) and load them up on-demand. Not to say it is impossible to achieve, but the design of the Blazor application should be well thought through.
In theory, it should behave similarly to the MVC plugin example found here: https://github.com/merken/Prise.Examples/tree/master/MVCPlugins
Meaning, the host application is a singleton, it loads all the plugins into memory and keeps it there until the app is restarted. The struggle is going to be in the unloading of the plugins.
Performance is also going to be an issue, most of the plugins are packaged with their versions of the dependencies, this results in a (necessary) bulky download for each active plugin.
Long story short, these are the points we need to consider or overcome before supporting Blazor plugins on the client side using Prise:
- Fast plugin download (compact packaging, caching)
- Unloading (re-loading) of plugins in a singleton lifetime
- Removing the Prise.Proxy support (losing backwards compatability) in order to provide faster plugin load times
Looking forward to insight from others...
from prise.
Another thing to keep in mind is that Client side Blazor relies on netstandard. Prise is a netcore-specific library that leverages some netcore 3.0 and 3.1 API's that are unavailable to netstandard 2 (or 2.1).
This does not mean porting Prise to netstandard is impossible, it's worth a try 👍
from prise.
For Blazor Server I don't see much of a problem. As you say the tricky part is client side, but maybe if the client is served by a ASP.NET Core backend the plugins could be loaded from there? This would limit the deploy options for Blazor WASM, though.
Also you can specify from which assemblies the Router component can fetch components to render as pages. This could be helpful if the plugin includes Blazor components as pages.
from prise.
Firstly, I'm checking whether (down)loading an assembly from the server is possible and having it invoked dynamically, but the project first needs to be ported to netstandard2.1 because mono only supports netstandard. You can track progress here: https://github.com/merken/Prise/tree/wasm
from prise.
Related Issues (20)
- PluginBootstrapper.Bootstrap event called on each Http Get Request HOT 2
- Invoke Plugin Publish command from Post Build Events HOT 1
- Plugin not found during scanning because of folder "runtimes" HOT 3
- How to inject ILogger<T> HOT 1
- Question: Plugins from parallel projects (on solution) HOT 1
- DependencyInjection with MvcPluginLoader HOT 4
- [Enhancement] Wrapper HOT 1
- Dependency management question HOT 1
- [Enhancement] DependaBot 🤖 HOT 1
- [Enhancement] MAUI support ? HOT 1
- [Enhancement] "anything".plugin.json HOT 1
- services.AddPrise() middleware seems to be missing in latest .net 6 version release HOT 1
- FindPlugin Problem HOT 2
- Feature - Add support for Razor Class Library views HOT 5
- DI With Blazor components
- [Question] From the Host Web API's perspective: Is there a way to limit max execution time of a plugin?
- Prise Publish-plugin extension for VS 2022
- Why is TaskCanceledException not being caught but other exceptions are? HOT 1
- dotnet pack .nupkg , when UnCompressNugetPackage, not include xxx.deps.json
- State of the Project
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prise.