Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

core Patterns: Aren't Session Façade and Application Service overlapped?

 
Antonio Fornie
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I'm still reading Core J2EE Patterns and I have another doubt I couldn't find anwser for in the forums: Having a Business Delegate and a Session Façade, what's the use of a Application Service? I thought encapsulating business tier objects was already Session Façade's responsibility, isn't it?

Thank you very much!
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question. Typically, a Business Delegate is on the Presentation tier. The Session Facade is on the Business tier. These guys communicate with each other.

For example, you would have a reference to a Business Delegate in your web servers. A Controller would get this reference to send commands/data to Business tier. Business Delegate would then have reference to Session Facade, so forth and so on...

The only reason you might have a Business Delegate on the Business tier would be if there was another system on other machines. The delegate would then be used to get to this system and send commands/data...

 
Antonio Fornie
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much. But I still don't see where to put the Application Service. In the architecture you describe there's not Application Service and we don't feel something's missing, so when to use it? I mean the Application Service, not the BusinessDelegate or SessionFaçade.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't remember the details of the Application Service design pattern and have never attempted to use this pattern. Keep in mind that not all three-tier applications will use all of the patterns in existence. Moreover, many patterns in general have overlapping or similiar characteristics.

Basically, the Application Service pattern provides a different or other way to organize/design the Business tier components. As with many things in software design, there are many, many "correct" ways to do things. A lot will be influenced by "your" personal style and experience, when it comes to making design decisions.

Good luck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic