Android application development with Kotlin
265 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris

Android application development with Kotlin , livre ebook

-

Découvre YouScribe en t'inscrivant gratuitement

Je m'inscris
Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus
265 pages
English

Vous pourrez modifier la taille du texte de cet ouvrage

Obtenez un accès à la bibliothèque pour le consulter en ligne
En savoir plus

Description

Unleash the Power of Kotlin for Android App DevelopmentDESCRIPTION This book aims to provide the knowledge around the fundamental concept of Kotlin languages, and it's an application in Android application development. It covers basic to advanced concepts with practical examples. Each chapter in this book is a step by step journey towards the learning Kotlin and excel in various topics and concepts. It covers topics like data types, various functions, including lambdas and higher-order functions. It also covers advanced topics like Generics, Collections, DSL, Coroutine, etc. Most importantly, such concepts are explained with practical usage of it in Android application. You will get to know what is the best possible way to use these concepts while you develop an Android application. In this book, along with Kotlin, an attempt has been made where few Android-specific topics are also explained. For example, the application is using Architecture components, including ViewModel, LiveData, NavigationComponent, and also it uses Flow, which is a hot topic in Kotlin. While we learn this concept, along with that, we also develop a sample application where we can apply our learning and, in the end, have some tangible and measurable output.Readers with little previous knowledge of Android application development can easily follow this book. Most of the chapters are code-heavy and focuses on practical usage of Kotlin's features. Each chapter has code on the GitHub. You can check out this code and try it out. Or you can develop in parallel and cherry-pick things from the sample code base as and when you need it. Few chapters also follow the quiz at the end, and you can self assess yourself by going through that quiz. In total there are ten chapters.KEY FEATURES - The book has theories explained elaborately along with Kotlin code and corresponding output to support the theoretical explanations. The Kotlin codes are provided with step-by-step comments to explain each instruction of the code.- The book is quite well balanced with programs and illustrative real-case problems. - The book is not just explaining theoretical concepts of the language. Still, it explains how the full-fledged application can be developed using some latest tools and technologies and create an excellent Android application using Kotlin.- Few of the chapter offers the quiz at the end of it. And you can revise the concepts quickly.- A rich sample application is created to demonstrate Kotlin's capability in various parts of the application.- Quite the latest concepts are discussed in depth. For example, Flow, NavigationComponent, Coroutine, ViewModel, and LiveData.WHAT WILL YOU LEARN - Know the basics and many advanced concepts of Android.Able to code in Kotlin for your Android application.- You will know how architecture components can be used in Android application with Kotlin.- Writing tests that use coroutine, Flow, LiveData, and ViewModel.- What measures you need to take before you put an application in production.- How agile practices can be applied before and after the application development is started.WHO THIS BOOK IS FOR The book is for readers with basic programming and android application development skills. The book is for any engineering graduates that wish to use Kotlin as a programming language for their Android application or wish to build a career in this direction. This book can also be useful for those who want to learn how testing aspects work for Android applications. The use cases and programs discussed in the book are self-explanatory and detailed with practical examples wherever necessary. This is why the book can be read by anyone who has an interest in Kotlin and Android and how applications are developed with the industry level standard maintained. TABLE OF CONTENTS1. Getting started with Kotlin for Android2. Kotlin Fundamentals3. Go to the Depth of Kotlin4. Design Patterns in Kotlin5. Analyzing and Architecting a Meal Recipe App6. Making Network Calls Using Coroutines7. Kotlin-ize remaining of your app8. Testing the Kotlin Code9. Make Your App Production Ready10. Kotlin EverywhereAUTHOR BIO Hardik Trivedi is a computer programmer and self-taught Android application development. He started Android application development back in 2010. He is a Kotlin enthusiast and an active community speaker. He actively contributes to Stack overflow and also writes a blog. An Android application developer on his job, he has worked in numerous domains, for example, consumer internet, sports, banking, entertainment. He also mentors college students and professionals who want to develop their career in Android application development. As an active contributor in the community, he has delivered speeches for events hosted by GDG (Google Developer Group). He is already a co-author of "Kotlin Blueprints" - A book that explains how Kotlin can be used everywhere. In his personal life, he loves to travel, paint, and cook. In his retirement days, you may find him owning a restaurant and making lip-smacking food for his customers.Your Blog links: - https://trivedihardik.wordpress.com/Your LinkedIn Profiles: LinkedIn Profile of Hardik Trivedi available at https://www.linkedin.com/in/hardik-trivedi-a782381a/

