The decision to use public properties in Ext GWT was a decision that was made after much deliberation and discussion with the community. Currently, public properties are only used for pre-render options that are used before a component is rendered. Methods can be called at any time.
Here are the issues:
1. Ext GWT needs a way to allow components to be "configured" before rendering.
2. Many components have a large number of config options.
2. Any solution should be typed. No config.set("frame", true);
3. It should be easy to identify pre-render options.
1. Have a config object for each components that is passed in the component constructor:
2. Use a config object that is accessed via the component:
ContentPanelConfig cfg = new ContentPanelConfig();
panel = new ContentPanel(cfg)
3. Support both 1 & 2.
panel = new ContentPanel();
4. Using a naming syntax with config options:
5. Use public properties:
I know Java developers are not used to using public properties and getters /setters and the standard way for an API. But keep in mind, Ext GWT is not a standard java application and has unique needs.
panel.frame = true;
panel.collapsible = true;
All that being said, we are open for feedback and suggestions. If you have an opinion, please let me know what you are thinking. If I had to pick an option that did not use properties I would probably prefer method 4 as it seems the most natural.