Posts

Showing posts with the label #Android Architecture

Android Architecture: Communication between ViewModel and View

Image
  Introduction There’s been a lot of talk about MVVM architecture since Google announced architecture components last year at I/O and so many developers who preferred Presenters (including me) have started to accept the ViewModel world. Using ViewModels (over Presenters) reduces boilerplate code, manages data during configuration change, makes it easy to share data between multiple fragments. However, it does make communication with Views much harder. To learn complete android course visit: android online training Problem Let’s take an example of Edit Profile screen. User data must be validated before sending to server, which means Presenter/ViewModel should be able to show/hide progress indicator, send validation and server errors (if any) to the View. Also if city/gender dialog is visible during configuration change then View should be notified about that as well. Presenters and ViewModels shouldn’t hold references to Views. In case of Presenter we usually define some s...

Android Architecture: Communication between ViewModel and View

Image
Introduction There’s been a lot of talk about MVVM architecture since Google announced architecture components last year at I/O and so many developers who preferred Presenters (including me) have started to accept the ViewModel world. Using ViewModels (over Presenters) reduces boilerplate code, manages data during configuration change, makes it easy to share data between multiple fragments. However, it does make communication with Views much harder. To learn complete android course visit: android online training Problem Let’s take an example of Edit Profile screen. User data must be validated before sending to server, which means Presenter/ViewModel should be able to show/hide progress indicator, send validation and server errors (if any) to the View. Also if city/gender dialog is visible during configuration change then View should be notified about that as well. Presenters and ViewModels shouldn’t hold references to Views. In case of Presenter we usually define some sort of ...

Android Architecture - Software Stack of Android

Image
What is Android? Android is a modified Linux based mobile operating system that was originally started by  Android Inc .  with the same name. In 2005, Google acquired Android and took over its development work to enter into the mobile space. As a part of the world's biggest tech giant, Android was made open source and free; hence most of the source code of Android is released under the open-source Apache licence. That allows anyone to download the source code and change it as per their requirements, hence they can have their own flavour of the Android operating system, For example :  Cynogen ,  MIUI (by Xiaomi) etc are just different flavours of the Android OS. During development, developers have to code only at a Software level, adding new features, modifying the user experience etc, leaving behind the worries of the different device configurations, and hardware/software integration, which makes Android Application Development for mobile even easier. For...