MVU might not be what you think it is
See original GitHub issueWhen I was reading the official announcement the other day, I was surprised what was presented there as MVU:
readonly State<int> count = 0;
[Body]
View body() => new StackLayout
{
new Label("Welcome to .NET MAUI!"),
new Button(
() => $"You clicked {count} times.",
() => count.Value ++)
)
};
As far as I am concerned, this is not MVU. I already wrote down some thoughts on why I think so here.
Don Syme, who, as I understand, spent several months of 2018 on implementing MVU on top of Xamarin.Forms and building what later became Fabulous, is a bit more diplomatic, but the bottom line is the same.
So, what’s my point?
- I would love you to implement the real architectural pattern, no matter if in C# or F#. Reaching out to the people behind Fabulous could be a start here.
- If you are not interersted in that but have a clear vision on building on top what is available today as the Comet library, then please consider using a more appropriate name for that “app model.” Invent something new. Name it MSMVU. Whatever. But don’t sell apples for oranges.
Cheers!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:70
- Comments:55 (4 by maintainers)
Top Results From Across the Web
Model-View-Update (MVU) – How Does It Work?
The View() function is responsible in most MVU implementations for describing the UI. You might have noticed that I am talking about functions, ......
Read more >My Mosasaurus is dying and the MVU won't do anything!
The bad news is that I don't have a cure for Foot and Mouth yet, and the last save was one minute before...
Read more >Organizing MVU Projects
Strategies for organizing large Model-View-Update projects that have worked for us. We have been working on functional UI projects using the ...
Read more >James Clancey - .NET MAUI MVU - XamExpertDay 2020
NET MAUI and some MVU that will come to this evolution of Xamarin.Forms Don't forget to subscribe to my channel for more Xamarin...
Read more >NET MAUI MVU With Comet: Getting Started in VS Code
More specifically, you can use it with . ... in my free time, and not officially affiliated with or endorsed by Microsoft (my...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Since I’ve been mentioned here, I will just say a few things.
I think MAUI is great and I think learning about MVU as an architecture can be useful for people to understand MAUI.
It’s easy to get hung up about words, and we should probably all take a breather and try not to worry about it at this stage, since there’s plenty of time to adjust the words that are used and I think the message about accurate terminology has been heard. Personally I think Elm has established that the unadorned, unqualified use of “MVU” means explicit messages, explicit update, functional models, functional view recalculation and differential update. But there are many variations of MVU and MAUI is one point in that spectrum (which covers all the way to MVVM as a sort of manually-incrementalized message processing system with implicit, pervasive mutable state). The SwiftUI communication is interesting from this perspective.
I notice people tend to have very strong beliefs and opinions in this area and can take things quite personally. I know what that’s like, and like programming language design I think all points in the space have pros and cons. I’d encourage everyone to try out, use, learn, share and work together to make the best range of technologies possible.
Have you ever heard anyone saying C# MVC or C# MVVM? Model-View-Update aka The Elm Architecture is a well-defined architectural pattern, not a language-dependent implementation.
So C# 9 would, while still be more noisy than F#, be good to go from my current point of view.
As written above, there should not be anything particularily language-specific in the overall approach as MVU itself is just the architectural style or app model as you call it.
@TimLariviere Has made some proposals to move Fabulous forward recently, which also includes ideas around a more SwiftUI-like DSL. You might want to have a look and/or engange there, too.
By the way: I’ve made a 1:1 comparison of XF + C# + MVVM and XF + F# + MVU last year, the results can be found here – including source code.