Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MVVM android

RonakAndroid
September 05, 2019

MVVM android

This is very simaple idea to understand concept of android MVVM(Model View View Model) .

RonakAndroid

September 05, 2019
Tweet

Other Decks in Programming

Transcript

  1. Index - Introduction - Traditional approach - What is MVVM?

    - Model - View - ViewModel - Setup - Code sample
  2. Introduction - According to wikipedia, Software Architecture refers to the

    high level structures of a software system, the discipline of creating such structures and dah dah and blah blah… we all know what is architecture!! - In simple words, having decided and implementing a specific code architecture or a design pattern is all about solving problems that we developers face from time to time. - Design patterns is set of guidelines not rules - Why MVVM?
  3. Model - This holds the data of the application. -

    It cannot directly talk to the View. - Exposes streams of data relevant to the View - Generally, it’s recommended to expose the data to the ViewModel through Observables.
  4. View - It represents the UI of the application devoid

    of any Application Logic. - It observes the ViewModel. - Also informs the ViewModel about the user’s actions
  5. ViewModel - It acts as a link between the Model

    and the View. - It’s responsible for transforming the data from the Model. - It provides data streams to the View. - It also uses hooks or callbacks to update the View. It’ll ask for the data from the Model.