Oct 19, 2010 at 1:06 AM
Edited Oct 19, 2010 at 1:06 AM
Some time ago I ported Rob's GameLibrary demo to CM; it demonstrates almost all the features you mentioned.
Have a look at it in my fork: https://hg01.codeplex.com/forks/marcoamendola/caliburnmicromarcoamendolafork
in the /samples/GameLibrary directory.
For a screen executing actions on its initialization, see ShellViewModel.OnInitialize override.
In SearchViewModel.ExecuteSearch you can find an example of coroutines, with the use of a "busy" indicator.
For an example of IResult dealing with asynchronous WCF services, you may have a look at the WebServiceResult class in one of the Caliburn samples: http://caliburn.codeplex.com/SourceControl/changeset/view/55862#1239638
About the MVVM/MVP thing, I suggest you to study the ExploreGameViewModel in the sample.
ExploreGameViewModel holds a reference to a single Game (public GameDTO Game) which is the main "subject" of the screen.
GameDTO contains all bindable data, while ExploreGameViewModel owns some methods (CheckIn/CheckOut) that execute activities on the subject, then call a service; it may also update the GameDTO at the end of server operation (thus refreshing the view).
Let's forget for a moment ExploreGameViewModel name and pretend it is called ExploreGameViewPresenter: you pretty much have the ViewModel (GameDTO) / Presenter (ExploreGameViewPresenter) separation.
I know: ExploreGameViewModel actually has other properties, but you can simply move them in the VM.
Plus, to be fair, GameDTO is... well, a DTO, not a ViewModel; this was mostly done for simplicity: since it is read-only in that context, there was no need to map it to a full featured INotifyPropertyChanged object.
Does it make sense?