> 3. Schema evolution supported out-of-the-box (backward compatibility)
4. Also, because of the schema, protobufs are strongly typesafe, and
JSON is not.
5. Using the APIs makes programs easier to understand and debug,
versus libraries that support object serialization as an afterthought,
- Unlike a complex class where serialization can have side effects,
you always know how a proto will behave, you know that it will always
serialize (very useful for debugging).
- Much like the MVC model, it actually forces a separation of the
Model (the protobuf) from the Controller (the program using the
protobuf). You can achieve this with any number of methods other than
protobufs, but since the question is why should someone use protobufs
instead of latent serialization, this seems pertinent. Model/
Controller separation just gives you better code, which is why I would
probably use protobufs even if I was writing a program that did very
little I/O with protobufs.