Greetings:
      I would like to get an opinion on the preferred placement of code
between Actions and Business delegate methods.

Chucks book suggests that you might want to use a business interface for
your session facade and a client specific interface for the Business
Delegate
object.  I like this idea. This may lead to business delegate object for
each type of client because each type may have special needs.
Most literature suggests that the business delegate method signatures are
the same as that of the session facade.

I would like to create a business delegate interface where the methods may
not resemble the business API much at all.
In our case we use a business delegate but still find ourselves performing
several operations on the business methods in our Actions.

We have no control over the business API so a common interaction in our
action  is:

//get the delegate.
businessService = getBusinessService();

//get a list...
if(fullList){
      userListWrapper = businessService.getUserList();
      userList = userListWrapper.getFullList();
      sortList(userList, sortOrder, sortColumn);
}else{
      userListWrapper = businessService.getUserList();
      userList = userListWrapper.getShortList();
      sortList(userList, sortOrder, sortColumn);
}
All this just to get a list...

I feel that this could be replaced by a business delegate method:

userList = businessService.getUserList(fullList,sortOrder,sortColumn);

Should the business delegate operate on the business API or should it be a
pure proxy?
The reason I ask is that I have read that some people have created static
wrappers that do this kinda thing.

Any opinions would be welcome



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to