Hi
I'm relatively new to C# and particularly OOO coding. I understand the concepts but struggle to see how I can apply them. I have something to work on now that might help with that.
I'll be polling a directory where random files will be produced, the file naming convention will allow me identify which client it is i.e. clienta_yyyymmdd_hhmmss.txt or something similar. Each client will have a completely bespoke format. More clients will be added over time. I will just be reading the files, transforming to a consistent format and pushing this to another source. So I'm looking at the best way to approach this, the goal being scalability so that new client formats can be supported as simply as possible. With my limited knowledge I was thinking maybe:-
a) A config file matching a client to an assembly (all clients would have the same entry method) and use reflection to invoke the transform method on the relevant assembly. My thinking is I can then just drop in a client specific DLL and tweak the config to add new clients.
b) Would this problem be a candidate for taking a DI / IOC approach, albeit I'll need to understand how!
Any thoughts or suggestions welcome, I'm viewing this as a great opportunity to implement a real solution. Cheers
I'm relatively new to C# and particularly OOO coding. I understand the concepts but struggle to see how I can apply them. I have something to work on now that might help with that.
I'll be polling a directory where random files will be produced, the file naming convention will allow me identify which client it is i.e. clienta_yyyymmdd_hhmmss.txt or something similar. Each client will have a completely bespoke format. More clients will be added over time. I will just be reading the files, transforming to a consistent format and pushing this to another source. So I'm looking at the best way to approach this, the goal being scalability so that new client formats can be supported as simply as possible. With my limited knowledge I was thinking maybe:-
a) A config file matching a client to an assembly (all clients would have the same entry method) and use reflection to invoke the transform method on the relevant assembly. My thinking is I can then just drop in a client specific DLL and tweak the config to add new clients.
b) Would this problem be a candidate for taking a DI / IOC approach, albeit I'll need to understand how!
Any thoughts or suggestions welcome, I'm viewing this as a great opportunity to implement a real solution. Cheers