All,
I have a system that is designed to pass messages to / from third parties. I am about to write a plugin that will create messages (files) in a new format.
The format (EDINE) is well defined and documented. I will have two basic functions:
- format a message, populating values from out internal object representation
- parse a message to convert to our internal object representation
The messages are composed of segments and may include repeating groups (but note - it is not XML!).
Obviously there are a few ways to achieve this, I'd be interested to hear others views on what is best. My initial thoughts are:
- use interpreter pattern to parse and format the messages
- Very basic string manipulation (e.g. strip out various characters etc), could use RegEx as well
- Write custom [de]serialialization and attributes - much the same as the .Net XML Serialization works (not too sure on this?)
- Any other ideas?
I am using .Net 2.0. My goals for this development (in order of priority) are:
- Quick delivery
- Easily understandable / maintainable for others
- Elegant solution
Another consideration is there are different versions of this standard - I may (more than likely) have to cater for different versions.
I'd be grateful for any thoughts advice, or has anyone done something similar?
Thanks,
Graeme
"Just beacuse you're paranoid, don't mean they're not after you
I have a system that is designed to pass messages to / from third parties. I am about to write a plugin that will create messages (files) in a new format.
The format (EDINE) is well defined and documented. I will have two basic functions:
- format a message, populating values from out internal object representation
- parse a message to convert to our internal object representation
The messages are composed of segments and may include repeating groups (but note - it is not XML!).
Obviously there are a few ways to achieve this, I'd be interested to hear others views on what is best. My initial thoughts are:
- use interpreter pattern to parse and format the messages
- Very basic string manipulation (e.g. strip out various characters etc), could use RegEx as well
- Write custom [de]serialialization and attributes - much the same as the .Net XML Serialization works (not too sure on this?)
- Any other ideas?
I am using .Net 2.0. My goals for this development (in order of priority) are:
- Quick delivery
- Easily understandable / maintainable for others
- Elegant solution
Another consideration is there are different versions of this standard - I may (more than likely) have to cater for different versions.
I'd be grateful for any thoughts advice, or has anyone done something similar?
Thanks,
Graeme
"Just beacuse you're paranoid, don't mean they're not after you