In order to achieve loose coupling between the WEB layer (Struts) and the Hibernate, we adopt two modes of business delegate and DAO (Data Access Object). DAO mode In order to reduce the coupling between business logic and data access logic, this mode will reduce the coupling between the business object and the framework when a persistent framework is applied, so that we can do not modify the business object. Realization of the long-lasting layer frame. In fact, two structural modes are included in the DAO mode: Bridge (Bridge) mode and AdapTOR mode.
As shown below:
Where ClientObject refers to the Action object of Struts.