In client-server technology, what is the best way to bind element between 'binding all attributes separately' and 'the entire component' (or another way) ?
For example in JSF :
-<h:inputText value="#{bean.value}" rendered="#{bean.rendered}" disabled="#{bean.disabled}" readonly="#{bean.readonly}" />
- Bind only needed attributes
- Declare a lot of attributes on
bean
, less readable, modify the view when a new attribute is binding - Other arguments...
-<h:inputText binding="#{bean.inputTextBinding}" />
- Only one attribute declared on the
bean
, more readable - Require more space on the server to store the component
- Other arguments...
Can you give more arguments, and tell what is recommended ? Personally, I prefer bind only needed attributes.