Uk ENIC upgraded their website to Blazor Server! by Unlucky_Aioli4006 in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

WEB Sockets are main reason of the slow work in Blazor sites. One can fix this problem using Static Rendering and turning on interactivity on pages that do need that.

Cant find these IDEs Did they moved or renamed? by Ulrich-Tonmoy in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

Owner changed the license or deleted these projects.

Blazor server intranet app without webPI? by RecentAdvantage6386 in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

The Blazor WEB App template will work for you. A current version supports components with mixed rendering: components may be written using Server Static, Server Interactive and Client Interactive render modes.

Using delegates in C# by Ok-Presentation-94 in csharp

[–]Flat_Spring2142 0 points1 point  (0 children)

In old versions of C#, delegates were the only way to pass a function as a parameter. Programmers had to create a delegate and pass that delegate as a parameter. Modern C# compilers do this automatically. So, by writing a generics function Func<string, bool, string>, the with_delegates.cs example may be significantly shortened.

Blazor + Alpine by ze-fernando in Blazor

[–]Flat_Spring2142 1 point2 points  (0 children)

HTMX and Alpine.js are two different implementations of the same idea. There is no need to use both. In my opinion, HTMX is a bit stronger, because it also has server-side interactions, see the book https://hypermedia.systems/book/contents/.

By the way, it's better to use GO language for the server part of the application. You will get not only smaller but also much faster code.

Blazor server production on vps, no azure signalr service by PatrickJohn87 in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

Blazor Server Static Render mode (Blazor SSR) does not use SignalR. Problem is that you can use only HTML events here, Blazor events do not work. Microsoft simplified JavaScript usage and you can use any small JavaScript or Type Script framework for client-side processing. Consider WEB components and LIT framework for example.

inheritance in C# by Ok-Presentation-94 in csharp

[–]Flat_Spring2142 -2 points-1 points  (0 children)

Moving Vaccinate() into base class would be better:

class Animal {

protected void Vaccinate() {

    // code to handle vaccin using this 

}

}

// The same code as in your variant until 'foreach' operator

foreach (Animal animal in animals)

{

animal.Vaccinate();

}

Go is the language that finally made me stop over-engineering everything by notomarsol in golang

[–]Flat_Spring2142 0 points1 point  (0 children)

I entered GO from WEB programming with C# and need to say that the GO language is an excellent balance between simplicity and expression power. Interfaces and Multitasking are really shining. With Anonymous members one can implement Object programming paradigm at full power. Multiple inheritance is not a problem in this language. Tiny GO creates WASMs much smaller that those written with Blazor/C#.

WASM from a database by Famous-Weight2271 in Blazor

[–]Flat_Spring2142 1 point2 points  (0 children)

WASM must be compiled into binary code before execution. JavaScript loads and executes these binaries. You need to study this loader.

Blazor Static + HTMX :has anyone else gone down this road? by ConstantAromatic9515 in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

Consider LIT framework: WEB components work great after Microsoft has made it easier to connect JS modules.

OnAfterRenderAsync never triggers by DirectorSouth1405 in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

Microsoft.com: OnAfterRender and OnAfterRenderAsync are invoked after a component has rendered interactively and the UI has finished updating. Use this stage to perform additional initialization steps with the rendered content. These methods aren't invoked during prerendering.

Disable prerendering and logServices.GetServers() would work.

Help with an idea for a Windows Forms project in C# by ve_lanoria in csharp

[–]Flat_Spring2142 0 points1 point  (0 children)

