• Complain

Peter Späth - Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming

Here you can read online Peter Späth - Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2019, publisher: Apress, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Peter Späth Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming
  • Book:
    Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming
  • Author:
  • Publisher:
    Apress
  • Genre:
  • Year:
    2019
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

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, youll have a foundation to take away and apply to your own Kotlin-based Android app development. Youll 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.

Peter Späth: author's other books


Who wrote Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming? Find out the surname, the name of the author of the book and a list of all author's works by series.

Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Contents
Landmarks
Peter Spth Learn Kotlin for Android Development The Next Generation Language - photo 1
Peter Spth
Learn Kotlin for Android Development The Next Generation Language for Modern Android Apps Programming
Peter Spth Leipzig Germany Any source code or other supplementary material - photo 2
Peter Spth
Leipzig, Germany

Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the books product page, located at www.apress.com/9781484244661 . For more detailed information, please visit http://www.apress.com/source-code .

ISBN 978-1-4842-4466-1 e-ISBN 978-1-4842-4467-8
https://doi.org/10.1007/978-1-4842-4467-8
Peter Spth 2019
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.

To Alina

Introduction

Computer programs are for executing operations using input data to produce output data, sometimes by manipulating data taken from a database during that operation. The word database here is used in the most general sense: It could be a file, some memory storage, or a full-fledged database product.

Many different programming languages exist nowadays, each with its own merits and drawbacks. Some of them aim at execution stability, some at high performance, some are tailored to solve specific tasks, and some exist only because a company wants to establish a strong market position. Looking at the way programming languages have developed over time is an interesting subject in and of itself, and it has implications for various aspects of information technology. One could write a separate book about that, but for this book I simply want to stress one important fact about computer language development, which I think has a direct effect on the way modern computer programs are written. If you are looking at the historical development of computer languages, you will notice a substantial change in the abstraction level the languages exhibit. Whereas in the infancy of the industry a programmer needed to have a fairly good knowledge of computer hardware, now different levels of abstraction have been introduced into the languages, meaning an increased conceptional and linguistic distance from hardware features. This has increasingly alleviated the requirement that software developers know what is occurring in a computers central processing unit (CPU).

Along with an increasing level of abstraction, modern computer languagessometimes implicitly, sometimes explicitlyexhibit a prominent new feature: the expressiveness of language constructs. Let me try to illustrate this using an example written in pseudo-code. Lets say you have a list of items and want to perform an operation on each of the items. With some knowledge of the internal functioning of computers, a programmer might write a code snippet like this:
  • Create some array of data in the memory.

  • Assign a pointer to the first element.

  • Loop over the array.
    • Dereference the pointer, retrieving a list element.

    • Do something with the element (example.g., print it).

    • Increment the pointer, let it point to the next item.

    • If we are beyond the last element, exit the loop.

  • End loop.

Although this looks a little bit complex, it closely relates to what computers are doing under the hood, and early languages looked more or less like this. As a first abstraction and a way to improve readability, we can try to get rid of the pointer element and instead write:
  • variable theList = [somehow create the list of items]
    • loop over "theList", assigning each item to an iteration variable "item":

    • do something with "item", for example print it

  • end loop

This already looks more expressive compared to the first version, and a lot of current programming languages allow for this kind of programming style. We can do even better, though: You can see the definition of the list being written in one line, separated from the list processing in the loop. Theres nothing preventing us from writing a lot of overly complex code between the list definition and the loop, and this is what you see quite often, making the program hard to read and understand. Wouldnt it be better to have it all in one statement? Using a more expressive snippet allows us to write such a combined statement. In pseudo-code, it could look like this:

[somehow create the list of items].
[maybe add some filter].
forEach { item ->
do something with "item", for example print it
}

This is about the maximum of expressiveness you can get, if you see the dot . as some kind of do something with it command and { } as a block of code doing something, with the identifier in front of the -> in this case designating a loop variable.

Note

Making your code expressive from the very beginning will not only help you to write good code, it will also help you to develop your programming skills beyond average. Expressive code is easier to maintain and extend, easier to reuse, easier to understand for others, and easier to debug if the program shows some deficiencies.

The programming language Kotlin is capable of getting us to such an extent of expressiveness, and in this book I want to introduce Kotlin as a programming language for Android that allows you to accomplish things in an expressive and concise way. As a matter of fact, in Kotlin the little looping example, with a filter added, reads:

arrayOf("Blue", "Green", "Yellow", "Gray").
filter { it.startsWith("G") }.
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming»

Look at similar books to Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming»

Discussion, reviews of the book Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.