学习《企业应用架构模式》(Patterns of Enterprise Application Architecture)C02 组织领域逻辑

领域逻辑的组织可分为三种主要模式:事务脚本、领域模型以及表模块;

  • 事务脚本:最简单;
  • 领域模型:面向对象,使用多个对象的组合完成需求任务,将 可以完成复杂的逻辑,当然也兼容简单逻辑;
  • 表模块:与领域模型相似,区别在于对数据库中所有合同只有一个共同的合同类实例,在一个用于处理合同的表模块中,客户需要先对数据库进行查询以生成一个记录集,然后以该记录集为参数创建一个合同对象。
许多方面,表模块是事务脚本和领域模型的一个中间地带,其最大优点在于其与软件架构中已有部分的衔接。

如何选择可以参考下图;

开发小组的经验越丰富,则越推荐使用领域模型;

服务层
通常将领域层独立出服务层,置于底层的领域模型或表模块之上。表现逻辑与领域层的交互完全通过服务层,类似于API。
而“控制器—实体风格”,建议最小化服务层;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Enterprise Application Architecture with .NET Core by Ganesan Senthilvel English | 25 Apr. 2017 | ASIN: B01M18CQNP | 564 Pages | AZW3 | 9.94 MB Architect and design highly scalable, robust, clean and highly performant applications in .NET Core 1.0 About This Book Incorporate architectural soft-skills such as DevOps and Agile methodologies to enhance program-level objectives Gain knowledge of architectural approaches on the likes of SOA architecture and microservices to provide traceability and rationale for architectural decisions Explore a variety of practical use cases and code examples to implement the tools and techniques described in the book Who This Book Is For This book is for experienced .NET developers who are aspiring to become architects of enterprise-grade applications, as well as software architects who would like to leverage .NET to create effective blueprints of applications. What You Will Learn Grasp the important aspects and best practices of application lifecycle management Leverage the popular ALM tools, application insights, and their usage to monitor performance, testability, and optimization tools in an enterprise Explore various authentication models such as social media-based authentication, 2FA and OpenID Connect, learn authorization techniques Explore Azure with various solution approaches for Microservices and Serverless architecture along with Docker containers Gain knowledge about the recent market trends and practices and how they can be achieved with .NET Core and Microsoft tools and technologies In Detail If you want to design and develop enterprise applications using .NET Core as the development framework and learn about industry-wide best practices and guidelines, then this book is for you. The book starts with a brief introduction to enterprise architecture, which will help you to understand what enterprise architecture is and what the key components are. It will then teach you about the types of patterns and the princip

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值