|
Re: Non-static Peers (was: Torque 4.0 plan): msg#00033jakarta.turbine.torque.devel
Fine for that part - though a getBackend() would be useful. You're right about "singleton" - we really want to use it as a factory class for the peers rather than as a true singleton. We should definitely avoid that term :-) How about we follow the pattern Torque uses for the other generated classes and have a generated BaseBackend and a class that extends that? The extended class doesn't get overwritten on generation and is present to allow extension. Or is that overly complex? Actually the same follows for the BasePeer. We've had a couple of occasions where it would be been handy to extend at that level - e.g. to provide a different method to getConnection(). Actually the BasePeer is really a connection manager and some utils (I think!). Are these appropriately named? Should it be split up? Taking it even further you could really have a factory class providing the backends which implement an interface. Then the code is built against an interface rather that static methods. This would be a fairly significant departure for existing codebases though Cheers Joe On 02/12/06, Thomas Fischer <tfischer@xxxxxxxxxx> wrote:
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Java5 (was: Torque 4.0 plan): 00033, Thoralf Rickert |
|---|---|
| Next by Date: | svn commit: r481874 - in /db/torque/common/trunk: pom.xml project.xml: 00033, gmonroe |
| Previous by Thread: | Non-static Peers (was: Torque 4.0 plan)i: 00033, Thomas Fischer |
| Next by Thread: | Re: Torque 4.0 plan: 00033, Malcolm Kendall |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |