Program for a changing interface


General J2EE: Program for a changing interface

  1. Program for a changing interface (1 messages)

    Hi All, (This project is done in Java.) There is a class say, ClientConnection which let me connect to a separate system. It provides the basic features like login, addData, searchData, deleteData, etc. This class is provided by a separate party. So this ClientConnection class keeps changing, mainly adding new features and changing method signatures. Sometimes the client change name of this class as well (with new versions). So I'm looking for a better solution to cater for this changing class. Is there a good design pattern that will help me? BR, Kamal

    Threaded Messages (1)

  2. Adapter Pattern[ Go to top ]

    I think you can use an adapter pattern to build an adapter between your application and client's interface. With this every time the client changes the interface you don't have to make changes in all of your code, rather just make changes in the Adapter class. Just study this pattern, I think it should help you. Thanks