WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

In my opinion, the right architecture depends on your app’s complexity and how much data flows through it.

  • If it’s a simple app with minimal logic and basic UI interaction, code-behind is fine, it’s fast and gets the job done.
  • But if you’re building something larger, with more complex logic and significant data flow, MVVM is a better choice. It keeps your codebase clean, testable, and easier to maintain over time.

Note

It’s not just a choice between code-behind and MVVM. There are other valid approaches. For example, the WinUI Gallery app doesn’t strictly use either.
Instead, it follows a structure that organizes code by responsibility (e.g., Helpers, Pages, Samples, Controls etc.).

So …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by SalomezEthan
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants