Kotlin Coroutines by Tutorials (Third Edition)


Book Description

Learn coroutines!Executing background tasks has always been a big challenge in every environment and, in particular, on mobile devices where resources are limited. Kotlin has simplified the way you can write code improving your productivity with a new programming paradigm, enhancing object-oriented and functional programming with simple, powerful and new constructs. Coroutines are one of these!Who This Book Is ForThis book is for intermediate Kotlin or Android developers who already know the basics of UI development but want to learn coroutine API to simplify and optimize their code.Topics Covered in this BookAsynchronous programming: Learn what asynchronous programming means and how to achieve it using not blocking calls.Configuration: Learn how to configure IntelliJ and Android Studio to use Coroutine APIsCoroutine principles: Learn what coroutines and launching builders are and how to manage Job dependencies. Suspending functions: This is the main concept around coroutines and you'll learn how to declare a suspending function and how to deal with results Sequences and Iterators: Learn how to manage theoretically infinite collections of data in an efficient way using Sequences, Iterators and the yield function. Thread communication techniques: Learn how different tasks can communicate using Channels, Flow, and specific coroutine operators.And much more, including benchmarks, Broadcast Channels, Flow!One thing you can count on: After reading this book, you'll be prepared to take advantage of all the improvements coroutines have to offer!







Kotlin Apprentice (Third Edition)


Book Description

Learn how to program with Kotlin!Kotlin is the exciting modern language from JetBrains, creators of IntelliJ IDEA, the basis of many popular IDEs such as Android Studio and PyCharm. Since the adoption of Kotlin by Google as an official language for Android, the momentum behind Kotlin has gone off the charts.Kotlin supports many platforms, including Android, the web, the back-end, and even iOS. By reading this book, you'll be ready to use Kotlin on any and all of these platforms.Who This Book Is ForThis book is for complete beginners to Kotlin. No prior programming experience is necessary!Topics Covered in Kotlin ApprenticeKotlin Development Environment: See how to setup a development environment for Kotlin using IntelliJ IDEA.Numbers and Strings: These are the basic kinds of data in any app-learn how to use them in Kotlin.Making Decisions: Your code doesn't always run straight through-learn how to use conditions and loops to control program flow.Functions and Lambdas: Group your code together into reusable chunks to run and pass around.Collection Types: Discover the many ways Kotlin offers to store and organize data into collections.Building Your Own Types: Learn how to model elements in your app using classes, objects, interfaces, and enumerations.Functional Programming: Learn how to use Kotlin in a functional style and how this can make your code clearer and more efficient.Coroutines: Asynchronous programming can be a complex topic on any platform, but Kotlin gives you a clear and consise approach with coroutines.Kotlin Platforms and Scripting: Learn about how Kotlin can be used on multiple platforms and see its use as a scripting language.Kotlin/Native and Multiplatform: See how to use Kotlin/Native to bring your apps to more than one platform.One thing you can count on: after reading this book, you'll be prepared to take advantage of Kotlin wherever you choose to use it!




Kotlin in Action


Book Description

Summary Kotlin in Action guides experienced Java developers from the language basics of Kotlin all the way through building applications to run on the JVM and Android devices. Foreword by Andrey Breslav, Lead Designer of Kotlin. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology Developers want to get work done - and the less hassle, the better. Coding with Kotlin means less hassle. The Kotlin programming language offers an expressive syntax, a strong intuitive type system, and great tooling support along with seamless interoperability with existing Java code, libraries, and frameworks. Kotlin can be compiled to Java bytecode, so you can use it everywhere Java is used, including Android. And with an effi cient compiler and a small standard library, Kotlin imposes virtually no runtime overhead. About the Book Kotlin in Action teaches you to use the Kotlin language for production-quality applications. Written for experienced Java developers, this example-rich book goes further than most language books, covering interesting topics like building DSLs with natural language syntax. The authors are core Kotlin developers, so you can trust that even the gnarly details are dead accurate. What's Inside Functional programming on the JVM Writing clean and idiomatic code Combining Kotlin and Java Domain-specific languages About the Reader This book is for experienced Java developers. About the Author Dmitry Jemerov and Svetlana Isakova are core Kotlin developers at JetBrains. Table of Contents PART 1 - INTRODUCING KOTLIN Kotlin: what and why Kotlin basics Defining and calling functions Classes, objects, and interfaces Programming with lambdas The Kotlin type system PART 2 - EMBRACING KOTLIN Operator overloading and other conventions Higher-order functions: lambdas as parameters and return values Generics Annotations and reflection DSL construction




Hands-On Object-Oriented Programming with Kotlin


Book Description

