Application Architecture Guide 2.0 学习笔记(一)前言 - Business Layer

本文提供了设计业务层的基本指导原则,包括如何实现业务实体、业务组件及应用服务外观等内容。建议根据业务需求选择合适的实现方式,如使用DataSet、XML或自定义对象等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 Business Layer

The following guidelines will help you to understand fundamental factors you must consider when designing the business layer for your application. Use these guidelines as a starting point toward understanding key concerns, such as when to use business entities, how to implement business components, and how to expose your business layer as a service. (下面的指导将帮助你理解在设计业务层时必须考虑的基础因素)


• How to implement business entities(如何实现业务实体)


If you are designing a small Web application or a service(如果是设计小型Web应用或者服务), and you want to take advantage of the disconnected behavior they provide, consider using DataSets(并且希望利用不保持连接的优势,考虑使用Dataset). If you are working with content-based applications that have few or no business rules, consider using XML(对于基于内容的应用,并且只有很少的或者没有业务规则,考虑使用XML). If you have complex business rules related to the business domain, or if you are designing a rich client where the domain model can be initialized and held in memory, consider using custom Domain Model objects(如果有业务领域内有复杂的业务规则,或者你在设计一个富客户端,它可以在初始化的时候把域模型载入内存,考虑使用自定也的域模型对象【Domain Model Objects】). If your tables or views in the database represent the business entities used by your application, consider using custom objects(如果数据库中的数据表与视图表现了应用中的业务实体,考虑使用自定义对象). If the data you are consuming is already in XML format, or if you are working with read-only  documentbased data, consider using custom XML objects(如果数据已经是XML格式,或者处理只读的基于文档的数据,考虑使用自定义XML对象).


For more information, see Chapter 11, “Business Layer Guidelines.”


• How to implement business components(如何实现业务组件)


The type of business component you implement depends on your business rules(业务组件的类型依赖于业务规则). If you have volatile business rules(如果业务规则不稳定), consider storing them in a separate rules engine(考虑将这些规则存储在独立的规则引擎中). If you want your business rules to be separate from the business data(如果希望业务规则与业务数据分开), consider using business process components(考虑使用业务处理组件). If your business processes involve multiple steps with long-running transactions, consider using business workflow components(如果你的业务处理包含多步走操作与长时间运行的事务,考虑使用业务工作流组件). A well-designed business component exposes data and functionality based on how the data is used, and abstracts the underlying data store and service(一个设计很好的业务组件 基于数据如何使用 公开功能与数据,并且抽象它下层的数据存储与服务). Do not mix unrelated functionality within a business component(不要将不相干的功能混合在业务组件内); for example, do not mix data access logic and business logic within the same component(例如:不要将数据访问逻辑和业务逻辑混在同一个组件内). Consider designing consistent input and output data formats for business components(考虑为业务组件设计始终一致的数据输入/输出格式).


For more information, see Chapter 11, “Business Layer Guidelines.”


• How to design application service façades(如何设计应用服务外观)


A well-designed application service façade exposes a simple interface by encapsulating cohesive behavior that is specific to a set of related business operations(一个设计良好的应用程序服务外观会公开一个简单的接口,该接口将一系列相关的业务操作封装成cohesive behavior ). Avoid including business logic in a service interface in order to improve reusability and maintainability and reduce duplication of code(为了提高可重用性与可维护性并减少代码重复,要避免将业务逻辑包含在服务接口中). Consider using standard protocols such as the SOAP as the communication medium to ensure maximum compatibility with a range of clients(考虑使用标准协议例如SOAP作为通信介质,来确保与更多的客户端保持最大的兼容性).

 

For more information, see Chapter 11, “Business Layer Guidelines.”

Windows 系统修复工具主要用于解决 Windows 11/10 系统中的各种常见问题,具有操作简单、功能全面等特点: 文件资源管理器修复:可解决文件资源管理器卡死、崩溃、无响应等问题,能终止崩溃循环。还可修复右键菜单无响应或选项缺失问题,以及重建缩略图缓存,让图片、视频等文件的缩略图正常显示,此外,还能处理桌面缺少回收站图标、回收站损坏等问题。 互联网和连接修复:能够刷新 DNS 缓存,加速网页加载速度,减少访问延迟。可重置 TCP/IP 协议栈,增强网络连接稳定性,减少网络掉线情况,还能还原 Hosts 文件,清除恶意程序对网络设置的篡改,保障网络安全,解决电脑重装系统后网络无法连接、浏览器主页被篡改等问题。 系统修复:集成系统文件检查器(SFC),可自动扫描并修复受损的系统文件。能解决 Windows 激活状态异常的问题,还可重建 DLL 注册库,恢复应用程序兼容性,解决部分软件无法正常运行的问题,同时也能处理如 Windows 沙箱无法启动、Windows 将 JPG 或 JPEG 保存为 JFIF 等系统问题。 系统工具维护:提供启动管理器、服务管理器和进程管理器等工具,用户可控制和管理启动程序、系统服务和当前运行的进程,提高系统的启动和运行速度,防止不必要的程序和服务占用系统资源。还能查看系统规格,如处理器线程数、最大显示分辨率等。 故障排除:集成超过 20 个微软官方诊断工具,可对系统问题进行专业排查,还能生成硬件健康状态报告。能解决搜索和索引故障、邮件和日历应用程序崩溃、设置应用程序无法启动等问题,也可处理打印机、网络适配器、Windows 更新等相关故障。 其他修复功能:可以重置组策略设置、catroot2 文件夹、记事本等多种系统设置和组件,如重置 Windows 应用商店缓存、Windows 防火墙设置等。还能添加重建图标缓存支持,恢复粘滞便笺删除
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值