model - Architecture Layers -
this vs solution:

and architecture:

i have few questions:
1) should start transaction , commit? service layer or presentation layer ? 2) should acess data layer ? service layer or model/core/domain layer ? 3) should acess "productdao" update product quantity ?
1) start on service layer. presentation doesn't need know transactions, , service layer 1 doing multiple operations want atomic
2) acccessing dal thats not clear. go service layer "the glue" between other classes. make sense make domain models know it.
3) commit should in same place transaction initiated otherwise end complex code , scenarios transaction doens't either commited or rolled back.
Comments
Post a Comment