Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
lawrence_shaun_introducing_net_maui_build_and_deploy_crosspl.pdf
Скачиваний:
46
Добавлен:
26.06.2023
Размер:
5.15 Mб
Скачать

CHAPTER 10

Remote Data

In this chapter, you will be exploring the topic of remote data, learning what exactly it is, types of it, how to interact with it, and what to consider when doing so. You will then build upon this learning by building a new widget:, the Weather Widget, to display the current weather. This will be done by interacting directly with the Open Weather API. You will get exposure to handling HTTP requests and responses with an API, how to handle the response being in a JSON format and the varying levels of

flexibility when mapping to the JSON data. You will finish off by simplifying the implementation with a fantastic NuGet package that generates source code for you, simply from an interface you define to represent the web service.

What Is Remote Data?

Remote data is any data that is sourced from outside the device your application is running on. This can range from querying a web API in order to obtain data, utilizing a cloud-based database provider, images hosted online, streaming video or audio data, and more.

The vast majority of applications will interact with some form of remote endpoint in order to pull data. In this world of constantly changing data, this becomes an essential part of practically any application.

© Shaun Lawrence 2023

299

S. Lawrence, Introducing .NET MAUI, https://doi.org/10.1007/978-1-4842-9234-1_10