Opened 20 months ago

Last modified 15 months ago

#5843 new change

Proposal: Implement MVVM Architecture

Reported by: dzhang Assignee: dzhang
Priority: Unknown Milestone:
Module: Adblock-Plus-for-iOS/macOS Keywords:
Cc: Blocked By:
Blocking: Platform: iOS
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by dzhang)

This is an umbrella issue that covers multiple issues related to the implementation of MVVM architecture for ABP.

Background

Why MVVM?

  1. It's an improvement over MVC ("Massive View Controller")
  2. Implemented in ABB (by Salsita)
  3. Supports cross-platform development ie (iOS/macOS)
  4. Allows for "UI testing without a UI"
  5. Views can be "reactive" without dependence on shared mutable state
  6. Results in less code with clearer structure

What is a ViewModel?

It's a class that provides functions for the input and output of a view. It is independent of UI dependencies ie (UIKit/AppKit).

Where do view controllers fit in?

View controllers present Views using a View Model to handle input/output.

How is MVVM implemented?

Using RxSwift.

What to change

Implement MVVM according to individual issues describing specific implementation contexts.

Implementation History

  • #6409 GDPR compliance for Adblock Plus for iOS

Change History (4)

comment:1 Changed 19 months ago by dzhang

  • Priority changed from Unknown to P3

comment:2 Changed 15 months ago by dzhang

  • Cc fhd mario tpregueiro ashephard CraftyDeano removed
  • Owner set to dzhang
  • Priority changed from P3 to Unknown

comment:3 Changed 15 months ago by dzhang

  • Description modified (diff)

comment:4 Changed 15 months ago by dzhang

  • Milestone Adblock-Plus-for-iOS-next deleted
Note: See TracTickets for help on using tickets.