1, About Merchantspace Commerce 3Q: What's Merchantspace Commerce? A: Good Architecture .architecture Explain: JSP <- Struts <-> to <-> ba <-> to <-> bo-> to <-> DAO-> To <-> Hibernate <-> MySQLView Controller Local Applications Business ActionsBusiness 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 overheadfor most applications Which Don n't Require Distribute Computing (Remote Method Calls).
Business ObjectsBusiness objects are fine grained POJOs which each represent a single domain model object suchas 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 ObjectsData access object are POJOs used to abstract data access from the business logic tier.this allowsdevelopers 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 ObjectsTransfer 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 DTOQ: 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 Constructionors Dtos Should No T Contain Any Logic There Two Main Types of Dtos Database Persistent and Transient