For your project involving a Raspberry Pi and a flexible LED matrix, both Blazor and Razor can be viable options, but they serve different purposes and come with distinct benefits and limitations.
- Blazor Server: This option allows you to build a web UI where the rendering happens on the server. It can simplify debugging since the client-side logic is executed on the server. Blazor Server also supports SignalR, enabling real-time communication between the server and client, which is beneficial for your requirement to show the current state of the system and push updates to the client.
- Blazor Hybrid (WebAssembly): This approach allows you to run .NET code directly in the browser using WebAssembly. It supports SignalR for server push capabilities. However, you've mentioned encountering issues with debugging the client side and some jankiness when accessing the WebAssembly page from a phone. If these issues persist, it may not be the best fit for your project.
- REST API with a Plain Web Page: This option involves creating a separate server-side application (potentially using ASP.NET Core) that serves a REST API, while the client could be a simple HTML/CSS/JavaScript web page. This setup allows for clear separation of concerns and can be debugged independently. You can run the client on your Windows PC while developing, which may streamline your workflow.
- Razor Pages: This framework is a server-side web application framework that can also utilize SignalR for real-time updates. It allows for easy debugging since the logic is server-side, similar to Blazor Server. However, it may not provide the same level of interactivity as Blazor or a SPA approach.
Given your requirements and the need for real-time updates, Blazor Server seems to be the most suitable option. It provides a good balance of ease of debugging, real-time capabilities with SignalR, and the ability to maintain a server-side architecture. If you find that you need more client-side interactivity later, you can consider transitioning to a Blazor Hybrid or REST API approach.
Ultimately, the choice may depend on your comfort level with each technology and the specific needs of your project as it evolves.