Protobuf as data model class in Java

160 views
Skip to first unread message

Zhu Li

unread,
Jul 28, 2023, 5:19:36 PM7/28/23
to Protocol Buffers
Hello there,

Is it encouraged to use protobuf generated classes as data model classes directly?

A reddit post https://www.reddit.com/r/golang/comments/rdkqwv/comment/ho1sfp9/?utm_source=share&utm_medium=web2x&context=3says suggests "having a translation layer between persistence, transmission, and business logic if you are building for the long term". And there might be more related discussion online. What's your suggestion? Do readers who use protobuf classes as data model classes directly regret the decision? Or do readers who always prepare a translation layer between proto and data model classes wish they did not make that decision?

Thank you!
Reply all
Reply to author
Forward
0 new messages