Proposal for Abstraction Layer for Modifications in Bug.pm

Matthias Juchem bugzilla-bugpm at konfido.de
Tue Jul 6 20:20:23 UTC 2004


Am Dienstag, 6. Juli 2004 21:01 schrieb Maxwell Kanat-Alexander:
> > > 3. set_defaults_for_missing_fields()
[..]
> > > 4. commit()
[..]

> 	Oh, one other comment -- this structure depends on a "the programmer
> must do this" sort of rule. That is, "You must always call Y and then
> Z." Designs that involve this tend to cause problems down the road,
> since not all programmers read API docs. At least, not until they get an
> error. :-)

That's true, but I guess one cannot expect an API to completely catch all 
programming errors. I don't know whether this potential error is worth the 
overhead described below.

It's always a trade-off...

> 	Either make sure it's enforced programmatically, or just roll step 3
> into step 4.

IIRC, 3 will only be called for completely new errors as all required field 
should be filled with appropriate values.
Therefore, calling 3 everytime when committing will result in quite a few 
unneeded calls.

Not that calling 3 in 4 is a problem, but IMHO it's better to do this 
seperately.

-- 
Kind regards,

 Matthias



More information about the developers mailing list