Chapter 5. Building a Stocklist Application

In this chapter, we step back into Xamarin.Forms and look at detailing our XAML interfaces using CustomRenderers, Styles, and ControlTemplates. We will also look at the use of animations and a basic introduction to compound animations. Then, we are going to build a simple web service providing our mobile application with a JSON feed.

Expected knowledge:

  • JSON serialization/deserialization
  • Some understanding of API controllers
  • Visual Studio
  • Some understanding of Linq queries
  • Some understanding of Observables and IObservables
  • Some knowledge of IIS

In this chapter, you will learn the following:

  • Understanding the backend
  • Creating an ASP.Net Web API 2 project
  • Building an API controller
  • Setting up mobile projects
  • Building core mobile projects
  • Improving app performance
  • Creating a global App.xaml
  • Theming with ControlTemplates
  • Updating the MainPageViewModel
  • Creating Stocklist web service controller
  • ListViews and ObservableCollections
  • Value converters
  • Styles
  • Further optimization with XAML
  • Creating StockItemDetailsPage
  • Custom renderers
  • Adding styles for custom elements
  • Creating the StockItemDetailsPageViewModel
  • Setting up native platform projects
  • Hosting the Web API project locally

Understanding the backend

As mobile developers, we are client side developers. We build user interfaces and absorb JSON data from web services. One advantage of developing in both server and client is the ability to tailor the back end to meet the needs of the mobile application. This can result in enhancing performance with data transactions on a web API. Building fast and reliable mobile applications can be difficult if we have to build off an old, slow-running back end. If users experience slow and unstable applications, they will normally never return to use it again.

In this example, we will build a simple web service that our mobile application will use. Let's begin by opening up Visual Studio.

..................Content has been hidden....................

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