Local storage can be needed for a number of things, user preferences, security tokens or caching downloaded data. What I will go through in this post is where and some ways to retain information locally on the device. The common ones are: Keychain / KeyStore NSUserDefaults / SharedPreferences Internal (Application) Storage External Storage SQLite (though […]

Security and authentication usually end in an annoyance for users and developers but unless everyone in the world pinky swears they won’t do anything bad we need to protect users from bad actors in the system. The degree of security required is normally based upon the sensitivity of the data being used. However I always […]

The repository layer is where your connection to data stores or information occurs, bring back the data and convert it to a business entity. On mobile apps it is most common to see a direct connection to an API or a connection to a local SQLite DB that I will talk about further in the series. While […]

Xamarin Forms provides a mechanism to allow loosely coupled event management across the entire app called MessagingCenter. It is based on a common architecture in enterprise level applications simply called the messaging design pattern. In order to keep Models and ViewModels separated they should never reference each other but we occasionally need to send information […]

Models are where the majority of business logic is stored in the mobile app, it retrieves the data, reads and populates the properties in the model. The model also holds the state of that particular part of the application. In keeping with the silo approach, models should only talk to the repositories necessary and be […]

Complex page workflows can become a burden unless you separate the workflows into different stacks. The most common page workflow you will encounter is the Authentication and Main App workflow. Why do we separate these? The authentication workflow (the login page or register page) shouldn’t be accessible from the main application and the main application […]

A ViewModel is the orchestrator between the View and Model. ViewModels are designed to be as simple as possible, with no business logic inside them but small logic to handle routing of messages to and from the View and other Models within the app. As mentioned in day 3 we bind the ViewModel to the View […]

Most navigation service helpers or code I have come across just construct a new instance of a page and pass it to the stack, normally within the navigation service. I prefer to implement a factory pattern to build the page as it lets you control the page to finer degree and you can swap out […]

In Xamarin Forms you access navigation via the NavigationPage. A single NavigationPage contains all the page you Push to the stack and you pop them out when done. Its works like exactly like a LIFO (Last In First Out) queue. Its easy and simple but not if you want to keep any form of control over the Navigation […]

In maintaining and building any large scale application, you need to develop with low dependencies and develop silo’s of responsibility and control. This lends the application to easier testing, less repetition of code, easier debugging and much easier to work on in larger teams. MVVM Pattern One of Microsoft’s awesome patterns that fits in so […]