Chapter 3. Navigation Service
The overarching goal of this book is to show how you can build a solid architecture based on design patterns and best practices; the objective of this chapter is to take our TripLog app one step closer to achieving that goal. By introducing MVVM into our TripLog app in Chapter 2, MVVM and DataBinding, we set up the app with a very clear pattern to separate the user interface from the rest of the logic in the app. Each subsequent chapter, starting with this one, further advances this concept of separation.
In Chapter 2, MVVM and DataBinding, we moved a large portion of the app logic into ViewModels; however, navigation is still being initiated from the pages (or views). In this chapter, we're going to move navigation into ViewModels as well.
Here is a quick look at what we'll cover in this chapter:
- Understanding the basics of the Xamarin.Forms navigation API
- Thinking about navigation in MVVM
- Creating a navigation service
- Updating the TripLog app...