Desktop client
Visual Studio project:
MementoClient
The desktop client is a WPF application which uses the MVVM pattern, implemented using the
MVVMLight Toolkit. The project therefore uses the lightweight DI framework SimpleIoC (included in MVVMLight), so the dependencies are set up within the ViewModelLocator.cs class, for example:
public ViewModelLocator()
{
ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default);
SimpleIoc.Default.Register<IClientConnectorRetriever, ClientConnectorRetriever>();
SimpleIoc.Default.Register<IUserTasksRetriever, UserTasksRetriever>();
SimpleIoc.Default.Register<IGetAsyncService, GetAsyncService>();
SimpleIoc.Default.Register<IDataRepository, DataRepository>();
SimpleIoc.Default.Register<MainViewModel>();
}
Screen | ViewModel |
Main application page | MainViewModel.cs |
All Memento clients interact with the Memento database via a RESTful service layer. The desktop client uses the
RestSharp library to reduce the amount of boilerplate code and simplify the interaction with the web service layer.