4 ms·
Having just spent the past two days reverse engineering an API that used protocol buffers, I can tell you I would have much rather done it against XML. Why did
by tentonova 17y ago
Having just spent the past two days reverse engineering an API that used protocol buffers, I can tell you I would have much rather done it against XML.
Why didn't you have the descriptor files? Optimizing for ease of external reverse engineering seems rather counter to the authoring organization's actual goals.
If you want third parties to be able to interoperate, give them the descriptors you use.
As for parsing, I guess I don't get what the big deal is.
Writing lots of code to read and parse data types as text, especially when no schema is available, is time consuming.
Protobuf is necessarily validated. The input types are known-correct, conversion to the domain model is direct and straight-forward, and it's exceptionally easy to generate code or otherwise automatically deserialize to native representations.
- nicpottier 17y agoI didn't have the descriptor files because it wasn't an officially supported API. And that happens, lots! Often times people aren't interested in nailing down their API enough to 'officially' publish an interface.. XML makes it easy for you to use it anyways. Parsing XML doesn't include lots and lots of code, at least not for me. As I said, the amount of code to parse a Proto built class into my own datastructure is almost identical to me doing it from a DOM tree save for some type conversion. The other plus is that proto buffers involve firing up those tools and incorporating them into your project. How often do you just want something really simple, say the current temp in a zip code? That's a few lines of code to pull out via XML, without the trouble of pulling down the proto buffer definition, building the classes for your language etc..