Learn to program with Kotlin, one of the fastest-growing programming languages available today
Programming Kotlin Applications: Building Mobile and Server-Side Applications with Kotlin drops readers into the fast lane for learning to develop with the Kotlin programming language. Authored by accomplished cloud consultant and technology professional Brett McLaughlin, Programming Kotlin Applications provides readers with the pragmatic and practical advice they need to build their very first Kotlin applications.
Designed to give readers a thorough understanding of Kotlin that goes beyond mere mobile programming, this book will help you:
* Learn how to develop your first Kotlin project
* Understand how Kotlin securely protects and stores information
* Advocate for using Kotlin in your own professional and personal environments
* Understand Kotlin's goals and how to use it as its best
* Know when to avoid using Kotlin
Programming Kotlin Applications is written in a highly approachable and accessible way without the fluff and unrealistic samples that characterize some of its competitor guides. Perfect for developers familiar with another object-oriented programming language like Java or Ruby, or for people who want to advance their skillset in the Kotlin environment, this book is an indispensable addition to any programmer's library.
Autorentext
About the author
Brett Mclaughlin has over two decades of experience working and writing in technology. He focuses on cloud and enterprise computing and has become a recognized and trusted name in helping organizations migrate to the cloud, especially with Amazon Web Services. He has led large-scale cloud migrations for NASA's Earth Science program as well as the RockCreek Group's financial platform. He is a sought-after speaker, author, and educator.
Visit us at wrox.com for free code samples.
Klappentext
Learn to use Kotlin to create useful, secure, and exciting apps
Programming Kotlin® Applications: Building Mobile and Server-Side Applications with Kotlin delivers an approachable and comprehensive resource for learning one of the fastest-growing programming languages on the planet. Discover how to quickly get moving with Kotlin, without any unnecessary fluff or unrealistic examples that don't translate to the real world.
Accessibly written by renowned expert Brett McLaughlin, Programming Kotlin Applications will teach you the basic and advanced topics you'll need to understand for a mastery of this popular alternative to the Java programming language. While the book covers mobile programming in-depth, you'll learn more than just mobile app development and focus on Kotlin as a server-side option as well.
The author provides you with the knowledge you need to start your first Kotlin project and an understanding of how Kotlin securely protects and stores your information. You'll also learn the limitations of the language and when not to use Kotlin. Finally, you'll enjoy the author's practical and applicable code examples you can use to immediately improve your own Kotlin applications.
Perfect for readers who are already developing applications with Java or Ruby, Programming Kotlin Applications also belongs on the bookshelves of those who have tried to get into Kotlin but have had some difficulty internalizing its unique features. If you've been "writing Java code in Kotlin" or want to start taking advantage of everything Kotlin has to offer, this is the book for you.
Readers of Programming Kotlin Applications will discover:
- How to write their very first Kotlin application
- How to use Kotlin as a server-side solution, and not just a mobile app programming language
- How Kotlin protects and secures user information and how to write secure applications
- Why Kotlin is an excellent alternative to Java and why it's one of the fastest growing programming languages in the world
Wrox Professional guides are written by working developers to address everyday needs. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.
Zusammenfassung
- Learn how to develop your first Kotlin project
- Understand how Kotlin securely protects and stores information
- Advocate for using Kotlin in your own professional and personal environments
- Understand Kotlin's goals and how to use it as its best
- Know when to avoid using Kotlin
Inhalt
Introduction xxv
Chapter 1: Objects All The Way Down 1
Kotlin: A New Programming Language 1
What is Kotlin? 2
What Does Kotlin Add to Java? 3
Kotlin is Object-Oriented 3
Interlude: Set Up Your Kotlin Environment 4
Install Kotlin (and an IDE) 4
Install IntelliJ 5
Create Your Kotlin Program 8
Compile and Run Your Kotlin Program 9
Fix Any Errors as They Appear 10
Install Kotlin (and Use the Command Line) 10
Command-Line Kotlin on Windows 10
Command-Line Kotlin on Mac OS X 11
Command-Line Kotlin on UNIX-Based Systems 12
Verify Your Command-Line Installation 12
Creating Useful Objects 13
Pass In Values to an Object Using Its Constructor 13
Print an Object with toString() 14
Terminology Update: Functions and Methods 15
Print an Object (and Do It with Shorthand) 15
Override the toString() Method 16
All Data is Not a Property Value 17
Initialize an Object and Change a Variable 19
Initialize a Class with a Block 19
Kotlin Auto-Generates Getters and Setters 20
Terminology Update: Getters, Setters, Mutators, Accessors 20
Constants Can't Change (Sort of) 21
Chapter 2: It's Hard To Break Kotlin 25
Upgrade Your Kotlin Class Game 25
Name a File According to Its Class 26
Organize Your Classes with Packages 27
Put Person in a Package 28
Classes: The Ultimate Type in Kotlin 31
Kotlin Has a Large Number of Types 31
Numbers in Kotlin 31
Letters and Things 32
Truth or Fiction 33
Types Aren't Interchangeable (Part 1) 33
You Must Initialize Your Properties 34
Types Aren't Interchangeable (Part 2) 35
You Can Explicitly Tell Kotlin What Type to Use 36
Try to Anticipate How Types Will Be Used 37
It's Easy to Break Kotlin (Sort of) 37
Overriding Property Accessors and Mutators 37
Custom-Set Properties Can't Be in a Primary Constructor 38
Move P…