This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am using maven to build my web application. Maven suggests to have a separate project for each artifact (ear, war, ejb-jars). My doubt is where to place my business delegates? The J2EE core design patterns catalog places the business delegate in the business tier, but then, in the "solution" chapter of the business delegate it says "The Business Delegate acts as a client-side business abstraction...". Should I place my business delegate in the war or in a jar(beside the ejb-jars)? By the way, what is the difference between a tier and a layer? Is it correctly to say that the business delegate belongs to the business tier but not to the business layer?
Thanks, Felix Use www.jaaava.com - A Google custom search engine for java professionals.
A Presentation-tier Business Delegate implementation which acts as a client-side business abstraction should be part of the web application and placed in a WAR file with the other Presentation-tier code.
It is possible to have a Business-tier Business Delegate (this is what is described in the design pattern documentation also.) If the business logic in your application interacted with another application, it would encapsulate access to that other application's business methods via Business Delegate. Here your application is a client of the other application.
In my experience, Presentation-tier Business Delegates are the norm, and the other type is rare.
The J2EE programming model is based on three-tier programming. The tiers are: Presentation, Business and Integration.
The term "layer" is another term that is used with other technologies and designs and pre-dates the J2EE programming model. It causes a lot of confusion and does not have a concise definition.