aspose file tools
The moose likes OO, Patterns, UML and Refactoring and the fly likes Business Delegate - To which layer does it belong Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Reply Bookmark "Business Delegate - To which layer does it belong" Watch "Business Delegate - To which layer does it belong" New topic
Author

Business Delegate - To which layer does it belong

prashant patel
Ranch Hand

Joined: May 02, 2000
Posts: 69
I am building a 3 tier web application(non-ejb) using struts we have build the basic application requirements, recently we have decided to add a indirection to de-couple the controller and the persistence layer(design in the craig larman's book) now my doubt is to which layer does the business delegate belong because i want to package it into a namespace, the current project has package's such as
1) com.oitlindia.domain.register
2) com.oitlindia.persitence.mappers
3) com.otilindia.web.register
Right now i have placed the Business Delegate in
com.otilindia.web.register but if this is done
then business delegate will belong to web or rather the controller namespace which is my doubt, what is the right namespace for the business delegate, depending on the layer mostly, one such namespace could be com.oitlindia.service
Thanks in advance


prashz
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4118
    
    2

What exactly does your business delegate do? Is there just one category of business delegate? The business delegate usually corresponds to the Model portion of the M-V-C pattern. That is, the controller delegates responsibility of handling business functions to the business delegate, thus the name. This keeps the controller decoupled from any of the actual persistence logic. You would normally group business delegates by logical functions. For example:
package com.xyz.orders.model // group together classes that encapsulate Order business rules
package com.xyz.invoices.model // group together classes that encapsulate Invoice business rules
and so on...
HTH
[ September 04, 2002: Message edited by: Junilu Lacar ]

Junilu - [How to Ask Questions] [How to Answer Questions] [MiH]
Jes Sie
Ranch Hand

Joined: Jul 24, 2001
Posts: 188
Originally posted by prashant patel:
I am building a 3 tier web application(non-ejb) using struts we have build the basic application requirements, recently we have decided to add a indirection to de-couple the controller and the persistence layer(design in the craig larman's book) now my doubt is to which layer does the business delegate belong because i want to package it into a namespace, the current project has package's such as
1) com.oitlindia.domain.register
2) com.oitlindia.persitence.mappers
3) com.otilindia.web.register
Right now i have placed the Business Delegate in
com.otilindia.web.register but if this is done
then business delegate will belong to web or rather the controller namespace which is my doubt, what is the right namespace for the business delegate, depending on the layer mostly, one such namespace could be com.oitlindia.service
Thanks in advance

I think com.oitlindia.proxy or businessdelegate is better naming convention. In a physical 3 tier architecture (1 web/client + server side + DB )and Business delegate stays in the web/client side. In my opinion, Busines Delegate should remotely or locally obtain the server side.
com.oitlindia.service sounds like the Session Facade portion. This is definitely on the physical server side.


Thank you.<br /> <br />- Jess Sie<br /> <a href="mailto:jess@see-consulting.com" rel="nofollow">jess@see-consulting.com</a>
prashant patel
Ranch Hand

Joined: May 02, 2000
Posts: 69
thanks, so the likely packages are
com.oitlindia.domain.businessdelegate
com.oitlindia.web.businessdelegate
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Business Delegate - To which layer does it belong
 
Similar Threads
business delegate in component diagram
doubt on choosing the appropriate design pattern
Please help me to resolve this Design Pattern question
java application client
Doubt In MVC..