Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

If we ever going to change kDBConnection class, that is responsible for all database related interactions, then we must ensure that kDBLoadBalancer class, that allows to manage master/slave setups would also work. It's easy to forget adding a corresponding method to kDBLoadBalancer class for every kDBConnection class method.

To solve that problem I propose to create a public interface out of kDBConnection class and make both kDBConnection and kDBLoadBalancer implement it. This way PHP won't even allow to run a script if we don't add method to both classes.

What we must take care of anyway is to keep public interface up to date first.

  • No labels