1

I am investigating the usage of gwt autobeans in my project. When I were reading about this component, I came across a concept of autobean wrapping but found no explanation why it was created. What is it good for? Where can I use it?

1 Answer 1

0

AutoBean wrapping becomes useful when you have existing beans that implement that interface. After wrapping the AutoBean has all the properties so you don't have to copy data manually using setters.

When you have the AutoBean you can perform all kinds of useful operations:

  • (De)Serialize bean to JSON using AutoBeanCodex
  • Easily iterate over all bean properties
  • Compute a diff between two beans
  • Traverse, inspect and possibly set all properties with a Visitor
  • Assert two beans are equal (in terms of property values)

It would be more difficult to do these operations without frameworks in both client and server. I use AutoBeans in my GWT app to serialize/deserialize to Json and transfer beans via web-sockets to the client.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.