FS3-AQ Architecture

博客介绍了MerchantSpace Commerce 3Q,阐述其架构,包含JSP、Struts、Hibernate、MySQL等。还介绍了业务对象、数据访问对象和传输对象,业务对象代表单一领域模型,数据访问对象抽象数据访问,传输对象用于不同应用层间传递数据,使代码更易读。

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

1、About MerchantSpace Commerce 3
Q:What's MerchantSpace Commerce?
A:Good Architecture .

Architecture Explain:
JSP  <-  Struts      <->TO<->BA<->TO<->BO<->TO<->DAO->TO<->Hibernate<->MySQL
View     Controller         Local Applications               

Business Actions
Business actions are Plain Old  java Objects(POJOs) which act as “facades“ by orchestraing
business processes such as “Submit Order“ which involve other busniess actions as well as
more  fine-grained business objects(aka.domain.objects).All Java objects in MerchantSpace
are POJOs as we have deliberately chosen our architecture in order to avoid the use of Enterprise
Java Beans (EJBs) which have proven to be cumbersome and with excessively high overhead
for most applications which don't require distribute computing (remote method calls).

Business Objects
Business objects are fine grained POJOs which each represent a single domain model object such
as Order.Customer,Address,etc.Business objects may be composed of other business objects in
domain model,but are never composed of higher level business actions.Any business logic which is
isolated to a singel business object is encapsulated in that object resulting in low coupling.

Dao Access Objects
Data access object are POJOs used to abstract data access from the business logic tier.this allows
developers at a later date to replace any piece of our persistence layer(currently Hibernate+a relational database)
with any other persistence technology such as an LDAP reponsitory,a web service or an object database.

Transfer Objects
Transfer objects are POJOs used to carry data to and from diferent application tiers.Transfer objects are
very lightweight objects which only contains properties and accessors.Moving data through the application by
using transfer objects enforces consistency and makes application code much more readable than passing a large
number of arbitray method parameters.

2、About DTO
Q:How to use DTO?Where dose is live?
A:

  • DTOs along with the APIs for each layer help to define the 'Contractual Agreement' between architectural layers
  • DTOs may contain other DTOs or collections of DTOs.
  • DTOs should only contain mutators,accessors and constructors
  • DTOs should Not contain any logic
  • There are two main types of DTOs
Database Persistent and Transient

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值