Book Image

Kotlin Blueprints

By : Ashish Belagali, Akshay Chordiya, Hardik Trivedi
Book Image

Kotlin Blueprints

By: Ashish Belagali, Akshay Chordiya, Hardik Trivedi

Overview of this book

Kotlin is a powerful language that has applications in a wide variety of fields. It is a concise, safe, interoperable, and tool-friendly language. The Android team has also announced first-class support for Kotlin, which is an added boost to the language. Kotlin’s growth is fueled through carefully designed business and technology benefits. The collection of projects demonstrates the versatility of the language and enables you to build standalone applications on your own. You’ll build comprehensive applications using the various features of Kotlin. Scale, performance, and high availability lie at the heart of the projects, and the lessons learned throughout this book. You’ll learn how to build a social media aggregator app that will help you efficiently track various feeds, develop a geospatial webservice with Kotlin and Spring Boot, build responsive web applications with Kotlin, build a REST API for a news feed reader, and build a server-side chat application with Kotlin. It also covers the various libraries and frameworks used in the projects. Through the course of building applications, you’ll not only get to grips with the various features of Kotlin, but you’ll also discover how to design and prototype professional-grade applications.
Table of Contents (16 chapters)
Title Page
About the Authors
About the Reviewer
Customer Feedback

Let's build our news application

We are going to build a news feed application to understand how to build a web application using Ktor and Kotlin. You will learn how to use Ktor and Kotlin to build a robust and testable web application  quickly with minimal effort or constraints, while also having fun with Kotlin's features.

The idea is to build a RESTful news feed application that will show a list of the latest news from various sources such as Google News. It doesn't generate the news itself. It fetches the news from various news sources.

News provider

We will be using News API from to fetch the latest news from various sources. It is a simple, free, and easy-to-use API that returns JSON from over 70 different sources. It is recommended to get an API key from News API because we will require it in our application later to fetch the news.

There are two APIs provided by the news provider—one to fetch news sources, and a second to fetch news articles.

Fetching news sources...