Search |
||
JSF: UIComponent.getAttributes() -- good, bad or ugly?Posted by bdudney on February 14, 2004 at 3:49 PM PST
Back in September Allen Holub said that accessors are evil, there was also a long thread on TSS about Allen's article. Then very recently Cedric Beust posted that he thought accessors are here to stay and that Allen Holub was all wrong (I tend to agree with Cedric on accessors but Allen did make a couple of good points). Which all seem to have very little to do with JSF I know but...
Consider the
The spec calls this 'attribute-property transparency'. I like this a lot better than the way that the API was laid out in the EA4 version of JSF. In that world you had to keep everything in a Map and if you wanted accessors they had to delegate to the Map. This is a lot cleaner in my opinion.
Another side effect is that you can just assume that With this API components could conceivably be writen without any accessors and no fields. All the instance data would be stored in the map. I think there is a certian danger of abuse like this. On the positive side tools can access the whole component without having to know anything about it. This is a key aspect of the tooling requirements behind JSF and was possible in EA4 but uglier. I've seen this sort of thing done on a limited scale on other projects but I've never seen something like this in a project like JSF (that will be used by lots and lots of people). What are your thoughts on doing this? Will it scale up in terms of usability? Will it get abused so much that we will end up with lots of nasty code? What do you think? »
Related Topics >>
J2EE Comments
Comments are listed in date ascending order (oldest first)
|
||
|
|