3 ms·
Why do you have to call it anything? Why isn't it a method or attribute on a RouterMessage object? Then it'd be something like: RouterMessage.utf8_xml_heade
by anthonyb 14y ago
Why do you have to call it anything? Why isn't it a method or attribute on a RouterMessage object?
Then it'd be something like:
RouterMessage.utf8_xml_header
or shorter if you decided on utf8 across the board.
- erikpukinskis 14y agoAssuming there's no relation between the xml header and any other headers you might have, the atomic core of the noun phrase is "XML header" so I maybe utf8 should be a (optional?) parameter.
- anthonyb 14y agoProbably likely to be an attribute on the RouterMessage, or a dependency injection, or a configuration setting somewhere. I can only imagine the chaos if you start encoding a mixture of Latin-1 and UTF-8 headers :)
- mercurial 14y agoBut then you're tying your business object to your serialization system, while they ought to live in distinct layers.
- anthonyb 14y agoExcept that then your serialisation system has to handle arbitrary objects, which may not be what you want.