Maybe the best is just semantically correct inheritance, interfaces
> are not useful most of the time as the beans cannot be instanciated by
> reflection anymore, you need a factory. Most frameworks just call the
> no-arg-constructor for model classes.
> What means "instanciated by reflection?"
>Maybe the best is just semantically correct inheritance ....you need a
factory.
Simple inheritance, or factory?
Anyway, for beans that are just used once, there is no need for a
factory, imho.
>Most frameworks just call the
> no-arg-constructor for model classes.
what?
Anyway, what I also wanted to ask was, does it make any sense to make
a simple thing such as a Java Bean - consisting of nothing more then get
and set methods, more complicated by using inheritance, a pattern, or
whatsoever.
Using composition might help explaning and documentating the application,
like Animal.fur.getColor() instead of animal.getColor() -
but not sure if that really makes sense for getter methods.