RE: [protobuf] Best way to organize collections?
Valid points! I use Attributes by itself also. So, I need that message. Question is should I use that collection message inside other messages where I may need collection of Attribute? Naming… well. I use same .proto file in .NET and it all comes from POJO which I used for JSON so I’m going to leave this part as is.. *From:* Christopher Smith [mailto:cbsm...@gmail.com] *Sent:* Friday, July 20, 2012 8:46 PM *To:* Ditat *Cc:* protobuf@googlegroups.com *Subject:* Re: [protobuf] Best way to organize collections? Three points: There isn't much value in your Attributes message, so DummyAttributes2 would be the way I'd go. List is probably not an ideal name for an field, as it may overlap with other names depending on programming language. Per the style guide, field names should be like_this, not LikeThis. The compiler will adjust it to fit your local language. Consequently, the right answer really should be: dummy_attributes_2. --Chris On Jul 20, 2012, at 6:13 PM, Ditat wrote: Let's say I have .proto like this: message Dummy { required Attributes DummyAttributes = 1; required string DummyString = 2; repeated Attribute DummyAttributes2 = 3; } message Attributes { repeated Attribute List = 1; } message Attribute { required string Name = 1; required string Value = 2; } What is better inside Dummy message? DummyAttributes or DummyAttributes2 ? -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/OTZR2bpElagJ. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
Re: [protobuf] Best way to organize collections?
Three points: There isn't much value in your Attributes message, so DummyAttributes2 would be the way I'd go. List is probably not an ideal name for an field, as it may overlap with other names depending on programming language. Per the style guide, field names should be like_this, not LikeThis. The compiler will adjust it to fit your local language. Consequently, the right answer really should be: dummy_attributes_2. --Chris On Jul 20, 2012, at 6:13 PM, Ditat wrote: > Let's say I have .proto like this: > > message Dummy > { > required Attributes DummyAttributes = 1; > required string DummyString = 2; > repeated Attribute DummyAttributes2 = 3; > } > message Attributes > { > repeated Attribute List = 1; > } > message Attribute > { > required string Name = 1; > required string Value = 2; > } > > What is better inside Dummy message? DummyAttributes or DummyAttributes2 ? > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/protobuf/-/OTZR2bpElagJ. > To post to this group, send email to protobuf@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
[protobuf] Best way to organize collections?
Let's say I have .proto like this: message Dummy { required Attributes DummyAttributes = 1; required string DummyString = 2; repeated Attribute DummyAttributes2 = 3; } message Attributes { repeated Attribute List = 1; } message Attribute { required string Name = 1; required string Value = 2; } What is better inside Dummy message? DummyAttributes or DummyAttributes2 ? -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/OTZR2bpElagJ. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.