This is not an accident or an arbitrary decision. Things are very
intentionally done this way. In all tiers of the applications in
OFBiz we are avoiding O-R mapping because in terms of developer time
and flexibility these objects are very expensive. A few minutes of
looking stuff up and getting familiar with the entity model saves you
and all of us hours of maintaining this sort of highly redundant code.
I'm sure I can say that all day and you won't believe me. If you
really want to convince yourself, try both approaches for a while.
-David
On Nov 14, 2006, at 9:01 AM, John Martin wrote:
Having been working with the ofBiz code for the past couple of
months, I
have been wrestling with the coding standard a bit. Much of the code
utilizes Map objects stuffing individual name/value pairs passed
around. I
understand the reasoning for the use of Map objects with the
service layer
but there are many places in the code that Transfer Objects (TOs)
would make
the code easier to understand and code around. It is really
fustrating to
have to dig through the code to find all the fields that need to be
populated for a method and to make certain that the varible name
has the
correct spelling and case is accurate.
Is there a reason that TOs appear to be avoided in the code?
Thanks,
John