I have a client server architecture using tomcat and swing. I am trying to avoid big switch statements on the server side. I am trying to do that using polymorphism but I am running into some difficulties. In short the problem is that the object which implements an interface needs to be instantiated on the client side. The method that it defines uses a Database Access Object ( DAO ). It will be employed on the server side but needs to be defined on the client side b/c that is where we know what it should be. The problem is that I can't compile it as the common code is compiled first then the client and finally the server. I could put all the code in the common side but that does not seem right as the DAO object can only be used on the server side.
Has anyone experienced this type of problem and have any thoughts they could share.
Thanks
Has anyone experienced this type of problem and have any thoughts they could share.
Thanks