Business Delegate/Session Facade fitting into an MVC application
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
design can anyone tell me how Business Delegate and Session Facade patterns
fit into this?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Roland Barcia: IBM Distinguished Engineer, CTO Mobile for Lab Services
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
In my application, I use web services as well as RMI, depending on what I need to get. The business delegate simply provides a consistant face and throws only application specific errors and not things like RemoteException or SQLException. One call to a delegate might use RMI, the other might use a web service, and a 3rd might use a servlet.
With the Session Facade, the idea is to hide the database structure as well as the fact that you are using one or more entity beans. All of your business logic is handled at this layer. This is a great way to wrap groups that need to exist under the same database transaction, etc.
Hopefully this helps.
Regards,
Paul
Where Photography meets vision.<br /><a href="http://www.photogravision.com" target="_blank" rel="nofollow">http://www.photogravision.com</a><br />Please stop by!<br /> <br />SCJP,SCWCD,SCJD,SCEA
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Business Delegate would reside where the client does?
Also, does this mean that the Business Delegate acts as the Controller in
the MVC design, or does the Controller reference the Business Delegate?
Thanks alot.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
The view portion of the application is java swing rather than web based (JSP, etc). I assume the
Business Delegate would reside where the client does?
Also, does this mean that the Business Delegate acts as the Controller in
the MVC design, or does the Controller reference the Business Delegate?
Yes. The Business Delegate would reside on the client side and hide all of the communication marshal/unmarshal details. I look at the delegate a more of the model portion and the controller references the delegate.
Paul
Where Photography meets vision.<br /><a href="http://www.photogravision.com" target="_blank" rel="nofollow">http://www.photogravision.com</a><br />Please stop by!<br /> <br />SCJP,SCWCD,SCJD,SCEA
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
encapsulate home lookup logic?
Thanks.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Paul
Where Photography meets vision.<br /><a href="http://www.photogravision.com" target="_blank" rel="nofollow">http://www.photogravision.com</a><br />Please stop by!<br /> <br />SCJP,SCWCD,SCJD,SCEA
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Originally posted by Barry Brashear:
Should the Business Delegate interface with an EJBHomeFactory object to
encapsulate home lookup logic?
Thanks.
Hi,
you can make your BD interface with a EJBHomeCache or ServiceLocator. The business delegate hides the complexity of talking to a remote object and the HomeCache/ServiceLocator hide the complexity of JNDI lookup and also can cache home interfaces and/or store home or component handles for your app.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
....
IComponentMaker componentMaker = ComponentMaker.makeComponentMaker();
IJobManager jobManager = (IJobManager)componentMaker.makeComponent("IJobManager");
//create a JobDTO and save it
jobManager.saveJob(jobDTO);
....
Now it's really the 'saveJob's responsibility to interact with the EJB stuff (which is behind the scenes). You, as a client of the BD, wouldn't bother much how all the work is going on behind the scenes. And you, as a provider of BD, will have to take all the pains to get a remote ejbobject, and talk to it (or whatever it takes to save the job).
HTH,
Kalyan.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
The view portion of the application is java swing rather than web based (JSP, etc). I assume the Business Delegate would reside where the client does?
I've been working on some systems where we use the BD for client-side proxying. The Swing client invokes a business method which the local proxy takes care of by invoking a SOAP request. This request is received thousands of miles away by a web services servlet which invokes the corresponding business method on a stateless session bean. In due course, the return object is received by the proxy which passes it to the client.
Also, the proxy caches data and performs some data transformation.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
| no wonder he is so sad, he hasn't seen this tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |









