Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-28 Thread Mansour Al Akeel
From Delegator.java 139 public GenericDelegator cloneDelegator(); 140 141 public GenericDelegator cloneDelegator(String delegatorName); This has to be changed. Delegator is an interface, and it has a reference to its implementation GenericDelegator. Anyone knows of anything that

Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-27 Thread Jacopo Cappellato
Mansour, it is interesting. Maybe it would be easier if we simplify the existing classes (and application code that uses them) to use only a subset of the methods available (some of them are already deprecated); the refactoring based on design patterns will be easier at that point. Jacopo On

Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-27 Thread Adrian Crum
I agree that the decorator pattern could improve the Delegator implementation. Some time ago I had suggested using the decorator pattern to support DB localization - which would eliminate the need for the clunky LocalizedMap interface/implementations - but there wasn't much interest in it.

Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-27 Thread Mansour Al Akeel
Jacopo, I didn't know about the deprecated methods, and I didn't want to open the subject of changing methods, because I don't what methods are used a lot in the applications code, and don't want to introduce a lot of change. However, in my opinion, I don't see a need for something like: public

Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-27 Thread Mansour Al Akeel
Thank you Adrian. I don't think a lot of developers will see an immediate gain. But in the long run, it will be appreciated. It allows us to introduce new functionality. For example, in one of my previous emails, I pointed out the need for a Record Level Security, like the one offered by Oracle

Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-27 Thread Adrian Crum
On 3/27/2012 2:41 PM, Mansour Al Akeel wrote: Thank you Adrian. I don't think a lot of developers will see an immediate gain. But in the long run, it will be appreciated. It allows us to introduce new functionality. For example, in one of my previous emails, I pointed out the need for a Record

Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-27 Thread Jacques Le Roux
From: Mansour Al Akeel mansour.alak...@gmail.com Jacopo, I didn't know about the deprecated methods, and I didn't want to open the subject of changing methods, because I don't what methods are used a lot in the applications code, and don't want to introduce a lot of change. However, in my

Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-27 Thread Mansour Al Akeel
This true. But to reuse db connection we use a pool, so we connect to the DB with one user, and reuse that connection. Based on that, I don't see how can we configure the DB to do so. And configurations wouldn't be portable. So if I am working on some client code, and configured these ACL rules

Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-27 Thread Mansour Al Akeel
yep, anywhere away from the current code. On Tue, Mar 27, 2012 at 10:44 AM, Jacques Le Roux jacques.le.r...@les7arts.com wrote: From: Mansour Al Akeel mansour.alak...@gmail.com Jacopo, I didn't know about the deprecated methods, and I didn't want to open the subject of changing methods,

Re: Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-27 Thread Mansour Al Akeel
Jacopo, I am still thinking about your suggestion to change the Delegator interface and use only subset of the methods. If you have some thought ready, please share them and discuss. If you have some plan to introduce these changes, then let me know about them. I think we will have to change

Refactoring GenericDelegator - Chain or Responsibility and Decorator

2012-03-26 Thread Mansour Al Akeel
Hello all, I am looking at the code for the GenericDelegator. We have 2913 line of code in one class !!! This class handles a lot of functions and I think it's the most critical to the application. These functions can be distributed among more classes, providing better maintainability and