Gooey Bean Proxy
We expose a "presentation model" bean using an interface, used to create a dynamic proxy, with a backing Map of property/values eg. for GUI prototyping, or otherwise a java.bean.
A part of "Gooey Beans, the GUI part of a trilogy in 42 parts"
We expose the properties of the presentation model using an interface as follows.
In this case, we can use "dynamic proxies" (from java.lang.reflect), to access our bean
properties, rather than looking them up using string literal references eg. via BeanInfo.
Our proxy object will use the Method name to look up the property.
Also, we have the option of not creating a backing bean for starters, which lends itself
towards rapid prototyping, since the above property interface is clearly quite concise.
Code Snippet
public interface PersonInfo extends GObservableBean {
GProperty<String> username();
GProperty<String> firstNames();
GProperty<String> lastName();
GProperty<String> displayName();
GProperty<String> email();
GProperty<Date> birthday();
GProperty<Date> lastLogin();
GProperty<BigDecimal> score();
GProperty<PersonTitle> title();
GProperty<PersonGender> gender();
GProperty<PersonMaritalStatus> maritalStatus();
}





