4層結構

來源:互聯網
上載者:User
User Interface (or Presentation Layer)

使用者介面(或者表現層)

Responsible for showing information to the user and interpreting the user's commands. The external actor might sometimes be another computer system rather than a human user.

負責向使用者顯示資訊以及解釋使用者的命令。外部的使用者有時可能是另外一個電腦系統而不是真正的人。

Application Layer

應用程式層

Defines the jobs the software is supposed to do and directs the expressive domain objects to work out problems. The tasks this layer is responsible for are meaningful to the business or necessary for interaction with the application layers of other systems.

定義軟體被設定的工作,以及指導功能強大的domain層對象來把工作搞定。這層負責的任務對業務來說很有意義的,同時也必然對與其他系統的應用程式層互動很有意義。

This layer is kept thin. It does not contain business rules or knowledge, but only coordinates tasks and delegates work to collaborations of domain objects in the next layer down. It does not have state reflecting the business situation, but it can have state that reflects the progress of a task for the user or the program.

這層被保持得很薄。它不包含商務邏輯或者業務相關的知識,而只是協調任務以及把任務委託給下一層中的一組對象。它不包含能反映業務的狀態,但是它能夠為使用者或者程式有反映任務完成的進度。

Domain Layer (or Model Layer)

領域層(或者模型層)

Responsible for representing concepts of the business, information about the business situation, and business rules. State that reflects the business situation is controlled and used here, even though the technical details of storing it are delegated to the infrastructure. This layer is the heart of business software.

負責代表業務的概念,業務狀態的資訊以及商務規則。反映業務的狀態在這兒被控制和使用,雖然如何把他它儲存的技術細節是委託給基礎設施層。這層是業務軟體的核心。

Infrastructure Layer

基礎設施層

Provides generic technical capabilities that support the higher layers: message sending for the application, persistence for the domain, drawing widgets for the UI, and so on. The infrastructure layer may also support the pattern of interactions between the four layers through an architectural framework.

提供通用的技術功能以支援其上的層次:應用程式層的訊息發送,領域層的持久化,表現層的控制項繪出,等等。基礎設施層可能還通過架構型架構支援四層之間的互操作。

-- from domain driven design

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.