Git Product home page Git Product logo

Comments (21)

JeroMiya avatar JeroMiya commented on May 11, 2024 3

I'll be using Server-Side until Client Side is "officially released". I'd prefer the boilerplate project be server side at least initially. Supporting both would be ideal.

from blazorboilerplate.

witoldlitwin avatar witoldlitwin commented on May 11, 2024 2

On it.

from blazorboilerplate.

glazkovalex avatar glazkovalex commented on May 11, 2024 1

Blazor server side is not near similar to MVC server side which you mention.

Blazor server side is similar to MVC in that its terrible disadvantage is that Blazor server side works in an archaic way on the server side, just like the long-dead MVC.
Yes, the server side can be scaled to execute client logic, but why scale the server and waste traffic on unnecessary data exchange when client logic can be executed within hundreds and millions of client devices?!

The server side of blazor is exclusively for legacy support.

from blazorboilerplate.

VR-Architect avatar VR-Architect commented on May 11, 2024 1

For me server-side development is by far the fastest to develop when the requirements are fluctuating. No need for API controllers, no need for Swagger, no need for Postman, no JWT token cut/paste, and faster debugging. In addition, if using EF Core and you change the database model in the database, just rerun the command to change the model/data classes.

HOWEVER, for enterprise applications the reality is that we really need both server-side(signal-R) and client-side(hosted on ASP.net) solutions. For many enterprises, mobile devices preference would be for disconnected local storage with syncing to the server. For desktops in the office, regular old web hosted is preferred. We will be creating a project that does both and leverages the shared DLL classes for page rendering and data models. Of the DAL and Identity areas would be different for each though.

Just my 2 cents.

from blazorboilerplate.

MarkStega avatar MarkStega commented on May 11, 2024 1

The DualModeV2 branch is now complete (pending a merge of a PR) and allows the project to run as either CSB or SSB.

from blazorboilerplate.

enkodellc avatar enkodellc commented on May 11, 2024 1

Just merged @MarkStega 's PR Version 0.6.0 / Master Branch. We now have BlazorBoilerplate that can run both CSB and SSB. Please test it out and submit Issues / PR's. Happy Coding everyone!

from blazorboilerplate.

witoldlitwin avatar witoldlitwin commented on May 11, 2024

I agree that server-side conversion is a good idea. For now I plan to use SSB because of official MS support, stability and load speeds.

from blazorboilerplate.

enkodellc avatar enkodellc commented on May 11, 2024

This looks like a great solution: https://github.com/Suchiman/BlazorDualMode it does both. @witoldlitwin / @JeroMiya / @msajidirfan anyone be willing to create a PR for this?

from blazorboilerplate.

enkodellc avatar enkodellc commented on May 11, 2024

FYI @witoldlitwin , it looks like @NPadrutt tried and he had some issues with IS4. If you run into the same I suggest using the 0.2.3 release of BlazorBoilerplate. Though we have now sorted most of the IS4 issue. Hopefully it works for you without much hassle. I appreciate the work!

from blazorboilerplate.

witoldlitwin avatar witoldlitwin commented on May 11, 2024

@enkodellc I added a PR, but the code in it is incomplete. I couldn't figure out how to solve a dependency injection issue with HttpClient. Take a look at the code, maybe you'll be able to fix it.

from blazorboilerplate.

glazkovalex avatar glazkovalex commented on May 11, 2024

Interested only the client side of blazor on WebAssembley. Server side (MVC) died about seven years ago and is of no interest. The server side of blazor is exclusively for legacy support.

from blazorboilerplate.

valentasm1 avatar valentasm1 commented on May 11, 2024

@glazkovalex Blazor server side is not near similar to MVC server side which you mention. With current stage of client side blazor it is only for internal usage.
This article show how well server side is scalable.

@witoldlitwin is this maybe what you need?

// Server Side Blazor doesn't register HttpClient by default
            if (services.All(x => x.ServiceType != typeof(HttpClient)))
            {
                // Setup HttpClient for server side in a client side compatible fashion
                services.AddScoped<HttpClient>(s =>
                {
                    // Creating the URI helper needs to wait until the JS Runtime is initialized, so defer it.
                    var uriHelper = s.GetRequiredService<NavigationManager>();
                    return new HttpClient
                    {
                        BaseAddress = new Uri(uriHelper.BaseUri)
                    };
                });
            }

from blazorboilerplate.

enkodellc avatar enkodellc commented on May 11, 2024

@glazkovalex thanks for the feedback. As of this moment it would be great to have a dual app that could be switched fairly easy until CSB / webassembly has debugging. That is the missing piece. If that is not possible I don't think I will convert the whole app to server side, Maybe a branch for SSB Blazorpoint for those who want to use it to test their Pages.

from blazorboilerplate.

fudgeboy2000 avatar fudgeboy2000 commented on May 11, 2024

Client-side and server-side both have legitimate use cases. Being able to easily switch the project between the two models would be the killer feature for sure. I'd like to be using Blazor Boilerplate for projects right now, but client-side simply isn't a practical option for many reasons. Some of those may go away over the next 12 months (use of IE11, client-side not being officially supported yet, Ops lack of exposure to webassembly in general leading to skepticism), but some might not (scaleability on the server-side being an important aspect of locally hosted intranet webapps).

For now it's a great technology to sink R&D time into, and this project is a great resource in these early days, but lack of an option for the only officially supported distribution model is a big hurdle when doing enterprise development.

from blazorboilerplate.

softwareguy74 avatar softwareguy74 commented on May 11, 2024

Both!

from blazorboilerplate.

soomon avatar soomon commented on May 11, 2024

Blazor on the server side is nice and fast. I like that blazor offers both options. But in times of SPAs and tools like electron, I think the future is client side. Also, Microsoft will invest tons of time and money to achieve faster loading times, so in my view it is better to follow them and stick to the client side, although the loading times currently are quite long.

Also, I guess its less work to convert from Client to Server than the other way around, so that can always be done in a fork, if someone wants to.

from blazorboilerplate.

MarkStega avatar MarkStega commented on May 11, 2024

I have a PR ready to go that implements switching between CSB/SSB by choosing the build configuration. I have one issue though and that is the flow through the authentication. I see in the account controller that a 200 status is being returned for the 'built in' users of user&admin, but they aren't ending up in a valid authenticated state. I use JWT authentication in my app with a custom authentication provider and really have no experience with an IS solution.

Is there anyone that could take this PR & understand how to fix the authentication?

[Edit] The PR is "2019-12-17 Dual mode supporting CSB & SSB #100"

from blazorboilerplate.

enkodellc avatar enkodellc commented on May 11, 2024

Thanks @MarkStega, to anyone else willing to contribute help with debugging this issue. I created a branch for his PR "DualModeV2" which I merged his PR into.

from blazorboilerplate.

enkodellc avatar enkodellc commented on May 11, 2024

@MarkStega Thanks. I am checking the master PR's now and then will review your PR's for DualModeV2. I plan on getting to it by end of day.

from blazorboilerplate.

enkodellc avatar enkodellc commented on May 11, 2024

Thanks to @MarkStega the branch "DualModeV2" is almost ready for release. If there is anyone in the list that has chimed in and wants to help by testing please fork that branch. Right now I see that the Forum is broken. I will be spending some time merging the latest changes from the master branch to it. Hoping to merge it into master in the next week, depending on any other bugs.

from blazorboilerplate.

MarkStega avatar MarkStega commented on May 11, 2024

I just pushed a PR to the "DualModeV2" branch which has a repair to the SSB Forum functionality. As far as I know the branch now fully supports CSB & SSB.

from blazorboilerplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.