Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Spring for Android Application Development

You're reading from   Learn Spring for Android Application Development Build robust Android applications with Kotlin 1.3 and Spring 5

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher Packt
ISBN-13 9781789349252
Length 392 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
S. M. Mohi Us Sunnat S. M. Mohi Us Sunnat
Author Profile Icon S. M. Mohi Us Sunnat
S. M. Mohi Us Sunnat
Igor Kucherenko Igor Kucherenko
Author Profile Icon Igor Kucherenko
Igor Kucherenko
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. About the Environment FREE CHAPTER 2. Overview of Kotlin 3. Overview of Spring Framework 4. Spring Modules for Android 5. Securing Applications with Spring Security 6. Accessing the Database 7. Concurrency 8. Reactive Programming 9. Creating an Application 10. Testing an Application 11. Assessments 12. Other Books You May Enjoy

What this book covers

Chapter 1, About the Environment, creates an environment for both the server side and client side. We will also look into the types of tools that will be needed for the project. We will also understand what we can create with a platform using Spring and Android.

Chapter 2, Overview of Kotlin, covers the basics of Kotlin and examines how to set up the environment and which tools or IDEs are available for Kotlin, including basic syntax and types. We will see the flow structures, including if-else statements, for loops, and while loops. We will also look into the object-oriented programming for Kotlin and cover classes, interfaces, objects, and so on. Functions will also be covered, along with parameters, constructors, and syntax. We will also explain null safety, reflection, and annotations, which are the core features of Kotlin.

Chapter 3, Overview of Spring Framework, covers the basics of Spring Framework and readers will learn how to configure Spring and beans. Dependency injection will be explained in this chapter, along with the architecture of Spring. Readers will learn about Spring MVC and Spring Boot, which are helpful for developing the application as quickly as possible. Spring Data modules will also be explained. We will also cover Spring Security, which provides authentication and other securities for the applications.

Chapter 4, Spring Modules for Android, covers the RestTemplate and Retrofit modules that are connected to the Android projects. An explanation of HTTP clients is provided. Objects to JSON marshaling will also be covered. We will learn how to start and set up the environment. HTTP request methods for both the RestTemplate and Retrofit modules, such as POST, GET, UPDATE, and DELETE, will also be covered, along with the common functionality of other Spring modules and Maven dependency management.

Chapter 5, Securing Applications with Spring Security, covers the requirements for Spring Security. We will learn how to register and configure security and authentication in the web server. We will also learn about the architecture of Spring Security and how to use it for clients. We will see the approach to securing an API for Android application and what the security flow will be. We will learn how to use Spring Security in relation to the REST API. Use of the basic authentication, OAuth2, implicit flow, and the authorization code flow will also be discussed. We will also learn how to connect with Android projects and use basic authentication.

Chapter 6, Accessing the Database, covers the existing Spring data modules. We will also cover JDBC, JPA, H2, MySQL for Spring, and SQLite Room for Android. We will also learn about the use of JPA to create REST API in Spring and fetch the APIs and handle the contents in Android.

Chapter 7, Concurrency, covers coroutines, including topics such as concurrency, parallelism, and thread pools. We will also learn about sequential operations and callback hell.

Chapter 8, Reactive Programming, covers reactive programming-related topics, including Spring Reactor and blocking. Readers will also learn about RxJava and RxAndroid in this chapter.

Chapter 9, Creating an Application, starts with the installation of the Android environment. We will then configure Spring on the web server and make a project design. We will then create UI, layout, and RESTful web services and retrieve JSON from the APIs. We will also learn to use Spring Boot and Spring Security for the app. We will then learn how to use Basic Auth to secure the data and give access to users. We will use secured REST API for an Android app and how to handle contents in Android. This application will be based on Kotlin, and we will be taking advantage of the features of Kotlin features, features including null safety, reflection, and annotation, in this application.

Chapter 10, Testing an Application, deals with Spring testing. This includes unit, integration, and UI testing, and their uses. We will get to know the test structure for the project, along with the testing tools such as JUnit and Espresso. Test cases for JUnit and JPA will also be discussed. We will learn how to write UI test cases for the Android application. We will also learn to execute these tests via Android Studio. We will also learn how to test UI using Espresso in Kotlin, and its uses in relation to Kotlin in the Android app. We will also look into concurrency and reactive programming in the application.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image