Learn everything you need to know about object-oriented programming with the latest features of Kotlin 1.3 Key FeaturesA practical guide to understand objects and classes in KotlinLearn to write asynchronous, non-blocking codes with Kotlin coroutinesExplore Encapsulation, Inheritance, Polymorphism, and Abstraction in KotlinBook Description Kotlin is an object-oriented programming language. The book is based on the latest version of Kotlin. The book provides you with a thorough understanding of programming concepts, object-oriented programming techniques, and design patterns. It includes numerous examples, explanation of concepts and keynotes. Where possible, examples and programming exercises are included. The main purpose of the book is to provide a comprehensive coverage of Kotlin features such as classes, data classes, and inheritance. It also provides a good understanding of design pattern and how Kotlin syntax works with object-oriented techniques. You will also gain familiarity with syntax in this book by writing labeled for loop and when as an expression. An introduction to the advanced concepts such as sealed classes and package level functions and coroutines is provided and we will also learn how these concepts can make the software development easy. Supported libraries for serialization, regular expression and testing are also covered in this book. By the end of the book, you would have learnt building robust and maintainable software with object oriented design patterns in Kotlin. What you will learnGet an overview of the Kotlin programming languageDiscover Object-oriented programming techniques in Kotlin Understand Object-oriented design patternsUncover multithreading by Kotlin wayUnderstand about arrays and collectionsUnderstand the importance of object-oriented design patternsUnderstand about exception handling and testing in OOP with KotlinWho this book is for This book is for programmers and developers who wish to learn Object-oriented programming principles and apply them to build robust and scalable applications. Basic knowledge in Kotlin programming is assumed




Kotlin Apprentice


Book Description

Learn how to program with Kotlin! Kotlin is the exciting modern language from JetBrains, creators of IntelliJ IDEA, the basis of many popular IDEs such as Android Studio and PyCharm. Since the adoption of Kotlin by Google as an official language for Android, the momentum behind Kotlin has gone off the charts. In this book, you'll start with the basics of programming using Kotlin. You'll next learn everything from collections and lambdas to classes and interfaces, and then move on to more advanced topics like functional programming and coroutines. Kotlin supports many platforms, including Android, JavaScript, the JVM, and someday even iOS. By reading this book, you'll be ready to use Kotlin on any and all of these platforms. Who This Book Is For This book is for complete beginners to Kotlin. No prior programming experience is necessary! Topics Covered in Kotlin Apprentice Kotlin Development Environment: See how to setup a development environment for Kotlin using IntelliJ IDEA. Numbers and Strings: These are the basic kinds of data in any app-learn how to use them in Kotlin. Making Decisions: Your code doesn't always run straight through-learn how to use conditions and loops to control program flow. Functions and Lambdas: Group your code together into reusable chunks to run and pass around. Collection Types: Discover the many ways Kotlin offers to store and organize data into collections. Building Your Own Types: Learn how to model elements in your app using classes, objects, interfaces, and enumerations. Exceptions: Make your code more robust and flexible by signaling and handling exception conditions. Functional Programming: Learn how to use Kotlin in a functional style and how this can make your code clearer and more efficient. Coroutines: Asynchronous programming can be a complex topic on any platform, but Kotlin gives you a clear and consise approach with coroutines. Kotlin Platforms and Scripting: Learn about how Kotlin can be used on multiple platforms and see its use as a scripting language. One thing you can count on: after reading this book, you'll be prepared to take advantage of Kotlin wherever you choose to use it!







Learn Kotlin for Android Development


Book Description

Build Android apps and learn the essentials of the popular Kotlin programming language and APIs. This book will teach you the key Kotlin skills and techniques important for creating your very own Android apps. Apart from introducing Kotlin programming, Learn Kotlin for Android Development stresses clean code principles and introduces object-oriented and functional programming as a starting point for developing Android apps. After reading and using this book, you'll have a foundation to take away and apply to your own Kotlin-based Android app development. You'll be able to write useful and efficient Kotlin-based apps for Android, using most of the features Kotlin as a language has to offer. What You Will Learn Build your first Kotlin app that runs on Android Work with Kotlin classes and objects for Android Use constructs, loops, decisions, and scopes Carry out operations on data Master data containers, arrays, and collections Handle exceptions and access external libraries Who This Book Is For Very little programming experience is required: no prior knowledge of Kotlin needed.




Head First Kotlin


Book Description

What will you learn from this book? Head First Kotlin is a complete introduction to coding in Kotlin. This hands-on book helps you learn the Kotlin language with a unique method that goes beyond syntax and how-to manuals and teaches you how to think like a great Kotlin developer. You’ll learn everything from language fundamentals to collections, generics, lambdas, and higher-order functions. Along the way, you’ll get to play with both object-oriented and functional programming. If you want to really understand Kotlin, this is the book for you. Why does this book look so different? Based on the latest research in cognitive science and learning theory, Head First Kotlin uses a visually rich format to engage your mind rather than a text-heavy approach that puts you to sleep. Why waste your time struggling with new concepts? This multisensory learning experience is designed for the way your brain really works.




Using Asyncio in Python


Book Description

If you’re among the Python developers put off by asyncio’s complexity, it’s time to take another look. Asyncio is complicated because it aims to solve problems in concurrent network programming for both framework and end-user developers. The features you need to consider are a small subset of the whole asyncio API, but picking out the right features is the tricky part. That’s where this practical book comes in. Veteran Python developer Caleb Hattingh helps you gain a basic understanding of asyncio’s building blocks—enough to get started writing simple event-based programs. You’ll learn why asyncio offers a safer alternative to preemptive multitasking (threading) and how this API provides a simpleway to support thousands of simultaneous socket connections. Get a critical comparison of asyncio and threading for concurrent network programming Take an asyncio walk-through, including a quickstart guidefor hitting the ground looping with event-based programming Learn the difference between asyncio features for end-user developers and those for framework developers Understand asyncio’s new async/await language syntax, including coroutines and task and future APIs Get detailed case studies (with code) of some popular asyncio-compatible third-party libraries