Action Domain Responder

Action-Domain-Responder: a web-specific alternative to Model-View-Controller.

  • 所有者: pmjones/adr
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Action Domain Responder

Action Domain Responder organizes a single user interface interaction between an HTTP client and a HTTP server-side application into three distinct roles.

ADR

Components

Action is the logic to connect the Domain and Responder. It invokes the Domain with inputs collected from the HTTP request, then invokes the Responder with the data it needs to build an HTTP response.

Domain is an entry point to the domain logic forming the core of the application, modifying state and persistence as needed. This may be a Transaction Script, Service Layer, Application Service, or something similar.

Responder is the presentation logic to build an HTTP response from the data it receives from the Action. It deals with status codes, headers and cookies, content, formatting and transformation, templates and views, and so on.

Collaborations

  1. The web handler receives an HTTP request and dispatches it to an Action.

  2. The Action invokes the Domain, collecting any required inputs to the Domain from the HTTP request.

  3. The Action then invokes the Responder with the data it needs to build an HTTP response (typically the HTTP request and the Domain results, if any).

  4. The Responder builds an HTTP response using the data fed to it by the Action.

  5. The Action returns the HTTP response to the web handler sends the HTTP response.

Reading

Resources

Example code resides in the example repository.


You can read about the history of this pattern here, and you can find the acknowledgments here.

主要指標

概覽
名稱與所有者pmjones/adr
主編程語言HTML
編程語言HTML (語言數: 1)
平台
許可證
所有者活动
創建於2014-05-06 15:01:09
推送於2022-02-28 16:23:43
最后一次提交2022-02-28 10:23:43
發布數0
用户参与
星數1.1k
關注者數64
派生數64
提交數224
已啟用問題?
問題數30
打開的問題數4
拉請求數34
打開的拉請求數0
關閉的拉請求數3
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?