Data binding is a declarative way to bind UI components to application data sources. It minimizes code needed to bind layouts to data and supports MVVM pattern. Data binding engine allows binding layouts to observable data sources and updating UI automatically when data changes. It works on Android 2.1+ and uses XML syntax like <layout> and @{} to bind variables and call methods.
3. Model View ViewModel
- used in Microsoft frameworks with XAML as
binding language
- Variant of MVC pattern
- M : domain model
- V : view
- VM : mediator, binds view, reacts to events
3
10. Data Object
- POJO/Beans modification doesn’t update UI
- <variable> types inspected on compile,
must implement Observable via
BaseObservable and @Bindable
- Observable, Observable Field, Observable
Collection : are notified on data change 10
12. Why?
- fragments traditionally create, bind,
configure views, and hold the domain logic;
can be limited to binding
- UIs react to changes in the ViewModel,
asynchronous updates on the UI thread and
from background threads ∴ responsive UI
- 12
13. Why Continued
- HTTP/2 Request and Response Multiplexing
- Increase in local and remote inter-process
communication as apps get more complex,
and as they get more connected(IoT,
Bluetooth, Wifi)
13