2 options
Android development with Kotlin : learn android application development with the extensive features of Kotlin / Marcin Moskala, Igor Wojda.
- Format:
- Book
- Author/Creator:
- Moskala, Marcin, author.
- Wojda, Igor, author.
- Language:
- English
- Subjects (All):
- Android (Electronic resource).
- Application software--Development.
- Application software.
- Physical Description:
- 1 online resource (435 pages)
- Edition:
- 1st edition
- Other Title:
- Learn Android application development with the extensive features of Kotlin
- Place of Publication:
- Birmingham, [England] ; Mumbai, [India] : Packt Publishing, 2017.
- System Details:
- text file
- Biography/History:
- Wojda Igor: Igor Wojda is an experienced engineer with over 11 years of experience in software development. His adventure with Android started a few years ago, and he is currently working as a senior Android developer in the healthcare industry. Igor has been deeply interested in Kotlin development long before the 1. 0 version was officially released, and he is an active member of the Kotlin community. He enjoys sharing his passion for coding with developers. To learn more about him, you can visit on Medium (@igorwojda) and follow him on Twitter (@igorwojda). Moskala Marcin: Marcin Moskala is an experienced Android developer who is always looking for ways to improve. He has been passionate about Kotlin since its early beta release. He writes articles for Trade press and speaks at programming conferences. Marcin is quite active in the programming and open source community and is also passionate about cognitive and data science. You can visit his website, or follow him on GitHub (MarcinMoskala) and on Twitter (@marcinmoskala).
- Summary:
- Learn how to make Android development much faster using a variety of Kotlin features, from basics to advanced, to write better quality code. About This Book Leverage specific features of Kotlin to ease Android application development Write code based on both object oriented and functional programming to build robust applications Filled with various practical examples so you can easily apply your knowledge to real world scenarios Identify the improved way of dealing with common Java patterns Who This Book Is For This book is for developers who have a basic understanding of Java language and have 6-12 months of experience with Android development and developers who feel comfortable with OOP concepts. What You Will Learn Run a Kotlin application and understand the integration with Android Studio Incorporate Kotlin into new/existing Android Java based project Learn about Kotlin type system to deal with null safety and immutability Define various types of classes and deal with properties Define collections and transform them in functional way Define extensions, new behaviours to existing libraries and Android framework classes Use generic type variance modifiers to define subtyping relationship between generic types Build a sample application In Detail Nowadays, improved application development does not just mean building better performing applications. It has become crucial to find improved ways of writing code. Kotlin is a language that helps developers build amazing Android applications easily and effectively. This book discusses Kotlin features in context of Android development. It demonstrates how common examples that are typical for Android development, can be simplified using Kotlin. It also shows all the benefits, improvements and new possibilities provided by this language. The book is divided in three modules that show the power of Kotlin and teach you how to use it properly. Each module present features in different levels of advancement. The first module covers Kotlin basics. This module will lay a firm foundation for the rest of the chapters so you are able to read and understand most of the Kotlin code. The next module dives deeper into the building blocks of Kotlin, such as functions, classes, and function types. You will learn how Kotlin brings many improvements to the table by improving common Java concepts and decreasing code verbosity. The last module presents features that are not present in Java. You will learn how certain task...
- Contents:
- Cover
- Copyrights
- Credits
- About the Authors
- About the Reviewers
- www.PacktPub.com
- Customer Feedback
- Table of Contents
- Preface
- Chapter 1: Beginning Your Kotlin Adventure
- Say hello to Kotlin
- Awesome Kotlin examples
- Dealing with Kotlin code
- Kotlin Playground
- Android Studio
- Configuring Kotlin for the project
- Using Kotlin in a new Android project
- Java to Kotlin converter (J2K)
- Alternative ways to run Kotlin code
- Kotlin under the hood
- The Kotlin standard library
- More reasons to use Kotlin
- Summary
- Chapter 2: Laying a Foundation
- Variables
- Type inference
- Strict null safety
- Safe call
- Elvis operator
- Not-null assertion
- The let function
- Nullability and Java
- Casts
- Safe/unsafe cast operator
- Smart casts
- Type smart casts
- Non-nullable smart cast
- Primitive data types
- Numbers
- Char
- Arrays
- The Boolean type
- Composite data types
- Strings
- String templates
- Ranges
- Collections
- Statements versus expressions
- Control flow
- The if statement
- The when expression
- Loops
- The for loop
- The while loop
- Other iterations
- Break and continue
- Exceptions
- The try... catch block
- Compile-time constants
- Delegates
- Chapter 3: Playing with Functions
- Basic function declaration and usage
- Parameters
- Returning functions
- Vararg parameter
- Single-expression functions
- Tail-recursive functions
- Different ways of calling a function
- Default argument values
- Named arguments syntax
- Top-level functions
- Top-level functions under the hood
- Local functions
- Nothing return type
- Chapter 4: Classes and Objects
- Classes
- Class declaration
- Properties
- Read-write versus read-only
- Property access syntax between Kotlin and Java
- Increment and decrement operators.
- Custom getters/setters
- The getter versus property default value
- Late-initialized properties
- Annotating properties
- Inline properties
- Constructors
- Properties versus constructor parameters
- Constructors with default arguments
- Patterns
- Inheritance
- The JvmOverloads annotation
- Interfaces
- Data classes
- The equals and hashCode methods
- The toString method
- The copy method
- Destructing declarations
- Operator overloading
- Object declaration
- Object expression
- Companion objects
- Companion object instantiation
- Enum classes
- Infix calls for named methods
- Visibility modifiers
- The internal modifier and Java bytecode
- Sealed classes
- Nested classes
- Import aliases
- Chapter 5: Functions as First-Class Citizens
- Function types
- What is function type under the hood?
- Anonymous functions
- Lambda expressions
- The implicit name of a single parameter
- Higher-order functions
- Providing operations to functions
- Observer (Listener) pattern
- A callback after a threaded operation
- Combination of named arguments and lambda expressions
- The last lambda in an argument convention
- Named code surrounding
- Processing data structures using LINQ style
- Java SAM support in Kotlin
- Named Kotlin function types
- Named parameters in function types
- Type alias
- Underscore for unused variables
- Destructuring in lambda expressions
- Inline functions
- The noinline modifier
- Non-local returns
- Labeled returns in lambda expressions
- Crossinline modifier
- Function references
- Chapter 6: Generics Are Your Friends
- Generics
- The need for generics
- Type parameters versus type arguments
- Generic constraints
- Nullability
- Variance
- Variance modifiers
- Use-site variance versus declaration-site variance.
- Collection variance
- Variance producer/consumer limitation
- Invariant constructor
- Type erasure
- Reified type parameters
- The startActivity method
- Star-projections
- Type parameter naming convention
- Chapter 7: Extension Functions and Properties
- Extension functions
- Extension functions under the hood
- No method overriding
- Access to receiver elements
- Extensions are resolved statically
- Companion object extensions
- Operator overloading using extension functions
- Where should top-level extension functions be used?
- Extension properties
- Where should extension properties be used?
- Member extension functions and properties
- Types of receivers
- Member extension functions and properties under the hood
- Generic extension functions
- Collection processing
- The Kotlin collection type hierarchy
- The map, filter, and flatMap functions
- The forEach and onEach functions
- The withIndex and indexed variants
- The sum, count, min, max, and sorted functions
- Other stream processing functions
- Examples of stream collection processing
- Sequence
- Function literals with a receiver
- Kotlin standard library functions
- Using the apply function for initialization
- The also function
- The run and with functions
- The to function
- Domain-specific language
- Anko
- Chapter 8: Delegates
- Class delegation
- The Delegation pattern
- Decorator pattern
- Property delegation
- What are delegated properties?
- Predefined delegates
- The lazy function
- The notNull function
- The observable delegate
- The vetoable delegate
- Property delegation to the Map type
- Custom delegates
- View binging
- Preference binding
- Providing a delegate
- Chapter 9: Making Your Marvel Gallery Application
- Marvel Gallery
- How to use this chapter.
- Making an empty project
- Character gallery
- View implementation
- Network definition
- Business logic implementation
- Putting it all together
- Character search
- Character profile display
- Index.
- Notes:
- Includes index.
- Description based on online resource; title from PDF title page (ebrary, viewed September 25, 2017).
- OCLC:
- 1004746750
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.