1.
I need to build a “Web Service Server (Simulator)” which generates the xml files and also sends async calls to the client for notification. At this point, I am writing a code to generate dummy XML files which will be used for testing (FileGeneratorClass– builder)?
2.
Also, can I implement this in a way that I do not have to write a complete code from scratch to simulate another web service server and another file format ? – what pattern can I leverage there ?
3.
The objects/classes are generated from a Schema file (for xml File) and WSDLs ( for web service ), how can I make my code immune to changes to these files (newer versions) ? – which design pattern ??
(Please let me know if information I provided is too much or too less, also if you need me to edit)
Thank you very much.
Disclaimer: I am a complete newbie and using patterns for this small project might be overkill yet I want to do it so that I learn/understand it. Which, I think, will give me confidence and clarity when I need to do that in a more complex project.
Patterns don’t do anything. You are asking if you should use prepositional phrases when you are planning to write a mystery novel. You don’t start a design saying what patterns do I need. Patterns emerge from the design process. You say my program will need x and y, that’s similar to the such-and-such pattern, I should see if that pattern fits. If it does, use it. If it doesn’t fit, don’t force it to fit.
You are treating patterns like classes. Don’t do that. That’s not their purpose. They are not building blocks. They are not checklist entries. They are exactly what the mundane meaning of patterns implies. They are things you see repeated over and over. Many times you sense their necessity ahead of time and so you include them in the design. But they are not a starting point.