>> model and then make all my relationship changes again and regenerate all
>> affected java again (but maybe I'm just not good at using the tools yet -
>
> Personally I don't like all those pesky accessor methods on my EOs. I
> tend to use EOGenericRecords whenever possible. My Java EOs have ONLY
> their ivars and businesslogic. Zero accessors. This works BTW. The only
> price is that instead of doing: firstName() you have to do
> valueForKey("firstName"). But what I gain is that I basically never have
> to regen a class, just add/remove the ivar for the EOAttributes that
> changed.  Of course if you do have to merge changes, the FileMerge
> utility is a pretty cool way to do it.

What's cool about this list is that I learn something everyday :).

David, I'd like to ask a few questions about your statement. When I took
Programming WebObjects II, it was recommended to *always* use custom EOs
which makes sense to me once I realized the power of EOF. I'm surprised to
hear you say that you use EOGenericRecords. Are you saying that if you don't
have any custom code, that you just use generic records? I guess I can
understand not having accessor methods. As you say, you just use
valueForKey().

I'm not completely clear what is meant by "business logic." Do you mean
custom methods such as adding a method like totalCost that takes two fields
and returns a total? Do you include the relationship methods as well or is
that also part of business logic?

Now that I read what you've said here, I'm seeing some advantage to not
having all the accessor methods. It makes for a *lot* of code in a large
table and I notice that I almost never set values directly unless I'm in the
EO where I have direct access to the iVars anyway.

Thanks
--Marc Respass

Reply via email to