‫Welcome back.
‫In this video, we'll define some important concepts and terms that we'll see them when dealing with
‫online databases.
‫Let's start with the Web services.
‫Apps need Web servers to get data, upload data authentication, store images, upload files, and much
‫more use cases.
‫Web services usually has a rest API for the communication.
‫The rest API provides different URLs to get data.
‫Then from the app, we need to make an Http request to an URL.
‫Http request will also contain headers and other data for path and query parameters.
‫After receiving our request, the API sends back a response object to the app.
‫This response object contains a response code info about success or failure of the request.
‫This is the general idea about getting the data from online databases to our apps.
‫In the following videos, we'll follow step by step in order to get the data and display it in our applications.
‫Let's define the API.
‫API stands for Application Programming Interface.
‫This interface allows people to further build upon another application's functionality and data.
‫One might understand them as building blocks you can use to make almost anything as they can found in
‫everything from Spotify, Yahoo, Finance, Google, Facebook, Twitter and other big websites.
‫For example, imagine you are developing a weather app that provides users with current weather information
‫for their location to gather weather data.
‫You don't want to build your own weather monitoring system or collect data manually.
‫Instead, you can leverage external APIs provided by weather services like Openweathermap or Weather
‫Channel.
‫APIs, enable developers to access and use services, data or features from other applications, services
‫or platforms within their own apps.
‫Now let's move to learn about Json.
‫The received data will be in Json format and the app needs to parse those Json formatted data to Java
‫or Kotlin and display them to the user.
‫Json stands for JavaScript object notation.
‫Json is lightweight format for storing and transporting data.
‫Json is often used when data is sent from a server to a web page.
‫It's easy for humans to read and write and it's easy for machines to parse and generate.
‫Json is often used in web development and data transmission because of its simplicity and compatibility
‫with various programming languages.
‫Json data is represented as key value pairs and structured using objects and arrays, making it a popular
‫choice for representing structured data.
‫Later on we'll deep dive into Json formats and Json syntax and here comes our friend Retrofit.
‫Retrofit is a popular library for making network requests in Android applications.
‫It provides several benefits and features that make it a preferred choice.
‫For many Android developers, retrofit simplifies the process of making Http requests by abstracting
‫away many of the low level details.
‫You can define API endpoints as Java interfaces, which makes your code more organized and readable.
‫Retrofit is type safe, meaning it generates code to ensure that the data you receive from the API matches
‫the expected data structure.
‫This helps catch errors at compile time rather than runtime.
‫Reducing the like likelihood of crashes retrofit can automatically convert Json responses from the server
‫into Java or Kotlin object using a library like Json.
‫This eliminates the need to manually parse Json data and this is what we're going to use in our applications.
‫Once the data is downloaded, then it is parsed into a plain old Java object Pojo, which must be defined
‫for each resource in the response.
‫Overall retrofit simplifies the process of.
‫Working with APIs in Android improves code readability and enhances the reliability and maintainability
‫of your network code.
‫It has become a standard library for many Android developers due to its many advantages.
‫We're going to build an amazing application that has many, many concepts I want from you to focus with
‫me in this app because there are many concepts, many new ideas, many algorithms, many patterns.
‫And of course we're going to follow the mvvm architecture, what we're going to make.
‫We'll start fetching the data and building our API from Tmdb, the movie database website.
‫We're going to fetch it as Json files.
‫This Json files will be converted using retrofit, and this retrofit will help us to create Pojo.
‫Plain old Java objects resulted from the Json response and these objects will be transformed either
‫to the room database and stored into the database or to the API and display the list of movies to our
‫user.
‫I want from you to follow me step by step in all of these sections from understanding the API, understanding
‫Json syntax using retrofit in our applications, creating Pojo objects, fetching the data from Pojo
‫objects to the API and storing them into room database later on.
‫Let's jump into Android studio and start learning deeply about these concepts.