端点是控制器上的动作/操作。视图是控制器响应 HTTP GET 请求而返回的数据(HTML、XML、JSON 或其他)。
服务 A 不表示为服务 B 的 MVC 三元组的一部分,因为 MVC 处理针对模型的交互以及控制器对视图的选择。服务 A 通过服务 B 的数据访问层进行访问。如果您使用“活动记录”模式,则服务 B 中的控制器对模型的查询或更改将由模型本身传递到数据访问层。如果您使用域服务/数据映射器/存储库模式,控制器将调用封装数据访问的这一层。
Endpoints are actions/operations on the Controller. Views are the data (HTML, XML, JSON, or otherwise) returned by the controller in response to an HTTP GET request.
Service A is not represented as part of the MVC triad of Service B, since MVC deals with the Interactions against the Model and selection of Views by a controller. Service A is accessed though the Data Access layer of Service B. If you are using an "Active Record" pattern, then queries or changes to the Model by the Controller in Service B will be passed through to the data access layer by the Model itself. If you are using a Domain Service / Data Mapper / Repository pattern, the controller will call out to this layer which encapsulates Data Access.
发布评论
评论(1)
端点是控制器上的动作/操作。视图是控制器响应 HTTP GET 请求而返回的数据(HTML、XML、JSON 或其他)。
服务 A 不表示为服务 B 的 MVC 三元组的一部分,因为 MVC 处理针对模型的交互以及控制器对视图的选择。服务 A 通过服务 B 的数据访问层进行访问。如果您使用“活动记录”模式,则服务 B 中的控制器对模型的查询或更改将由模型本身传递到数据访问层。如果您使用域服务/数据映射器/存储库模式,控制器将调用封装数据访问的这一层。
Endpoints are actions/operations on the Controller. Views are the data (HTML, XML, JSON, or otherwise) returned by the controller in response to an HTTP GET request.
Service A is not represented as part of the MVC triad of Service B, since MVC deals with the Interactions against the Model and selection of Views by a controller. Service A is accessed though the Data Access layer of Service B. If you are using an "Active Record" pattern, then queries or changes to the Model by the Controller in Service B will be passed through to the data access layer by the Model itself. If you are using a Domain Service / Data Mapper / Repository pattern, the controller will call out to this layer which encapsulates Data Access.