

With Declarative UI, developers are declaring what the UI looks like by describing the views and their properties. Therefore the Android team decided to use a different pattern called Declarative UI pattern. This approach is great and loved by a lot of developers but as Android development shifted towards a more reactive programming approach, the benefits of the imperative approach started to shrink. Once the view is retrieved, you can update the properties of it or invoke its methods. Reaching to UI elements is possible by using findViewById() method. Right now, Android is heavily using Imperative UI pattern by using XML (Extensible Markup Language) files. The Android team not only presents and suggests logical patterns, but they are also working on how you implement the UI for the application as well. It is more common to use the MVVM pattern using AndroidX libraries implemented and recommended by the Android team. Nowadays, they are far from being the most common way to develop applications. For example, in the earlier stages of Android, it was pretty common to use EventBus to send data through the app, and Mosby to implement the Model-View-Presenter pattern. As time goes by, technologies evolve and try to offer a better experience to developers for developing their applications.