Sujets

Informations

Publié par
Date de parution 12 mai 2020
Nombre de lectures 7
EAN13 9789389423518
Langue English

Informations légales : prix de location à la page 0,0600€. Cette information est donnée uniquement à titre indicatif conformément à la législation en vigueur.

Extrait

Android Application Development with Kotlin

Build Your First Android App in No Time

by
Hardik Trivedi
FIRST EDITION 2020
Copyright © BPB Publications, India
ISBN: 978-93-89423-501
All Rights Reserved. No part of this publication may be reproduced or distributed in any form or by any means or stored in a database or retrieval system, without the prior written permission of the publisher with the exception to the program listings which may be entered, stored and executed in a computer system, but they can not be reproduced by the means of publication.
LIMITS OF LIABILITY AND DISCLAIMER OF WARRANTY
The information contained in this book is true to correct and the best of author’s & publisher’s knowledge. The author has made every effort to ensure the accuracy of these publications, but cannot be held responsible for any loss or damage arising from any information in this book.
All trademarks referred to in the book are acknowledged as properties of their respective owners.
Distributors:
BPB PUBLICATIONS
20, Ansari Road, Darya Ganj
New Delhi-110002
Ph: 23254990/23254991
MICRO MEDIA
Shop No. 5, Mahendra Chambers,
150 DN Rd. Next to Capital Cinema,
V.T. (C.S.T.) Station, MUMBAI-400 001
Ph: 22078296/22078297
DECCAN AGENCIES
4-3-329, Bank Street,
Hyderabad-500195
Ph: 24756967/24756400
BPB BOOK CENTRE
376 Old Lajpat Rai Market,
Delhi-110006
Ph: 23861747
Published by Manish Jain for BPB Publications, 20 Ansari Road, Darya Ganj, New Delhi-110002 and Printed by him at Repro India Ltd, Mumbai
Dedicated to
All the fervent learners who flourish to explore and learn for knowledge building
About the Author
Hardik Trivedi is a computer programmer and a self-taught Android application development. He started Android application development back in 2010. He is a Kotlin enthusiast and an active community speaker. He actively contributes to Stack overflow and also writes a blog. An Android application developer on his job, he has worked in numerous domains, for example, consumer internet, sports, banking, entertainment. He also mentors college students and professionals who want to develop their career in Android application development. As an active contributor in the community, he has delivered speeches for events hosted by GDG (Google Developer Group). He is already a co-author of “Kotlin Blueprints” – A book that explains how Kotlin can be used everywhere.
In his personal life, he loves to travel, paint, and cook. In his retirement days, you may find him owning a restaurant and making lip-smacking food for his customers.
Acknowledgement
All innovation can not be done without unpredicted hurdles. To overcome this and continue with the research along with the knowledge, you must need the support of supreme powers. I thank the supreme power of God, who kept me motivated enough to work on this book in my spare time.
My family kept me courageous enough for months. I was stealing time from my family and used to write books on those hours. I acknowledge their sacrifice. My sincere thanks to them.
I would also like to take the opportunity to thank many other contributors in the community whose research helped me to extend my research work. A salute to all those developers.
Last but not least, I thank BPB publications, who were involved in this book. Without them, it would not have been possible.
Preface
This book aims to provide the knowledge around the fundamental concept of Kotlin languages, and it’s an application in Android application development. It covers basic to advanced concepts with practical examples. Each chapter in this book is a step by step journey towards the learning Kotlin and excel in various topics and concepts. It covers topics like data types, various functions, including lambdas and higher-order functions. It also covers advance topics like Generics, Collections, DSL, Coroutine, etc.
Most importantly, such concepts are explained with practical usage of it in Android application. You will get to know what is the best possible way to use these concepts while you develop an Android application. In this book, along with Kotlin, an attempt has been made where few Android-specific topics are also explained. For example, the application is using Architecture components, including ViewModel, LiveData, NavigationComponent, and also it uses Flow, which is a hot topic in Kotlin.
Readers with little previous knowledge of Android application development can easily follow this book. Most of the chapters are code-heavy and focuses on practical usage of Kotlin’s features. Each chapter has code on the GitHub. You can checkout this code and try it out. Or you can develop in parallel and cherry-pick things from the sample code base as and when you need it. Few chapters also follow the quiz at the end, and you can self assess yourself by going through that quiz. In total ten chapters, you will learn the following:
Chapter 1 focuses on setting up the development environment. You configure the tools and environment which you will need to learn and develop Android application. Also, you learn some very basics of Android, e.g., Android Components and how to work with those components. You will become familiar with Kotlin code style in this chapter. In the end, a simple “HelloWorld” Android application in Kotlin will be developed.
Chapter 2 takes on the voyage of learning Kotlin. You learn basics in this chapter. This chapter covers basics about data type and variables, function, string manipulation, control flow. It covers various types of functions including, inline and infix function. Everything is well explained by small yet practical examples. After functions, the chapter covers the concept of classes and properties. What differences Kotlin class as compare to Java class is well explained. It also has lots of tips and notes around IntelliJ IDEA. Error handling is also an attractive section in this chapter, which demonstrates how try-catch works in Kotlin. Scoping functions are very generously written and aim to give insight into it. And the most exciting part of this chapter is a quiz section. A total of 10 questions is designed, which will give a quick recap of the entire chapter in the end.
Chapter 3 is all about diving deep into the advance topics of Kotlin. The type of system delegated properties, lambdas, collections, and generics. You think of a topic, and it’s covered one or the other way in this chapter. It also covers DSL and annotations. This chapter is once again full of code snippets, tips, diagrams. In collections, only the topics which are specific to Kotlin are covered. The basics of the collection are the same as Java, so we have focused on the delta part. Generics also explain covariance and contravariance’s topic. And one more time total of 10 questions are designed, which will give the quick recap of the entire chapter in the end.
Chapter 4 introduces you to the most loved topic of software development, i.e., Design Patterns. The chapter covers a few of the design patterns. Kotlin handles a few design patterns well, e.g., Builder, Singleton, Decorator, Facade, Observer, and Chain of responsibility. A few of the Kotlin features are used to implement these design patterns in Kotlin’s way. A short but exciting chapter is covering the practical aspect of it.
Chapter 5 takes you into the working world of Kotlin and Android. Along with the development skill, this chapter also focuses on some other software development aspects. e.g., Requirement analysis, user story mapping, etc. These agile development approaches will help you in your day to day job. One must acquire these skills. The chapter explains the meal recipe application, which you will be developing as a learning project.
Along with requirement gathering for the meal recipe app, we also design layouts as well. Also, this chapter covers a new dependency injection framework named koin. A bit of styling and theming is also covered in this chapter. A right amount of writing has been made to explainthe general architecture and skeleton of the application. Topics like Repository, LiveData, ViewModel, and Navigation component are discussed here.
Chapter 6 is dedicated to connecting the application to the remote server. We bring the data from the server to the app. The repository layer of the app is in the center of the chapter. To make network calls since we are using coroutine, we have also discussed a concept about coroutine. Also, a very new topic at the time of writing the book is Flow. Flow is Kotlin’s attempt to manage the asynchronous data stream. Flow is well discussed here. Just go with the Flow!
Chapter 7 is reaching towards the end of the development of an Android application. Once we connect the application to the remote server, now this chapter focus on Kotlin-izing the remaining app. We give a bit of Kotlin touch in all other classes which we have created so far. ViewModels, LiveDatas, Activities, and Fragments, all classes are Kotlin-ized. Along with Kotlin’s features, we have discussed the error handling layer in this chapter. You also get to know how you can write your project’s build.gradle files into Kotlin using the concept of DSL.
Chapter 8 is dedicated to testing. An essential aspect of software development is many times neglected. Kotlin offers some super cool syntax to make nit testing fun. The chapter also covers the usage of jUnit5. Yes! A great effort has been made to do jUnit5 works for writing all unit test cases. It conceptually explains the testing and covers the Android recommended testing pyramid
Chapter 9 is all about making your application production-ready. You have to be well prepared with things like reporting tools, documentation, etc. This chapter focuses on all such aspects. Some of the features which Kotlin offers for safety are discussed, which will help your code not to malfunction on production. A static code analysis tool detects, which will do the

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents