I have a question about the best way to design / redesign my software. I have a program that uses a web services to perform certain tasks. Each task is a different set of request / response classes on the server end and a general function call from the Main Hook. EG.
As it stands i, I have a class for each of these methods, Each. Each class has a public method Process()Process() that does the interaction. I am trying to determine the best way to group all this code together using OO techniques without sacrificing functionality. I would like just one ProcessMethodProcessMethod in one class that will handle the interaction with the webserviceweb service for all the different web methods.
From reading about the OO patterns, it would appear the one iI need to use is the Abstractabstract factory pattern with the adapter and strategy pattern thrown in too.
SO Question about my design so far,Am I am wondering if i am going about this the right way?
I have a COM Library created in C#, with COMVisibleCOMVisible set to true. This library talks to a 3rd party WebServiceWebService calling various methods depending on the task at hand. For each RequestRequest / ResponseResponse class exposed by the 3rd party DLL I have a Request / Response Pair (Class and Interface) to Marshal variables specifically for a VC6 application.
So with that in my iI have added a C# project to the solution to test this code, see test method below:
The link class looks like so at the moment be, but will have all the methods created once the design is correct:
Each DoMethod(N)DoMethod(N) that will be in the link class will look the same performing its task with identical code to the other DoMethodsDoMethods. The key differences between the methods is the Param Types Passed in and the Method1Method1 (Method1RequestMethod1Request/Method1ResponseMethod1Response) type will vary depending on the webmethod to be called.
Class Method1Method1 (There will be one of these for every method I need to implement on the WebServiceWebService) looks like so:
The class (WebServiceInterfaceBridgeWebServiceInterfaceBridge) that all Method(N)Method(N) classes will inherit from is shown below:
And finally, here is the class that actually calls the Web service that the WebServiceBridgeWebServiceBridge Class inherits from:
I have left out my internal classes for marshaling the Req/Rsp's, they are just classes with Member Vars and Get/Set's.
So basically before i carry on with my design I am wondering from an OO point of view if I am approaching this task inhave left out my internal classes for marshaling the right way or if what I am doing is overkillReq/Rsp's, they are just classes with Member Vars and could be greatly simplified?Get/Sets.
TIABefore I carry on with my design, I am wondering, from an OO point of view, if I am approaching this task in the right way or if what I am doing is overkill and could be greatly simplified?