It would be great if we could add java annotations to properties and stuff, it wouldn’t be a hard patch to do I don’t think. One thing I’d particularly like would be the ability to change the implementation of a list or map, for example if I wanted to force LinkedHashMap where the order of the elements matter.
I tend to keep the thrift stuff separate from the application internals. I have a set of lighter weight classes I use for internal business logic. I can stop using thrift and business logic doesn’t have to change. I like it this way. For a little extra work I get some speed and flexibility, plus I can hold a lot more of these little internal objects in memcached. My thrift structs generally have every property the client side might need (and it can be large amounts of data) but the internal classes just have the unique Id and maybe one or two other immutable fields. -Matt > On Oct 5, 2015, at 7:37 PM, David Bennett <[email protected]> wrote: > > I have some lumps of code in different languages that I'd like to get to talk > to each other. The server is OK, but the client code makes heavy use of Java > beans. > > My question, to those who knows a lot more about Java than I do, is whether > there is some clever way to get Thrift and Java beans to play together, or > whether this is an invitation to getter/setter hell? > > Regards > David M Bennett FACS > > Andl - A New Database Language - andl.org > >
