Diferences between Business Delegate and Session Facade

Hi, I've been programming with java for a long time now, but recently decided to formally studing the J2EE patterns. By now I have the intuition of many of them but in paper looks a little confusing. Let me ask you what is a clear diference between Business Delegate and Session Facade.
For me, exposing interfaces, hiding implementations and masking the complex interactions in the back are common factors in these patterns, could you please help me to identify diferences?

There are more subtle differences, but the basic gyst is that the Business Delegate is used on the client/presentation tier. The Session Facade is used on the server/service tier. The Business Delegate typically performs a lookup of the SessionFacade which in turn fronts a service method (EJB or otherwise). The Business Delegate pattern is typically associated with J2EE remoting and its shortcomings.
- Saish

Similar Messages

  • Business delegate and Session facade design patterns

    Does any one tell me, what is the difference between business delegate and session facade design patterns.

    1. Session Facade decouples client code from Entity beans introducing session bean as a middle layer while Business Delegate decouples client code from EJB layer ( Session beans).
    2. SF reduces network overhead while BD reduces maintenance overhead.
    3. In SF any change in Session bean would make client code change.
    While in DB client is totally separate from Session bean because BD layer insulate client from Session beans(EJB layer).
    3. In only SF scenario, Client coder has to know about EJB programming but BD pattern no EJB specialization needed.
    4.SF emphasizes on separation of Verb, Noun scenario while BD emphasizes on separation of client(presentable) and EJB layer.
    Anybody pls suggest more differences ?

  • Business Delegate and Session Facade usage.

    Hi guys.
    I am new to JavaEE and I recently learnt the Business Delegate and Session Facade design patterns. The tutorials from Oracle did gave me a basic idea of what they are and why they are used, but the example didn't really answer all my questions. So I decided to use a real life scenario here and put my question in to it. Any help is appreciated.
    Assume I want to create a search employee page for my company, the employees are categorized by his or her department and the province he or she is in. I have in the database a look up table for department and province. (as shown in the image below)
    http://oi46.tinypic.com/idvpsl.jpg
    So I create three JPA entities, one for each table. Now I am stuck with what is the proper way to design the session facade design pattern. I know that I will need the to access all three entities in my page. (to get the drop down list for Provinces and Departments, and to retrieve list of Employees based on the selection) So should I create a Stateless Session Bean as session facade to access all three JPA Entities or should I create three separate Stateless Session Bean to manage one Entity each?
    I came up three component diagram in the below picture.
    The first one has one Stateless Session Bean as session facade and manages all three Entities.
    The second one has a session facade to manage the relationship between business objects such as ProvinceManagerEJB and DepartmentManagerEJB which will manage the corresponding Entities.
    The last one has three Stateless Session Beans that will manage one Entity each, all three Stateless Session Beans can be looked up via the Business Delegate pattern.
    http://oi46.tinypic.com/10pqets.jpg
    Please let me know if any one of them is the proper way to use business delegate and session facade. or none of them is correct. (which I assume might happen)
    Again, thank you so much for your help.
    Cheers
    Edited by: 992005 on 05-Mar-2013 18:15
    Edited by: 992005 on 05-Mar-2013 18:17

    Well I can't access any of your diagrams from here so can't comment on them. For dividing the functionality into separate classes, think about
    1.) Quantity - Are there many enough service calls to require splitting up or will one application service class be enough? The size of the system is important here.
    2.) Are you duplicating logic in the services? e.g save person, delete person in one service and save department, delete department in another e.t.c is better factored into one service with save entity, delete entity calls because the JPA entity manager doesn't know about the type anyway and it's easier to apply common logic (e.g logging auditing) around the calls.
    3.) Will each service makes sense on it's own or do you always need the other functionality to completely describe the service? Here it is important not think about entities but about the business use cases. Process1Service is better than Entity1Service, Entity2Service ... EntitynService.Think granule of reuse = granule of release. Only split out individually reusable services. A good way to understand granules of reuse in your system is to think about (or start by writing) test cases for the functionality. Testable code is reusable code.
    4.) Will the services change together? At class level you would look at common closure principle (classes that change together should be packaged together). You can apply the closure to the methods as well. Make it easy for future developers to recognize dependent functionality by packaging it together.
    These are just general because in enterprise development requirements are king. You can chose to follow or discard any of these rules depending on your requirements as long you understand the impact of each decision.

  • Business Delegate and Session Facade

    Business Delegate as well as Session Facade are used to reduce coupling between presentation-tier clients and business services.
    Could someone provide the key differences between these two patterns.
    And one more, is Session Facade applicable(can be implemented) only to Enterprise Java Beans? Or even a POJO can be a Session Facade
    Thanks in Advance

    Business Delegate as well as Session Facade are used
    to reduce coupling between presentation-tier clients
    and business services.
    Yes. And also in EJB to overcome some of the deficiencies in distributed architectures.
    Could someone provide the key differences between
    these two patterns.
    Business Delegate is used by a client whereas the Session Facade is used to abstract a business service.
    And one more, is Session Facade applicable(can be
    implemented) only to Enterprise Java Beans? Or even a
    POJO can be a Session Facade
    Yes. Think of a session facade as your 'easy' or 'high-level' API. Your actual business tier may have its own 'low-level' API that callers should not have to interact with or understand.
    Thanks in AdvanceYou're welcome.
    - Saish

  • Business Delegate and Session Facade Pattern

    Hi!
    The only way to use the Session Facade Pattern, is if I use EJB for Persistence.
    Is valid to do this?:
    I use Ejb for simple update, insert querys. From my business delegate I call the Session Facade Layer, and from this I invoque Entyties for persistence.
    But if I have complex querys, is correct to make PL SQL Procedures and do the following:
    From my business delegate I call to the Dao layer, and from this via JDBC I call the Procedure.
    Please explain me the best form to do this, having complex querys for reporting and simple querys for inserts/update.
    Is valid to combine the use of CMP (for simple persistence cases), BMP (for complex persistence cases), and JDBC for complex select querys with multiple result rows.
    Thanks!!

    It depends on your design goals. One of the forces driving the use of patterns is the desire to tier an application and abstract the internals of each tier away from the other tiers. One (normal) benefit of this methodology is that the application should become more portable. Now, if you are using PL/SQL, BMP and CMP, you are mixing and matching portable versus proprietary. This is okay. But you should abstract away whether you are using PL/SQL, BMP or CMP from the business layer (or domain model). Ideally, you could completely swap database technologies (say from relational to object) and only have to re-write your integration tier (your DAO's).
    Session facade is simply a glorified Facade pattern. It abstracts the lower-level details of what you are persisting and instead forces you to think in terms of objects. You can use a facade without even remotely touching EJB's. It just so happens that, historically, EJB containers made a mess out of scalability when it came to entity beans. The "session" facade refers to a facade pattern implemented in session beans (that have fewer scalability problems) communicating with the entity beans which do have scalability problems.
    So... to make a long story short, use whatever persistence mechanism you desire. Remember that you should be able to completely switch your persistent store from one type or another and simply re-write your DAO's (or CMP deployment descriptors). Using a facade pattern can help towards this end, but don't make it a straightjacket.
    - Saish
    "My karma ran over your dogma." - Anon

  • Bussiness Delegate vs Session Facade.

    Hi,
    Please any one tell me what are the differences between Bussiness Delegate and Session Facade.
    I read some documentation in online but not clear in above two design patterns.
    Any help I will appricate.
    Thanks,
    CDulla.

    A business delegate is generally thought of as a plug-in that is given to the client developer. This "plug-in" can do service lookups and searches on behalf of the client developer. Very smart if you have a Swing or Servlet Developer that doesn't know ejbs.
    A session facade is a session bean that is much like the delegate but resides on the server and is used to encapsulate course services so that network can be held to a minimum.
    A business-delegate can call a session facade which in turn can call an entity bean

  • Service Locator and session facade pattern

    What are differences between Service Locator and session facade pattern?
    For me it seems one and the same.
    Please explain me in detail. Expecting kind help.
    Thanks,
    Rahul
    Edited by: rahulb1 on Feb 26, 2008 5:07 PM

    rdoekes wrote:
    The ServiceLocator Pattern is a singleton which hold a map of used DataSources. The idea is that you perform a lookup once and use the cache afterwards. The session facade is just one DataSource lookup.huh? Those J2EE patterns are not really reduced to datasources and the SessionFacade has actually nothing to do with datasources.
    Session Facade
    It has Facade in it and a Facade is usually used to give a simple entrypoint by providing a standartized interface. The same is now with the Session Facade. You have a Session bean that represents a high-level business component that interacts and calls lower-level business components.
    Imagine having client a accessing 5 business objects with the remote calls, which is not an efficient way (network latency) or accessing the SessionFace and the session face is doing all the work through local access.
    Service Locator
    As J2EE components are using JDNI to lookup for ejb interfaces,DataSources, JMS components, connections etc. isntead of writing all the lookup in many code piecess across the project, you write a service locator that gives you a centralized place to handle the lookup's. It's easier to maintain and to control such a setup.
    As you can see there's quite a big difference ;-)
    cya,
    Nail

  • Business Delegate and Service Locator

    Hi all,
    I read the Business Delegate Pattern
    and my question is about how many Business Delegate
    I must write:
    a) one for every Session Beans ?
    (in a Session Facade Pattern)
    b) one for all Session Beans ?
    Is it right that I must have a single Business Delegate
    and different Service Locators if I need to
    call the same EJBs deployed inside different Application Servers ?
    Many thanks in advance,
    Moreno

    Please explaine your Question in more Detail?

  • Facade and Session Facade

    All,
    Well this is the closet forum i could get to post my question so please excuse me if it is in wrong place.
    Can anyone mention the types of facade design pattern available ? Also what is the diff between Facade and Session Facade ?
    PS : My application is getting developed in ADF :)
    thnks

    in the line of fire wrote:
    All,
    Well this is the closet forum i could get to post my question so please excuse me if it is in wrong place.
    Can anyone mention the types of facade design pattern available ? Also what is the diff between Facade and Session Facade ?This is no really ADF specific. You may wish to consult both the "Gang of Four" book along with Fowler's "Patterns of Enterprise Architecture."
    A quick answer: the Facade pattern defines an object ( or method on an object) that executes a workflow involving other objects that you wish to hide from client applications or objects.
    A session facade is the same idea applied to JEE session beans, where a single call to a session bean may include interacting with other beans, entities, databases, etc.
    Hope that helps,
    Chad
    >
    PS : My application is getting developed in ADF :)
    thnks

  • What is the difference between Business System and Business Service?

    Hi
    Please tell me what is the difference between Business System and Business Service...? In real time at what situation we will use Business System and in what situations we will use Business Service..? Please help me
    Best Regards
    Ravi Shankar B

    HI,
    Business system:
    If you want to address a particular business system as the sender or receiver of messages, choose this service type.
    A business system is an actual application system in a system landscape. A business system (service) comprises information about the inbound and outbound interfaces and the software component versions of the business system.
    You usually use business system services when configuring internal company processes.
    Business Service:
    If you want to address an abstract business entity as the sender or receiver of messages, choose this service type.
    Using a business service, you can define the technical or business subunits of the companies involved and then assign them the relevant interfaces.
    You usually use business services when configuring cross-company processes. In this case, you only make your interfaces known to the business partners involved and either do not make any details about your own system landscape available, or only specific details. 
    For example, you can define RosettaNet Partner Interface Processes (PIPs) as business services.
    Regards,
    Sudheer.

  • Difference between Business system and Business service.

    Hi All,
    Can any one explain in detail difference between Business system and Business service.
    As we commonly say, Business service is for those system which are not in our landscape.
    Can any one explain in which particular scenarios we will go for Business Service.
    Reg
    Bapuraj

    Hi Bapuraj,
    Business System
    Business system is a logical system, and there is an importance on physical existence of the system.Also SLD entry is required.
    It is generally used for SAP applications, this is just a general prinicple followed but not mandatory.
    Business Component(formerly Service)
    You use a Business Component, when you do not have the System details of the the partner system to which you want to communicate. i.e. you have not configured the partner system in SLD.
    Business Service is an Absract Unit with Sender and Receiver Interfaces,In this case you need to explicitly add the message interfaces while doing configuration in ID.
    It is generally used for NON-SAP applications, this is just a general prinicple followed but not mandatory.
    <REMOVED BY MODERATOR>
    <LINKS CAN BE SEARCHED FOR BASIC QUESTIONS>
    -santosh.
    Edited by: Prateek Raj Srivastava on Jan 12, 2012 10:01 PM

  • Difference between Business Process and Workflow

    Hi all,
    What is the difference between Business Process and Workflow? i have googled it and I don't really understand that complicated definition? Is there any examples to illustrate the difference between the both?

    Hi,
    I will try to put here , my perspective of this. If somebody knows better, they can update further on this.
    Business process is purely on the perspective of the users. It may or maynot have anything to do with the system. When a draw a business flow diagram, we dont take care of how each and every process is handled in the system. The best illustration is an example of authorisation.
    Let me say that I create a Purchase requisition. Once it is released a PO will be created by procurement managerD
    This is a business process. However if we look at the system perspective, it can be like this.
    1. Create a PR.
    2. Check the value of the PR
    3. If value <$100,an email needs to be send to person A, if it is $100 to 300$, an email should be send to person B and if >$300, an email should be send to B and C.
    4.Once it is released, an email shoudl be send to D for creating a PO on this PR.
    Here not only the process, but also how the work is delegated across  various entities of the process is mentioned.
    There are softwards like VISIO which actually take care of the business process in the perspective of the entities involved in the process. A workflow is a moredetailed version of business process with the roles of entities clearly defined and hence configured well in the system.
    The concept is workflow is mostly used in the processes of authorisations, business activity monitoring(BAM), etc.
    Hope I make it little clear to you.
    You can reward if my response is of some help to you

  • Difference Between Business Object And Class Object

    Hi all,
    Can any one tel me the difference between business object and class Object....
    Thanks...
    ..Ashish

    Hello Ashish
    A business object is a sematic term whereas a class (object) is a technical term.
    Business objects are all important objects within R/3 e.g. sales order, customer, invoice, etc.
    The business objects are defined in the BOR (transaction SWO1). The have so-called "methods" like
    BusinessObject.Create
    BusinessObject.GetDetail
    BusinessObject.Change
    which are implemented (usually) by BAPIs, e.g.:
    Business Object = User
    User.Create => BAPI_USER_CREATE1
    User.GetDetail => BAPI_USER_GET_DETAIL
    CONCLUSION: Business Object >< Class (Object)
    Regards
      Uwe

  • Difference between Business area and profit center accounting

    Hi Frnds,
    Can any body explain about difference between business area and profit center accounting .

    Hi
    Business area will have many profit centers. For example Vehicle is a business area in a company. Vehicle can be cars and Bikes etc. Here Vehicle is business area and Cars and Bike are profit centers. In broad Vehicle is a profit center. But as it has sub areas those are profit centers. So profit centers cannot be replaced with business area and vice versa. We can replace business area by Profit centre, only condition is that it should be in same controlling area. The business area is more like a business unit of a company. You can have multiple profit centers within a business area.
    Main distinguish factor is that distribution and assessment in possible in profit center but not in business area.
    One more distinction is that Business area need not be attached to any organisation structure. But profit centres can be created only under the controlling area. Business area can be across controlling area.
    Business area concept is used for making stragic decisions by the management whereas the primary purpose of profit centre accounting is responsibility accounting.
    http://help.sap.com/saphelp_erp2005/helpdata/en/ff/277203deea11d3b5b4006094b9b0a5/frameset.htm

  • Difference between Business Partner and Customer in ISU?

    Is there any difference between business partner and customer in ISU?
    if yes then wht?

    Hi,
    Yes Business Partner is a broad term used in ISU for various roles. A business Partner can be a Customer for company, an employee or even a vendor.
    It depends on what role business partner has been given.  Initially by default all Business Partners are assigned a default role "Business Partner (Gen.)". Later it can be changed to any role like Employee, Vendor, etc.
    Business Partner with role "Contract Partner" is normally the end Customer which I believe you are referring to.
    For more info on Business Partner, please check below link:
    [Business Partner Master Data|http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABP/CABP.pdf]
    Thanks.
    Ravi

Maybe you are looking for