MVVM and Login Windows -
MVVM and Login Windows -
i'm writing first "real" mvvm application, , first step user need take provide login credentials. in past, have shown login dialog after main window has been laid out , made visible first time.
what preferred way of doing in mvvm world, , why?
i see many options, 1 of go on doing way i've done before, it's one-time step , won't interfere rest of "mvvm-ness" of application. 1 time user has logged in, initialize mainwindow
's modelview credentials , go on on way. alternative allow modelview cause login dialog shown (somehow). mvvm gurus prefer either of these?
(there 1 other option, showing login dialog first, , when dismissed, create main window. technically solve dilemma, wouldn't educate me, nor aesthetics of having "naked" login dialog.)
the model-view-viewmodel pattern doesn't tell how define ui workflow. free take appropriate workflow ourself. prefer first approach because simple , straight forwards implement. workflow:
show empty main window show login dialog initialize main window user credentialswould in responsibility of controller (e.g. applicationcontroller). how might shown in viewmodel sample application of wpf application framework (waf).
mvvm
Comments
Post a Comment