31 Jan 2012, 10:28 AM
I posted this question in a general discussion before . Posting it in right place .
I am using ext gwt 3.0. I want to make sure which approach is better. Either using AutoBeans or Overlays for JSON handling. Which is better and why.
31 Jan 2012, 10:31 PM
Js Overlays and Autobeans are different tools with different purposes. Both are part of the core GWT libraries, and with getter/setter methods exposed, either can be used with GXT 3 (as can any bean-like object).
They can both be used to read from json, after a fashion. AutoBean interfaces are intended to be given a implementation automatically. The AutoBeanCodex (and GXT's JsonReader/JsonWriter) can turn AutoBeans into json and back again. GXT 3's XmlReader/XmlWriter are able to use the properties in the autobeans to copy to/from xml. You can also build implementations of the interfaces given to the AutoBeanFactory, and still get them serialized to xml or json, using the GXT DataWriters mentioned.
AutoBean interfaces are standard Java interfaces, so anything you can do with interfaces, you can do with them, include extending them and making them extend other interfaces (though to implement non-property methods, you need to supply a @Category for the implementation).
Powered by vBulletin® Version 4.1.5 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.