4 ms·
There are already frameworks doing this. For example Blazor (.Net core 3) and Phoenix Live View (Elixir). They write the Javascript for you but you won't even
by thdrdt 7y ago
There are already frameworks doing this. For example Blazor (.Net core 3) and Phoenix Live View (Elixir).
They write the Javascript for you but you won't even notice it.
I don't have experience with Phoenix, but with Blazor I just write my complete SPA in C#. There is no API for communication between the server and client. Blazor creates all the JavaScript websocket code for me so I never need to write a single line of Javascript.
And when you separate your business layer from Blazor you can always add an API in the future when you need one. Just create some controllers for your API and use the same business code Blazor is using.