Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Business Delegate

 
Udaya Bascar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
in business delegate pattern if i am asked to explain
for what purpose JSP's are used and
Servlets are used? what i have to say?
can some one explain the basics of BusinessDelegate Pattern?
when we will choose this pattern?
working of an sample EJB how its invoked and how the results are transferred to HTML in Business Delegate explain?
thanx
Regards
bascar
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main point of business delegate is to hide some implementation details from the client. Say I have an EJB service on my server and you'd like to use it from your server. You ask me "What do I have to do to use it?" I tell you all about EJB remote, initial context, home finders, proxies and all those details. Oh, and I'm thinking about changing my service to SOAP and then you'll have to learn XML and HTTP and SOAP and a bunch more stuff. You make this face:
After a few of these encounters, I build a business delegate that does all the EJB remote stuff. Now when you ask how to use my service, I say "Use this delegate. Just call a method." You make this face: And if I change from EJB to SOAP I give you a new business delegate with exactly the same interface and it doesn't bother you one bit.
As another bonus, I might do some performance optimization in my delegate, like caching common requests.
I don't see this relating directly to HTML. If your server happens to be a web server, you'd generate HTML using the data you got from my delegate just as you always would, maybe JSPs.
Hope that made sense!
 
Udaya Bascar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Stan
Thanx very much for the info
do u have any sample code that implements BusinessDelegate Pattern
with respect to an project in EJB
can u send me the code how business delegate is used to look up the
business services
waiting for ur reply
Thanx n advance
bye
baskar
 
Udaya Bascar
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am going to use weblogic6.1 as my appserver
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://www.google.de/search?q=business+delegate+example
 
Kishore Dandu
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there are ample examples for the J2EE patterns in Deepak Alur's book "J2EE Design Patterns". It will be useful for your pursuits.
Dan.
 
Mark Lybarger
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
another value i've heard mentioned to the business delegate pattern is that you gain better object orientedness. the comment was that it's hard if not downright impossible to do base/sub classing in ejb's ) VehicleBean -> CarBean -> MotorcycleBean, etc).
though this has nothing much to do with servlets/jsp's. those are merely one possible client to this business delegate.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic