The evolution of Android development

The starting point of the history of Android development is considered to be the early 2000s. Andy Rubin, Rich Miner, Nick Sears, Chris White found Android Inc. Already in 2005 Google bought them out. At first, the first Android smartphone was planned to be more like a Blackberry.

BlackBerry 8820, BlackBerry Bold 9900 and BlackBerry Classic (source)

But in 2007 the first iPhone came out that had a touch screen. Of course, at that time such a screen was new, but people liked it, and this technology gained popularity. Because of this, Google has shifted its focus to touch screens. And already in 2008 Google launched its OS – Android. The first smartphone based on it was HTC Dream.

Source

This is how the history of the most popular OS began. Constant updates, excellent support are some of the reasons for its popularity. Don't forget that Android is based on the Linux kernel, an open source system. Moreover, Android itself is open source. In addition, the ability to implement applications in Java has made this OS very popular among developers. But today the priority programming language for Android development is Kotlin. This is just a small part of what has changed since 2008. This article presents the history of development for Android. I will focus on iconic technologies, libraries, architectures, etc.

A starting point

As mentioned above, Android applications were initially developed using Java. Google decided to use this language because of its popularity. After all, Java still has a huge developer community today. It's also worth mentioning that Android applications can be written in C++. But he didn't become as popular.

Android was also used to create Android applications. SDK, which also includes an emulator for testing applications without a physical device. And Eclipse with the Android Development Tools plugin was used as the development environment.

XML was used for screen layout. A very good decision on Google's part, since XML is used in data transfer and is therefore familiar to most developers. All this is built on the basis of layout. Layout is a way to organize the user interface in an application. There are different types of layout. At that time, the standard layout in development was RelativeLayout or LinearLayout. RelativeLayout allows developers to define the layout of UI elements relative to each other or relative to a parent container. LinearLayout is used to organize UI elements in a linear list either horizontally or vertically.

The ListView component was used for the scrollable list of items. However, ListView is now deprecated and has been replaced by RecyclerView. But this will be discussed later. The big drawback of ListView is the performance issues with a boundless list.

There was no generally accepted architecture in those days. Therefore, everyone chose for themselves how best to structure their code.

To perform short (no more than a few seconds) labor-intensive work in the background, we used the abstract class AsyncTask, from which we need to inherit. As of Android 11, it is considered obsolete. To perform longer work, it was possible to use various APIs of the java.util.concurrent package (Executor, ThreadPoolExecutor, FutureTask). For a network request, AsyncTask was sufficient.

So, what is next? And then Android Studio

In 2013, Eclipse with the Android Development Tools plugin was replaced by a more convenient development environment, Android Studio, which is included in Android SDK. The big plus is that IDE is freely available and supported on Windows, macOS and Linux. Also interesting – Android Studio is based on IntelliJ IDEA (IDE from JetBrains). And each version of Android Studio, starting from 2020.3.1, is dedicated to some animal or insect. The latest version at the time of writing is dedicated to the iguana.

MVP period (Model-View-Presenter)

And so the developer community decided to introduce its own architecture – MVP.

Model are classes for interacting with the server and database. View – what the user sees. In Android development, a View can be, for example, an Activity. Well, Presenter is an intermediary between View and Model.

View calls Presenter if the user has done something on the screen. The Presenter processes these actions, calls the appropriate Model methods to retrieve the data, and updates the View.

The developers decided to standardize the architecture of Android applications, which, of course, was a big step forward.

The RxJava framework was then a very popular solution for asynchrony. Its distinctive feature is the ability to work in the reactive programming paradigm, that is, data is processed by a thread.

Also worth mentioning are XML layouts. Google has started recommending ConstraintLayout. In such a layout, each element has constraints that allow it to be flexibly configured relative to other elements. For example, layout_constraintLeft_toLeftOf, layout_constraintBaseline_toBaselineOf. Also, unlike RelativeLayout and LinearLayout, ConstraintLayout does not require multiple layouts to be nested in many cases, which speeds up rendering performance.

ListView was also replaced by RecyclerView, which is more efficient and has more options for customizing the list and scrolling. Also, the infinite list issue is gone because RecyclerView reuses previously created containers (one container stores one list item). But RecyclerView is more difficult to use than ListView.

Dagger 2

In 2015, Google developers introduced Dagger 2. If there is a Dagger 2, then there must be a Dagger 1, right? Right. Dagger 1 was introduced in 2012 by Square (they, by the way, released such libraries as Retrofit and Picasso. Well, and many other excellent libraries). What is the essence of Dagger 2? It is a dependency injection framework that generates code, thereby making life easier for developers. The main difference between Dagger 1 and Dagger 2 is the operating mechanism. Dagger 2 uses compile-time generation, while Dagger 1 is based on reflection. This innovation improves efficiency. Also, errors related to Dagger 2 will be detected at the compilation stage.

Flutter

In 2015, the first version of Flutter from Google was released. This is a new framework with which you can implement applications for both iOS and Android. But at first there was only support for Android, and the possibility of implementation for Apple’s mobile OS appeared later. Also later it will be possible to make web applications, desktop applications for Windows, macOS and Linux. Instead of Kotlin, the Dart language is used, which is not much different from Kotlin and Java. Today, Flutter coexists with native development for Android and has a higher barrier to entry.

Instant Apps

Instant Apps were announced in 2016, and the first applications appeared in 2017. Thanks to this technology, the user can click on a special link or button, which allows him to open a specific section of the application without downloading or installing the entire application. Instant Apps also allow users to try an app before installing it on Google Play.

All this is achieved thanks to a modular approach to application development and Deep Links.

The emergence of Kotlin

In general, Kotlin appeared earlier, but it was in 2017 that Google announced Kotlin as the main programming language for Android development. Fashionable, stylish, youthful. And what’s important is more secure (hello, NullPointerException). In addition, the syntax is similar to Java. Kotlin also runs on top JVM. This means that Kotlin is compatible with Java. Therefore, migrating from Java to Kotlin will be easier. Another advantage is the support for functional programming.

Of course, with the development of technology, there are options to use other programming languages. For example, C#, Python. And each language provides its own unique capabilities for Android development. But in this article I will skip technologies such as, for example, React Native, Xamarin.

Period MVVM (Model-View-ViewModel)

And then Google begins to promote the MVVM architecture. Instead of Presenter there is now a ViewModel. The ViewModel provides data to the View and handles user actions. And importantly, it stores state when the interface configuration changes (for example, when the screen is rotated). Also, the ViewModel class is a Jetpack component (which will be discussed later), so developers do not need to create the ViewModel class themselves.

For data storage, Google introduced LiveData, which implements the principle of the Observer pattern. Thus, a subscription to LiveData comes from View. When the ViewModel receives data from the Model, these values ​​are displayed on the screen.

Coroutines replaced RxJava. They are calculations that run in the context of real threads, but the calculations are performed asynchronously and are more lightweight than regular threads. It all works something like this: a coroutine can be suspended and resumed at any time during execution. When it pauses, execution is passed back to the calling code, which then resumes its execution after some time. When a coroutine is resumed, execution begins from the point where it was suspended. And thanks to the fact that coroutines allow you to write sequential code, unlike RxJava, the code has become easier to read. All this gave coroutines popularity in Android development. For example, to indicate that a function will be executed asynchronously, simply add the 'suspend' modifier to the function.

Source

Not APK, but AAB

In 2018, Google introduces to the world AAB. This is the new standard application publishing format, although APK hasn't gone anywhere. In short, then AAB allows you to collect applications that support different devices and languages, without having to create separate ones APK files for each configuration. Yes, due to the variety of Android devices, there is no universal APKwhich is suitable for any devices. AAB It is intended to correct this, since in essence the new format is an archive with all the necessary files.

Android Jetpack

It is also worth mentioning Android Jetpack – a set of components and tools for developing Android applications, presented by Google in the same 2018. Android Jetpack includes libraries that provide out-of-the-box solutions for tasks that Android developers typically face, such as working with the application lifecycle, data handling, navigation, etc.

In fact, this is also a watershed moment for the standard of app creation. Many third party libraries have become less popular because a developer can now do the same thing using Android Jetpack.

Dagger hilt

The alpha version of Dagger Hilt will be released in June 2020. This is a new library for dependency injection. It differs from Dagger 2 in that it allows you to use the capabilities of Dagger 2 in a simplified way, since Dagger Hilt automatically generates code for DI, which simplifies the configuration process and reduces the amount of writing the necessary code.

Our days

From XML to Compose

In 2019, Google announces Jetpack Compose. And in 2021, it first releases a beta version, and then version 1.0. This is another big step towards changing the creation of Android applications. Now, instead of XML layouts, the developer can use the Compose library and create UI using a declarative approach in the Kotlin language.

Interestingly, there is also Compose Multiplatform. Thanks to this technology, you can also create UI on Compose for iOS, macOS, Windows, Linux and the web.

Flow

Another change at the current stage can be considered the replacement of LiveData with Flow, presented in the Kotlin Coroutines library. Flow is a value stream running asynchronously based on coroutines.

AI and ML

With the advancement of artificial intelligence and machine learning, Android apps have also started providing AI and machine learning related features. TensorFlow and other ML frameworks have Android support, allowing developers to add features such as voice recognition, recommendation engines, and more.

Conclusion

Of course, not everything is covered in this article. I could write about databases, differences in the Android API, development for Android TV and Wear OS, and much more. I'm not sure it will be possible to list everything. I just wanted to conduct a retrospective, show how Android development has changed over these less than 16 years. After all, a lot has changed. And it seems to me that both Android and all mobile development will continue to dynamically change and develop.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *