abpframework / abp

Open Source Web Application Framework for ASP.NET Core. Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET and the ASP.NET Core platforms. Provides the fundamental infrastructure, production-ready startup templates, application modules, UI themes, tooling, guides and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.31k stars 3.32k forks source link

Server side Blazor compatibility #5517

Closed hikalkan closed 3 years ago

hikalkan commented 3 years ago

We may add a second project into the startup template that is configured for Blazor server side.

mrivanlee commented 3 years ago

Thanks! we need it !

NoWayJA commented 3 years ago

We want to use server blazor for OfficeJS plugins that are not capable of running WASM. This would be super helpful.

kegumx commented 3 years ago

+1

Stirda commented 3 years ago

@stsrki Thank you for working on this. What are the toughest parts?

stsrki commented 3 years ago

@Stirda not much. Mostly reorganizing the structure of the project so that there are no breaking changes :)

leonkosak commented 3 years ago

Because Blazor WASM project is currently not usable for production deployments, I have few questions regarding Server-Side option.

1) When creating new abp or abp Commercial will there be new GUI option added (besides MVC, Angular, Blazor (wasm)) or will this be configurable through backend initialization code?

2) If Blazor WASM and Blazor Server-Side GUI options will be separated, how much effort is expected that Blazor WASM project is "transformed" to Blazor Server-Side and vice versa? Can we expect documentation/article how to do this transformation?

3) Blazor Server-Side requires SignalR connection. abp already has SignalR package, but in this documentation I cannot see if:

I am wondering if adding additional section to appsettings.json to .HttpApi.Host like:

"SignalR": {
    ChannelPrefix: "<abpAppTemplateName>",
    Redis: ""
}

makes sense, because it provides option that different Redis installation is used for SignalR that the rest of application? If SignalR:Redis is empty string (default option for instance), then SignalR works without Redis (and therefore is not scaleout-ready).

What do you think @stsrki and @hikalkan?

Stirda commented 3 years ago

@hikalkan Modified milestone means there will be no Blazor server-side template for 4.2 release?

stsrki commented 3 years ago

@Stirda I can answer this since I'm responsible for the work on Blazor server-side.

The Blazor server-side will take some time until it's done since it requires a lot of rework on project structure and reorganization. The biggest obstacle is how different WebAssembly is from server-side works. One example is the authentication process. So I need to figure how to make it work without changing it too much. But as it stands, some breaking changes are required.

hikalkan commented 3 years ago

@Stirda it is currently in 4.3 milestone. That means we are working on it in 4.3. We do our best, however it may not finish it 4.3. It is released when it is ready. Especially such major works (touch everything) are hard to predict :)

Stirda commented 3 years ago

My urge is over because I finally succeeded in implementing Windows auth without the need of a Blazor server-side ABP template (https://github.com/abpframework/abp/discussions/6295). But I keep an eye on the very interesting work of @stsrki .

mooresway commented 3 years ago

Thank you @stsrki for your work on this and blazorise.

Any update on this? I see it is no longer in-progress.

Not sure if this is good news or bad news. I really hope this makes 4.3 with its long dev cycle. Feels like it has been coming forever. Last year talk of support for blazor seemed to morph into blazor wasm only, which was a surprise.

I hope fear of breaking changes doesn't hold this back too much. The best way is the best way :)

stsrki commented 3 years ago

@mooresway It's going slowly by steadily.

Currently, I moved to some other more critical issues that needed to be fixed and soon I will continue to work on BSS.

mooresway commented 3 years ago

🙏🤞

murat-yuceer commented 3 years ago

Hi @stsrki when you finish that could we switch to server side easily or will we replace depended modules?

stsrki commented 3 years ago

@murat-yuceer It's going to be a breaking change, in terms that you will need to replace some of the modules.

hikalkan commented 3 years ago

@murat-yuceer when it gets clear, we will think on a migration path. The big change will be in the project structure, you know blazor assembly and server are very different in that area. We will try to make current module Blazor packages compatible to server, so you won't change nuget package references.

leonkosak commented 3 years ago

@hikalkan, how SignalR connectivity will be handled for Blazor SS in scale-out environments (multiple instances of application inside k8s cluster for instance). Will Blazor SS in abp have option to "define" Redis backplane?

hikalkan commented 3 years ago

@leonkosak I have never tried that, but I think this should be something not related to the ABP Framework. You can do it just like you can in any project.

leonkosak commented 3 years ago

@hikalkan, of course. But keep in mind this for microservice template (abp Commercial). It's common in microservice runtime environments (like k8s cluster), that applications are running in multiple instances.

hikalkan commented 3 years ago

Thanks @leonkosak we will consider that ;)