Business delegate pattern: Difference between revisions

Content deleted Content added
No edit summary
m minor fixes, replaced: - → – (2)
Line 1:
'''Business delegate''' is a [[Java Platform, Enterprise Edition|Java EE]] design pattern.
<ref name=":o_cjp">{{Cite web|url = http://www.oracle.com/technetwork/java/businessdelegate-137562.html|title = Core J2EE Patterns - Business Delegate|date = |accessdate = 22 June 2016|website = Oracle|publisher = Oracle|last = |first = }}</ref> This pattern is directing to reduce the [[Coupling (computer programming)|coupling]] in between business services and the connected presentation- tier, and to hide the implementation details of services (including lookup and accessibility of [[Enterprise JavaBeans|EJB]] architecture).<ref name=":o_cjp"/><ref name=":stdd">{{Cite book|title = Screening Technical Design Document - Version 2.0|last = |first = |publisher = Indiana state|year = |___location = Indiana, USA|volume = |pages = 7}}</ref> Business delegates acts as an adaptor to invoke business objects from the presentation tier.<ref name=":pjeesp">{{Cite book|title = Pro Java EE Spring Patterns|last = Kayal|first = D.|publisher = Apress|year = 2008|___location = New York|volume = |pages = 161–166}}</ref>
 
==Structure==
Line 9:
 
====Business delegate====
Control and protection are provided through business delegate which can have two types of constructures, without ID and with ID, where ID is a string version of the reference to a remote object such as EJBHome or EJBObject.<ref name=":o_cjp"/>
ID is a string version of the reference to a remote object such as EJBHome or EJBObject.<ref name=":o_cjp"/>
 
====Lookup Service====
Business service is located by lookup service which is used by the business delegate. The implementation details of business service lookup is encapsulated by lookup service.<ref name=":o_cjp"/>
 
====Business Service====
Line 25 ⟶ 24:
 
==Concerns==
Following concersconcerns can be considered:
* Maintenance due to the extra layer that increases the number of classes in the application.
* Business delegate should take care of the changes of the remote business object interfaces, and these types of changes are rare.<ref name=":pjeesp"/>
 
Line 142 ⟶ 141:
}
</source><ref name=":o_cjp"/>
Remote interface for ResouceSessionResourceSession:
<source lang="java">