Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Model-View... for Blazor

Despite I google-d for some time I couldn't find any of the Model-View-XYZ framework implementations for server-side Blazor, that is Razor Components (XYZ stand for any of the following: Controller, Presenter, ViewModel).

If anyone knows of such an implementation, no matter in what stage of development it is, please let me know. Thanks a lot in advance.

EDIT: The question is if someone has encountered, or takes part in development of such a framework.

The question is absolutely simple - has someone encountered some info on the Internet about such a framework targeting Razor Components (aka server-side Blazor), since I haven't so far.

like image 296
Alexander Christov Avatar asked Dec 13 '22 12:12

Alexander Christov


2 Answers

I'm not 100% sure what your question is so I'm taking a stab at what I think you're asking.

It's important to understand that Blazor is not opinionated about how you choose to structure your code. The team have been very clear that they will not force any patterns on developers. This means that you are free to structure your code how you feel is best.

If you're interested in MVVM for example, Jeremy Likness has a great blog post covering using this pattern in Blazor apps. But if you are looking for official docs covering this then you're out of luck.

Hope this helps, if not please clarify what it is you're looking for.

like image 81
Chris Sainty Avatar answered Jan 22 '23 00:01

Chris Sainty


Blazor itself is an MVVM framework. The HTML in your Razor Component is your View. The @functions section is your ViewModel and you can use POCO classes for your Models.

like image 32
Rain336 Avatar answered Jan 22 '23 01:01

Rain336