Chapter 4. XamChat – a Cross-platform App

The best way to truly learn a programming skill, in my opinion, is to take on a simple project that requires you to exercise that skill. This gives new developers a project where they can focus on the concepts they are trying to learn without the overhead of fixing bugs or following customer requirements. To increase our understanding of Xamarin and cross-platform development, let's develop a simple app called XamChat for iOS and Android.

In this chapter, we will cover the following topics:

  • Our sample application concept
  • The Model layer of our application
  • Mocking a web service
  • The ViewModel layer of our application
  • Writing unit tests

Starting our sample application concept

The concept is simple: a chat application that uses a standard Internet connection as an alternative to send text messages. There are several popular applications like this on the Apple App Store, probably due to the cost of text messaging and support for devices such as the iPod Touch or iPad. This will be a neat real-world example that can be useful for users, and will cover specific topics in developing applications for iOS and Android.

Before we start with the development, let's list the set of screens that we'll need:

  • Login / sign up: This screen will include a standard login and sign-up process for the user
  • List of conversations: This screen will include a button to start a new conversation
  • List of friends: This screen will provide a way to add new friends when we start a new conversation
  • Conversation: This screen will have a list of messages between you and another user, and an option to reply

So a quick wireframe layout of the application will help you grasp a better understanding of the layout of the app. The following figure shows you the set of screens to be included in your app:

Starting our sample application concept
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.228.246