A good design pattern for almost similar objects
        Posted  
        
            by Sam
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Sam
        
        
        
        Published on 2010-04-02T18:39:05Z
        Indexed on 
            2010/04/02
            18:43 UTC
        
        
        Read the original article
        Hit count: 451
        
Hello,
I have two websites that have an almost identical database schema. the only difference is that some tables in one website have 1 or 2 extra fields that the other and vice versa.
I wanted to the same Database Access layer classes to will manipulate both websites.
What can be a good design pattern that can be used to handle that little difference.
for example, I have a method createAccount(Account account) in my DAO class but the implementation will be slightly different between website A and website B.
I know design patterns don't depend on the language but FYI i m working with Perl.
Thanks
© Stack Overflow or respective owner