Questions tagged [mvvm]
The Model-View-ViewModel design pattern, which separates presentation from data and logic.
179
questions
0
votes
0
answers
74
views
Generic Bindable Property C# .Net
I'm new to MVVM but I saw that data binding is vital for this pattern. I'm not using any type of framework that has data binding to help with this so I made this class to make a binding system. It's ...
3
votes
0
answers
50
views
Trying to properly modelize app settings in a MAUI app following MVVM architecture
Context:
I am working on a relatively simple MAUI app, which includes a Setting page allowing to customize the UX/UI of the app.
I am trying to make the best use of the functionalities of MAUI, while ...
1
vote
0
answers
1k
views
MVVM using Python's tkinter
My task is to change the architecture of a previously written application to Model-View-ViewModel and use the Command pattern. It is written in Python 3.10.6 and uses the tkinter library for the GUI.
...
3
votes
0
answers
130
views
MVVM signing in using firebase
I'm new to MVVM architecture. I want to have authentication with email + password, google and Facebook. I'm not sure if there should be separate view models for each authentication way:
...
2
votes
1
answer
161
views
MVVM pattern in Swift
I've been coding for some time now and since I am working alone I'm not strict in my coding structure approach(bad idea) and was only focused on getting things done which resulted in MVC(MASSIVE-View-...
2
votes
0
answers
177
views
Angular: ViewModel for safe two-way binding & MVVM
Introduction: Any angular dev should know that Angular tends to provide multiple ways of doing things. When it comes to forms, I tend to prefer to rely on forms of the template-driven variety, and ...
2
votes
1
answer
48
views
Observe LiveData to indicate whether or not to display TextViews in MVVM
In the context of MVVM, is this an efficient way to communicate to the view that I should display some TextViews? Any advice on how I can improve it?
ViewModel code:
...
1
vote
0
answers
44
views
Observe task time and update accordingly
I am building TODO app using MVVM pattern. I have a recycler view that holds all the daily tasks.
My goal was to update the task to be "complete task" and change the row layout when it's ...
3
votes
0
answers
1k
views
Jetpack compose login screen + ViewModel
Im working on the login screen for my application. It has fields for users email and password. Also users can click on forgot password button to send an email with new passsword. It can validate these ...
1
vote
1
answer
255
views
API call to list top stories using dependency injection in iOS with MVVM
I'm currently trying to find out what's the best networking architecture for MVVM applications. I couldn't find many resources and decided to go with dependency injection based architecture as per the ...
2
votes
0
answers
179
views
Android architecture and dependency injection of domain layer usecases
I am implementing some of the architectural designs from Google I/O's app to my own app, but I have come across something in their app that has created some confusion for me.
They have a domain layer ...
1
vote
1
answer
83
views
ViewModel for meetings and rentals
I am bringing up to date an old Xamarin app. I am concerned mostly with any design patterns I should be using or anti-patterns I shouldn't be using. This is my first attempt creating a ...
2
votes
3
answers
214
views
Is this method for loading data in a C# application recommended?
Goal
I'd like to understand if this current method, of loading data and inserting data into a database I currently use is to be avoided?
Code
I drafted a simple application that loads data and inserts ...
4
votes
0
answers
88
views
License-holder editing application
I am building a WPF (Windows Presentation Foundation) application. And I'm trying to use the MVVM (Model–View–ViewModel) design pattern. It's fascinating and rewarding, even though it seems overly ...
1
vote
2
answers
123
views
checking is ellipse is filled or not
following code below works fine but feels kind of a mess. Any one has a better way to do this?
I am creating a basic "Enter Pin" to unclick screen on an app. So if the user enters the 1st ...
1
vote
1
answer
526
views
Updating Multiple Collections In ViewModel Based On A Single ListView Selection - WPF
-I have a ListView, and its SelectedItem property is bound to EmployeeModel SelectedEmployee in my VM, and it implements the Set method from MVVM Light. (Basically, ...
2
votes
0
answers
913
views
Tic Tac Toe game using WPF+MVVM
I am looking for some advice on how to create a new ViewModel within an already existing ViewModel.
I am creating a Tic Tac Toe game, to improve my knowledge of the MVVM pattern, WPF and C#. I am ...
2
votes
0
answers
2k
views
C# Learning MVVM by creating a Login functionality
I am trying to get my head around how MVVM pattern works. Would like to hear some reviews if I am implementing it correctly.
View
...
2
votes
2
answers
1k
views
Create buttons with MVVM architecture
im trying to migrate my very large swift view controller to mvvm but it still feels very large, can you guys give me any advice
What this controller does is simple it shows a UIView on which i can ...
4
votes
0
answers
223
views
A better understanding for separation of concerns. Android; Kotlin
I am an Android developer with only 5 months of experience. I am still learning and trying to do my best.
Right now I am interested in concept of ...
2
votes
1
answer
89
views
Which is better-way to casting model
I need to convert my model to fit data in tableview cell finding better approach
...
11
votes
0
answers
355
views
Host-Agnostic Model-View-ViewModel Infrastructure
I've written an API that unlocks some serious MVVM capabilities with VBA's MSForms UI framework.
This is the complete code-behind for an example ...
0
votes
1
answer
4k
views
C# Event handler for WPF MVVM
So I've been learning about MVVM and I had a problem. I often had to start a thread to download or do some longer task in background and when it is done change some properties so the UI updates. The ...
4
votes
0
answers
635
views
Navigation strategies for a SwiftUI-based app using MVVM pattern
I'm finding it difficult to decide on the best architectural pattern for a SwiftUI app but, for the moment, I'm sticking with MVVM as I found this a good fit conceptually.
I'm trying to avoid the ...
3
votes
0
answers
1k
views
Simple MVVM Navigation for WPF in c#
I have been learning MVVM and I have decided to create a small framework for simple MVVM programs I can make in the future. This program provides navigation between a main menu, settings menu, start ...
4
votes
2
answers
241
views
Sanity check a simple RPG character
I'm writing an assistant for the tabletop RPG Pathfinder in Java. I intend to use the MVVM pattern using JavaFX, possibly through mvvmFX. Before I go into the V-VM phase, I have built a first ...
4
votes
1
answer
626
views
Configuring NavigationService and NavigationView in one place
Context
The main goal located a configuration NavigationService and NavigationView in one place. In order to minimalization a ...
3
votes
0
answers
815
views
WPF: An implementation of INotifyDataErrorInfo
An abstract base class which derives from the ObservableObject (MvvmLight), implementing the INotifyDataErrorInfo interface.
...
3
votes
1
answer
148
views
Android - Simplify ViewModel and Repository classes with OOP
Let's say I have 2 repository classes:
...
1
vote
2
answers
214
views
Async Check for Domain Fullname With WPF and Caliburn.Micro
I have a small WPF program built using Caliburn.Micro which checks Active Directory for a user with the current username of the logged-on user. I have a Bootstrapper...
2
votes
0
answers
400
views
Is this an acceptable MVVM Model with IEditableObject implementation?
I'm trying to follow MVVM pattern in a VB.net WPF application, and I would like to implement IEditableObject.
Is this code acceptable for an MVVM application? In ...
6
votes
1
answer
888
views
WPF MVVM ColorLister with navigation
By hashing together various online tutorials I've constructed my first MVVM application that lets users navigate between "tabs" and a "tab" (ColorList_Tab) that performs basic list functions such as ...
3
votes
1
answer
101
views
ViewModels for image transformations
In my project I have a chain of Fragments where each one gets a bitmap, manipulates it, then sends it to another fragment for more processing.
My fragment chain looks like this:
CaptureFragment -> ...
5
votes
2
answers
232
views
MVVM model letting the user select a directory in a testable manner
My application needs to let the user select a folder from somewhere on their local machine. Below are the interface and model pair that I have written to let the user do so.
...
2
votes
0
answers
146
views
Swift MVVM: Repositories - loading entities and dependency injection
I create a lexikon and a navigation for ZOO. I use MVVM architecture supported by ReactiveSwift. I have a few questions about my practises and whether I could write my repositories better and more ...
-1
votes
1
answer
50
views
Is attempt like this, when using Application class, breaking MVVM pattern? [closed]
In my application I am using two view models. MainViewModel if fiered when MianWindow is initialized. And UpdateViewModel is fiered when UpdateWindow is initialized.
The update VM is supposed to use ...
5
votes
1
answer
208
views
Scraping an parsing jockeys data using Task.Run
I started to have HUGE doubts regarding my code and I need some advice from more experienced programmers and architects.
On the button click, the application runs a method, that is running a ...
3
votes
1
answer
2k
views
Create Products TableView with PAGINATION and LIKE product feature in RxSwift MVVM
I have tried to develop a simple product listing app in RxSwift with MVVM design pattern. I have managed to achieve it but I need someone to review my code, such as:
Have I followed the proper ...
4
votes
1
answer
168
views
Android clock in/out app
I am writing a clock in / out and payroll app for Android. I am no professional, but I was hoping I could get some feedback on whether my code is spaghetti or not. This is just one of many classes &...
3
votes
1
answer
1k
views
Login page using RxSwift in MVVM
I am building a simple login page which will check for username before navigating to another screen and here is how I am doing the binding now. I would like to know if I am doing it right and if I am ...
2
votes
0
answers
2k
views
Setting the Owner property on a modal dialog in WPF/MVVM using a Func
I'm looking to solve the problem of setting the Owner property on modal dialogs in WPF, while using IoC and MVVM patterns. I've seen (and written) all sorts of ...
1
vote
1
answer
615
views
Addition Program using wpf through MVVM
I'm new to MVVM and WPF. Please suggest whether this is okay or I need to correct my understanding of MVVM which I confess is very limited as at the moment.
I have created a simple addition ...
12
votes
1
answer
10k
views
Filter Collection by Multiple Criteria
I want to the user to filter a list of receipts by various criteria. Just the regular, an empty filter should show all items, an entry in customer should show all receipts from that customer and an ...
10
votes
1
answer
241
views
Visual Studio exception visualizer for lengthy exception messages
I use Autofac a lot and for everything and when you make a mistake and forget to register a dependency etc. it'll tell you exaclty what's wrong. Although its ...
1
vote
2
answers
2k
views
Android MVVM application architecture
Inspired this guide: https://developer.android.com/jetpack/docs/guide
I try to build some app with similar architecture.
App interact with remote API via http protocol (json responses from server). ...
1
vote
1
answer
6k
views
Flutter - Implementing a simple ListView with MVVM
I've implemented a simple ListView in MVVM that displays a few PrepSteps (short form of PreparationSteps). While implementing I wasn't sure about if my approach is "...
1
vote
0
answers
2k
views
LiveData, MVVM and Repository Pattern
Is this a good approach or I've just found a nasty workaround?
I'm using MediatorLiveData class because seems useful to update the source of a ...
1
vote
1
answer
1k
views
MVVMLight Toolkit Data Binding Technique
I'm simulating my real-world application by using a really simple demo app here, but it has the same concept. The question is MVVM Light Toolkit specific, as the ...
5
votes
1
answer
1k
views
Accessing View from ViewModel
Having a view (grid control) that provides some functionallity via methods (primary SerializeView / DeserializeView) that should be called from the view model which is bound to the view.
One point to ...
-1
votes
1
answer
84
views
Model Exposure with MVVM [closed]
I have been starting to learn MVVM to give my WPF projects better structure.
I have to sample classes, DeviceModel and ...