↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

The SAM (State - Action - Model) pattern

SAM is described as a reactive, functional pattern for frontend architecture. It separates business logic from the view, decouples backend APIs from the frontend, and is said to work across web apps, native apps, and different protocols.

The page also frames SAM as a replacement for MVC. It says SAM is reactive rather than interactive, and that its main change is the introduction of State, which further separates the view from the model and treats the view as a State Representation.

Reading notes
#

  • SAM is a reactive and functional pattern.
  • It separates business logic from the view.
  • It strictly decouples backend APIs from the frontend.
  • It is technology independent and can be used for web apps or native apps.
  • It is protocol independent and can be implemented over HTTP, WebSockets, and other protocols.
  • It aims to replace MVC.
  • SAM is reactive, while MVC is generally implemented in an interactive way.
  • SAM is not described as a reactive implementation of MVC.
  • SAM introduces State to further decouple the View from the Model.
  • The view is treated as a State Representation.