Hands-On Object-Oriented Programming with Kotlin
eBook - ePub

Hands-On Object-Oriented Programming with Kotlin

Build robust software with reusable code using OOP principles and design patterns in Kotlin

Abid Khan, Igor Kucherenko

Share book
  1. 370 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Hands-On Object-Oriented Programming with Kotlin

Build robust software with reusable code using OOP principles and design patterns in Kotlin

Abid Khan, Igor Kucherenko

Book details
Book preview
Table of contents
Citations

About This Book

Learn everything you need to know about object-oriented programming with the latest features of Kotlin 1.3

Key Features

  • A practical guide to understand objects and classes in Kotlin
  • Learn to write asynchronous, non-blocking codes with Kotlin coroutines
  • Explore Encapsulation, Inheritance, Polymorphism, and Abstraction in Kotlin

Book 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 learn

  • Get an overview of the Kotlin programming language
  • Discover Object-oriented programming techniques in Kotlin
  • Understand Object-oriented design patterns
  • Uncover multithreading by Kotlin way
  • Understand about arrays and collections
  • Understand the importance of object-oriented design patterns
  • Understand about exception handling and testing in OOP with Kotlin

Who 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

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Hands-On Object-Oriented Programming with Kotlin an online PDF/ePUB?
Yes, you can access Hands-On Object-Oriented Programming with Kotlin by Abid Khan, Igor Kucherenko in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming. We have over one million books available in our catalogue for you to explore.

Information

Year
2018
ISBN
9781789619645
Edition
1

Object-Oriented Patterns in Kotlin

A pattern is a concept that relates to software architecture. By architecture, we mean a high-level structure of programming code that includes elements and relationships. It's important to make the right decision when it comes to a pattern that will be used to solve everyday problems. This is because choosing and implementing a pattern is a one-time procedure that is expensive to change.
Before we begin, let's review the topics we will be looking at in this chapter:
  • What design patterns are and how they help
  • Types of design patterns
  • Creational patterns
  • Structural patterns
  • Behavioral patterns

Technical requirements

To run the code from this chapter, we just need IntelliJ IDEA as well as Git installed. This chapter doesn't require any additional installations.
You can find examples from this chapter on GitHub at the following link: https://github.com/PacktPublishing/Hands-On-Object-Oriented-Programming-with-Kotlin/tree/master/src/main/kotlin/Chapter06.

What design patterns are and how they help

The process of software development involves creating new classes and interfaces, building an inheritance hierarchy, and establishing communication between objects. Object-oriented programming helps us to build an abstraction of entities and processes using extremely powerful concepts such as encapsulations, composition, inheritance, polymorphism, and so on and so forth.
We should understand that a developer writes code to solve one or more sets of problems. Software designing is a process of describing how to apply the concepts of object-oriented programming together to implement a solution.
An implementation of a commonly occurring solution is a software design pattern if it can be reused in many different situations. The most common reasons to use a design template are as follows:
  • Acceleration of the development process
  • Increasing the quality of code
  • Decreasing communication time between developers
Reusing patterns helps us to prevent common issues, which is why we can increase the quality of code. It also improves readability and understanding for developers who are familiar with a pattern that decreases the time for communication and code review. As a result, we can speed up the development process.
Software design patterns in object-oriented programming show relationships and communic...

Table of contents