• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Facade vs. Business Delegate

 
Gennady Shapiro
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These two patterns are very similar functionally, except Session Facade is server-bound and Business Delegate is client bound. They both provide:
-reduced coupling
-increased managebility
-simpler interface
-better performance
-cetralized management (SF-resources,BD-exceptions)
Can someone (who actually had this on the exam) point out how Sun formulate the question about how to distinguish them and what are the hints? These are simple patterns but it's a very close call.
http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns /J2EEPatternsRoadmap.html
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In mine, they didn't have both of them as an answer
Mark
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can someone (who actually had this on the exam)
That pretty much eliminates me.....
- satya
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The options given in the test are very unambiguous and you simply cannot go wrong. I encountered two types of questions covering the patterns section
  • A business scenario is described and you are required to choose one( or more ) patterns that you would employ.
  • One or more features/benefits of a pattern is described in plain English. You are required to identify the pattern.


  • Hope that helps.
     
    Paul Michael
    Ranch Hand
    Posts: 697
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    ...so what really are the differences between Session Facade and Business Delegate patterns?
     
    R K Singh
    Ranch Hand
    Posts: 5384
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    As far as I have gone through these topic at http://developer.java.sun.com/developer/restricted/patterns/J2EEPatternsAtAGlance.html and
    at http://java.sun.com/blueprints/patterns/j2ee_patterns/catalog.html
    I found that Session Facade is more about reducing network traffic and Bussiness Delegate is more about hiding complexities on client. Bussiness delegates can be thought of kind of wrapper for Server beans which hides reapeating code everytime likek lookup etc.
    CMIW
    HTH
     
    Jeff Mychasiw
    Greenhorn
    Posts: 5
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    FYI,
    These patterns are explained very well in the Book: EJB Design Patterns. You can find a PDF at www.theserverside.com
     
    R K Singh
    Ranch Hand
    Posts: 5384
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Originally posted by Jeff Mychasiw:
    FYI,
    These patterns are explained very well in the Book: EJB Design Patterns. You can find a PDF at www.theserverside.com

    Thanks for info..
    When I tried there 2 weeks back it said that it will be available soon. Thanks ..
     
    deneb shah
    Ranch Hand
    Posts: 60
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Session Facade
    By meaning facade is some kind of an abstraction.
    Lets say that when you want to access the a number of entities. Say u r the teacher and u want to see the attendance of students, if u want to see any important notice on the notice board on the site and so on and so forth.
    you would create a facade so that that object calls all these entities and not you.
    It does the following
    - reduces network
    - helps maintain transaction across entities

    BusinessDelegate
    by definition a delegate refers to a representative. a business delegate is supposed to be a business representative.
    So if u have a business service available, u would create a business represntative on the presentation layer so that the presentation layer is independent of the business/service layer
    this
    - hides the complexity of an application to connect to the business systems
    - enables easy development since now the presentation layer can work independently of service layer
    - it can cache data thats on the server side so to as to decrease the round-trip
    Typically a sytem would be
    Servlet -- Action Object -- BusinessDelegate -- SessionFacade -- Entities -- Back-End system

    Some place where experience helps and certifications dont
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic