You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an avid Blazor user, I really love the component model. I think creating applications this way makes it very scalable and easy to build.
For basic applications, we often don't need full interactivity that is provided by hefty technologies such as WASM or SignalR. A lot of the time, we can do this simply with a technology such as HTMX on the front end. While I appreciate the steps in the right direction with enhanced navigation in Blazor, I feel like it is a bit of a half step. Working with HTMX, I believe it's method of adding attributes to HTML elements for ALL HTTP method (GET, POST, PUT, DELETE) allows engineers to easily see exactly what buttons and forms do.
I have built a proof of concept for this utilizing HTMX, MinimalAPIs, and RazorComponentResult. The only major problem with this is that you basically have to use Razor Component as slightly advanced view templates, and you have to handle all of the logic inside the API handlers. Allowing me to have a method called HandlePut and HandleDelete inside my Razor component would allow me to completely remove Minimal APIs from my project and streamline the whole process.
PS. I am aware I can do this with MVC, but that is so 2010. Yes, I know I can also do basically the same thing with Razor Pages, but their "component" model is not as nice to work with as Blazor.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
As an avid Blazor user, I really love the component model. I think creating applications this way makes it very scalable and easy to build.
For basic applications, we often don't need full interactivity that is provided by hefty technologies such as WASM or SignalR. A lot of the time, we can do this simply with a technology such as HTMX on the front end. While I appreciate the steps in the right direction with enhanced navigation in Blazor, I feel like it is a bit of a half step. Working with HTMX, I believe it's method of adding attributes to HTML elements for ALL HTTP method (GET, POST, PUT, DELETE) allows engineers to easily see exactly what buttons and forms do.
I have built a proof of concept for this utilizing HTMX, MinimalAPIs, and RazorComponentResult. The only major problem with this is that you basically have to use Razor Component as slightly advanced view templates, and you have to handle all of the logic inside the API handlers. Allowing me to have a method called
HandlePut
andHandleDelete
inside my Razor component would allow me to completely remove Minimal APIs from my project and streamline the whole process.PS. I am aware I can do this with MVC, but that is so 2010. Yes, I know I can also do basically the same thing with Razor Pages, but their "component" model is not as nice to work with as Blazor.
Beta Was this translation helpful? Give feedback.
All reactions