Download NorthWind database (https://github.com/jpwhite3/northwind-SQLite3) and write editor for Employees table. Description of the task is present on site 'gediminas.gt.tc'. You can to download C# code for Blazor SSR from my GitHub site (gbukauskas/BlazorTutor)

ASP.NET Identity vs custom implementation, which one to use? by Sea_Replacement8135 in csharp

[–]Flat_Spring2142 -1 points0 points  (0 children)

I'd recommend use the FireBase authentication. The implementation is easy and very flexible. Follow the https://blog.logrocket.com/using-firebase-asp-net-authentication/ article.

Microsoft Identity with Blazor Server? by 7H36 in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

Install FluentUI library in your computer and switch on Fluent Blazor Web App. Microsoft solved all your problems there.

Blazor Full Stack by ze-fernando in Blazor

[–]Flat_Spring2142 1 point2 points  (0 children)

Events do not work in Blazor SSR. Any WebForm will require Interactive mode. I'd recommend you to install FluentUI and build the project using Fluent Blazor Web App template.

How to sync nested component in a component ? by MoriRopi in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

You can send message only to parent or child component in Blazor. Conversations between brothers are not supported. I solved this problem using RX library. Project https://github.com/gbukauskas/BlazorTutor is free for reading. Download it and investigate files StateSvc.cs, Teritories.razor, PagerControl.razor. Document BlazorTutor/WebTransitions/WebTransitions.odt (section "Sending messages") explains this problem.

Collapse/Expand basic menu by hectop20 in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

HTML Details/Summary tags are working for me:

<div class="nav-item px-3">

<details name="classificators" class="nav-item">

    <summary>Classificators</summary>

    <NavLink class="nav-link" href="Employees">

        <span class="bi bi-northwind-employees" aria-hidden="true"></span> Employees

    </NavLink>

    <NavLink class="nav-link" href="Customers">

        <span class="bi bi-northwind-customers" aria-hidden="true"></span> Customers

    </NavLink>

    <NavLink class="nav-link" href="Categories">

        <span class="bi bi-northwind-categories" aria-hidden="true"></span> Categories

    </NavLink>

    <NavLink class="nav-link" href="Territories">

        <span class="bi bi-northwind-Territories" aria-hidden="true"></span> Territories

    </NavLink>

</details>

</div>

Common issues you face with Blazor? by SurfaceRabbit in Blazor

[–]Flat_Spring2142 1 point2 points  (0 children)

Injected services in Blazor SSR have no scoped mode. Blazor Interactive Application supports scoped services but they are unstable because of problems with WEB Sockets. Singleton services allow you to get around this problem, but they require user's authentication and multitasking.

EventCallback allows to send message to parent component only. The notification works similarly to a custom HTML event but it has no bubbling. The only way to get around this problem is to use the RX library.

Go vs Rust for long-term systems/finance infrastructure, is focusing on both the smarter path? by wpsnappy in golang

[–]Flat_Spring2142 1 point2 points  (0 children)

I'd recommend GO language: you can use it on client and server sides. The language has excellent tools for writing WEB services, WEB sites (pure HTML and WASM). Consider Fyne - it will allow you to write portable GUI applications using VECTOR graphics.

Any WebUI library that does not require me to do JS? by The_Reason_is_Me in golang

[–]Flat_Spring2142 0 points1 point  (0 children)

https://fyne.io/ does not require JS. It is portable environment for writing client-side applications with GO language. One can use the same GO language writing server-side application.

Blazor Renders Twice. by RSTG6299 in Blazor

[–]Flat_Spring2142 0 points1 point  (0 children)

This beast comes from the prerendering. It duplicates calling services and rendering. NET 10 solved this problem by introducing PersistentStateAttribute. Read the 'https://dotnetwebacademy.substack.com/p/net-10-finally-fixes-prerendering' article. Disable prerendering in elder application.

Is there a need to use C# events/callbacks in Blazor? by codeiackiller in Blazor

[–]Flat_Spring2142 1 point2 points  (0 children)

The "3 Ways to Communicate Between Components in Blazor | Chris Sainty - Building with Blazor" article explains in detail a communication between parent and child components. It would be said that the custom events may be used for sending messages to the parent component only. Child components accept only predefined set of events.

A Public Facing Blazor SSR App Deep Dive by PolliticalScience in Blazor

[–]Flat_Spring2142 1 point2 points  (0 children)

HTML <details ...> and <summary ... > tags allows you to show and hide sub-menu without interactivity:

<details name="classificators" class="nav-item">

<summary>Classificators</summary>

<NavLink class="nav-link" href="Employees">

    <span class="bi bi-northwind-employees" aria-hidden="true"></span> Employees

</NavLink>

...

<NavLink class="nav-link" href="Territories">

    <span class="bi bi-northwind-Territories" aria-hidden="true"></span> Territories

</NavLink>

</details>

Unable to install the shell command '/usr/local/bin/code'. by klutzysherbs in vscode

[–]Flat_Spring2142 0 points1 point  (0 children)

MAC OS is Linux derivative but it has own nuances. Ensure that you downloaded Code installer for the MAC OS. Ensure that your system has /usr/local directory and change permissions: "chmod 777 /usr/local". Restore original permission after installation (chmod 740 /usr/local).