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

MVC-MVP-MVVM

HIFILEO
March 06, 2018

 MVC-MVP-MVVM

A group of online Udacity students reached out to me to give a presentation about architecture. This was a presentation that quickly, at a high level, covered known architectures. Focus on the android platform although it can be used on any platform.

HIFILEO

March 06, 2018

Transcript

38 slides
  1. Goal • MVC • Define, History, Why, Use Cases, Failures

    • Clean Code • MVP • Define, History, Use Cases, Failures • MVVM • Define, History, Use Cases, Failures
  2. MVC - WHY • Simple Applications - Good! :-) •

    Separates internal representations from external. • OO - Modularity • OO - Reuse
  3. Clean Code • What do I gain by doing this?

    • Independent of Frameworks • Testable • Independent of UI • Independent of Database • Independent of any external agency
  4. Inner Most Circle • Entities • Enterprises wide business rules

    • Business Rules • Application specific business rules
  5. Middle Circle • Interface Adapters • Presenters / Views /

    View Models • Translation layer • Garbage In = Garbage Out
  6. Outer Circle • The plugins! • Frameworks and tools •

    The details! • Though shall do no harm
  7. Cross Boundary • •Flow of control • In Out In

    • Dependencies point inward = Contradiction • How to resolve = Dependency Inversion Principle
  8. Dependency Inversion Principle • •Definition • •Rules • 1.) High-level

    modules should not depend on low-level modules. Both should depend on abstractions. • 2.) Abstraction should not depend on details. Details should depend on abstractions.
  9. MVP - Failures • Major Reasons (Death of MVP) •

    Data Binding • Rx • Architectural Components
  10. MVVM - History • Microsoft 2005 • Ken Cooper and

    Ted Peters • Need • To simplify event-driven programming
  11. MVVM - Failures Unless you can model your entire system

    synchronously, a single asynchronous source breaks imperative programming. Jake Wharton - Managing State with Rx

More Decks by HIFILEO

Other Decks in Technology