📜 ⬆️ ⬇️

Review of the book "Programming for Android"

Android programming
image
The author - Z. Medniksa, L. Dornin, B. Mick, M. Nakamura
Translation - O. Sivchenko
Release date - 05/11/12

We present to your attention one of the translation novelties of our publishing house, the book “ Programming for Android ”.

For a start - a few words about the authors of this manual.
Zigurd Mednix is a consultant who works with leading manufacturers of complete equipment, corporations and other enterprises engaged in the creation of systems based on Android.
Laird Dornin is a senior engineer working on a large mobile operator, has a wealth of experience working with Java, Android, J2ME, SavaJe and WebKit.
J. Blake Makeke is a veteran developer with extensive experience writing Java applications for a variety of mobile and server platforms.
Masumi Nakamura , chief architect of the Big Data and Recommendations group, works for Where.Inc.

On the original cover of the print work of these respectable authors, it says: "If you are a programmer with average or extensive experience, then with the help of this book you will learn how to write great applications for Android." But annotations, like texts a priori advertising character, are often skeptical. Therefore, we illustrate the advantages and disadvantages of this publication with excerpts from a review by the American blogger Hexer Anderson. The author of this review analyzes the book “in the main”, the full English version can be read here .
')
For the past one and a half years, Android programming has been the main source of my income. But it doesn’t leave me feeling that the Android Framework still has some aspects that I once missed, or that I haven’t yet encountered in practice. Thanks to iSyncr WiFi and Cheetah Sync , I was able to work on networking, transferring files and developing for iTunes. In addition, my track record has a considerable amount of user interface development, fragments, etc. But I'm not sure that I really know everything that an Android developer should know. Therefore, I bought this book to eliminate gaps in knowledge.

Newcomers in their field should be pleased with the presence in the book of the material on the installation of the Eclipse integrated environment and the development kit in the Android - Android SDK on your working machine. The authors make a brief introduction describing the creation of the “Hello World” program for Android.

The second chapter of the book, “Java for Android,” personally pleased me greatly. Before I started developing for Android, I dealt mainly with C ++ and .NET. And in this chapter, I found a whole mass of interesting Java information that was both useful and very interesting.

The third chapter describes in some detail the main components that make up the Android application: activity (activity), intent, task (task), service (service) and content provider (content provider), and also describes basic information about the description file. Android programs, also called a “manifest file,” about application resources and the program life cycle.

The fourth chapter deals mainly with the signing of the application and digital certificates. Some basic information about sending the application to the Android Market (Google Play.). Casual mention of support for screens with different resolutions. However, the details of how to optimize the application for working with different screen resolutions and different pixel density are not very detailed here.

The chapter, “The Eclipse environment for developing programs on Android,” is essentially a treatise on the various Eclipse “perspectives” that you can use when writing or debugging your code. Experienced Eclipse users may well skip this chapter. However, a “static analyzer” is mentioned here for finding errors in your application; this tool is called “ FindBugs. "

The sixth chapter is called "Effective use of Java for Android", the most interesting part of it concerns concurrency and the use of threads in Android. When developing for Android, there is an iron rule: do not perform long-term operations in the user interface flow, so that the user does not receive persistent “Application Not Responding” messages. So, this chapter discusses how to use AsyncTask to perform “slow” operations in a new thread, so as not to block the flow of the user interface. In addition, it raises issues of serialization and working with objects Parcelable - these are important concepts that you need to master for development for Android. However, it seems odd that concurrency and serialization are discussed in one chapter.

The discussion of the types and the conversation about how they are used to create the user interface of the application, the authors proceed only in the seventh chapter. It seems that this information should have been given much earlier. Anyway, this chapter deals with the layout of species, in particular, the layout of LinearLayout. It is surprising that, despite the title of the chapter, “Creating a View”, it is mainly devoted to the implementation of MVC architecture in Android.

Regarding the chapter "Fragments and multiplatform support." It is not clear how it is related to multi-platform support, since it is entirely devoted to fragments. It is unlikely that this chapter should be here. Still, fragments of a relatively complex element of the user interface, and the authors consider it, barely acquainted with the species and dealt with the callbacks of events? In addition, this chapter is relatively short.

The tenth chapter mainly describes how Android has built-in support for the SQLite database. This system is needed for long-term storage of your application data in a relational database and for getting them from there. Unlike some previous chapters, this chapter is a must-read for every new Android developer, and you need to study it as quickly as possible.

The next chapter is devoted to the life cycle of activities and fragments. In addition, it explains how to properly maintain and restore states during the life cycle. It also discusses interesting material about the behavior of tasks (and how to launch them). The intention flags are not well spoken. Nevertheless, this is not a bad chapter at all, except for its name “The framework of a workable application”.

Several chapters of the book are devoted to “advanced” topics, in particular, playing and recording video and audio in Android, locating and working with maps, sensors, near-field communication, speech, gestures, accessibility, etc.

Chapter 17 deals with two rather different topics. First, an example is provided of how to synchronize the contact information of your application with a remote service. Secondly, the use of Bluetooth in your application is addressed. It is not very clear why these two topics turned out to be in one chapter, but since in other sources the first topic was opened rather sparingly, this chapter is worth reading.

The final chapter on the Android Native Development Kit (NDK) is one of my favorite parts of the book. In this chapter, the topic of NDK is practically not covered. Everything is limited to a brief story about how to download this kit, after which you are invited to simply try it out in your own applications. Suppose, but the developer must first learn how to work with the NDK, and only then “test” it. This chapter explains how and why to use such a kit. The chapter is brief and easy to read.

So, the book seemed to me a very sensible introduction to the development for Android, it is not entirely clear only the division of the book by chapters chosen by the authors. Some topics are too complex to be addressed in the first chapters; in other chapters, topics that are rather distant from each other are considered together. I would like to recommend to the authors that when writing new books they try to move logically and consistently from less complex to more complex topics.

Source: https://habr.com/ru/post/151855/


All Articles