Styling UI/UX (Day 11)

Xamarin Forms has an interesting challenge here. Have one UI that looks native and acts native on all platforms. Its a tough call but one that was answered rather well, with a few exceptions. It works well but honestly the FontSize has to be my biggest issue here. Why did it have to render differently […]

Read More >

Local Storage (Day 10)

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 […]

Read More >

Security and Authentication (Day 9)

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 […]

Read More >

Repository Layer (Day 8)

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 […]

Read More >

Messenger Service (Day 7)

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 […]

Read More >

Models and Service Layer (Day 6)

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 […]

Read More >

Separate Navigation Stacks (Day 5)

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 […]

Read More >

The ViewModel (Day 4)

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 […]

Read More >

Page Building and Cleanup (Day 3)

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 […]

Read More >

Navigation Service (Day 2)

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 […]

Read More >