Why use IVAR_KEY static?
Ray Kiddy <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.wonder-disc |
|---|---|
| Message-ID | <[email protected]> |
I was wondering something. Why do all the WOLips EOGenerator templates use this kind of logic for attributes?
public static final ERXKey<String> THING = new ERXKey<String>("thing");
public static final String THING_KEY = THING.key();
Why have that extra ivar with the "_KEY" suffix?
It occurred to me that, if one is in java code there is no reason to use it. One can type 4 characters, _ K E Y, or one can hit <dot> k and then the autocomplete brings up the rest.
And of course, one does not need it in a component. The toString() method in ERXKey returns the key, same as key().
So, is there any reason for the extra verbiage in all these EOGenerator-created source files? Just checking. I mean, more code is not always better.
cheers - ray
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
Wonder-disc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wonder-disc