As the view-models are the central part of MVVM apps we get IoC for wast majority of the app just with this alone. What I like to do is having view-models instantiated automatically using a IOC container so all the constructor injection takes place. The view-model contains all the UI logic and connect to other service classes – for example to retrieve data from a server. Means we do a view using XAML (or C#) and connect it with a view-model using data-binding. But it also has a sample implementation in this GitHub repo which was very helpful.įor Xamarin Forms the recommended pattern for non-trivial apps is the MVVM pattern. It contains mostly general information about dependency injection, inversion of control and so on. The Dependency Injection documentation got me half way started. There are libraries and article but most of them are outdated or even discontinued. I quickly got a screen working but missed a full fledged IOC container with proper constructor injection. Its also an excellent opportunity to refresh my XAML know-how. Because the goal is to have as much shared code between iOS and Android as possible and still have native apps experience I choose the Xamarin Forms stack. I started a new little project in my spare time which is a native mobile app for iOS and Android.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |