dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.5k stars 10.04k forks source link

Server-Side Sample Code #15887

Closed zsvanderlaan closed 5 years ago

zsvanderlaan commented 6 years ago

I am absolutely in love with the server model for reasons outline in (https://github.com/aspnet/Blazor/issues/1004).

Is there any code I can run right now to test drive this idea, or any advice on the modifications needed to get started? It seems like it would be perfect for rapidly prototyping, and I'd like an excuse to dig into my next project this weekend.

SteveSandersonMS commented 6 years ago

Not right now, but we’ll be working on it over the next few weeks. Thanks for letting us know you’re interested!

Terricide commented 6 years ago

Me too I was working on a prototype like this called Revision over a year ago and I would help out.

vanderstack commented 6 years ago

Is it correct to say that what was shown in the demo didn't require presentation implementation changes, but rather more infrastructural or architectural changes?

I ask because I would like to begin writing my prototype presentation implementation. I would have my component model which would of course be my html and javascript and c# for the presentation. This would use a service to retrieve the data which the component needs. The service would have historically been an abstraction over the http request and other persistence details. If no changes are required for this to run server side, I could have this service skip the http request / controller endpoint and directly use my entity framework database context and its appropriate abstractions, cutting down an insane amount of boilerplate. Oh, I just realized, I could subscribe to the entity framework change tracking to have updates pushed to my component. This replaces my full need for SignalR as well then, and gives a far more intuitive usage.

MuhammadJameelNazir commented 5 years ago

can we use server side blazor with web api project like client side blazor

Suchiman commented 5 years ago

@MuhammadJameelNazir there's nothing that stops you doing Http Requests from the Server to localhost. That's how https://github.com/Suchiman/BlazorDualMode/ works