CVS update: gnucash/src/business/business-core
Linas Vepstas
linas@linas.org
Fri, 16 Nov 2001 20:07:12 -0600
On Fri, Nov 16, 2001 at 07:16:48PM -0600, Dave Peticolas was heard to remark:
>
> Added Files:
> .cvsignore Makefile.am business-core.scm businessmod-core.c
> gncAddress.c gncAddress.h gncBusiness.c gncBusiness.h
> gncBusinessP.h gncCustomer.c gncCustomer.h gncCustomerP.h
> gncEmployee.c gncEmployee.h gncEmployeeP.h gncJob.c gncJob.h
> gncJobP.h gncVendor.c gncVendor.h gncVendorP.h
> gw-business-core-spec.scm
Hmm, these look like 'engine' things. What's the story on storage?
i.e. file backend? sql backend? Or will these magically end up using
kvp for everything?
I'm slightly concerned about over-specialization: the files
gncCustomer.h gncEmployee.h gncVendor.h look superficially similar.
Wouldn't it be better to abstract these into a more generic whole,
and make the differences between them be a dynamic, runtime flag?
(i.e. as KVP data?)
I am concerned that hardcoding too much in C makes things inflexible:
for example: I looked at struct gncEmployee I saw 'workday' and
'rate'. But real employees may be salaried, or hourly. Salaried
employees don't have workdays. Hourly employees have workdays, but
may have different overtime and double-overtime rates. And it gets only
more complicated from there (different states, different tax laws in
each state, contract relationships, 401K plans, etc.) So rather than
trying to capture all of these in hard-coded C structs, I figure they
should be dynamic, semi-user-defined, and go into KVP instead.
e.g. support the following type of KVP URLs:
kvp://0x1234abcd/employee/overtime_rate=10.0
kvp://0x1234abcd/employee/401Kplan=yes
Similar remarks for addresses. the evolution contact manager is not bad,
they hae a nice gui with good flexibility for different address/phone
numbers, but its still not enough. I still have to add some address
info as free-form notes.
Also, some non-address info: e.g. the last time I talked to them, and
what was said. Imagine e.g. a biling dispute .... who said what to whom
about what bill ....
I don't want to overload you with work; rather, adding a general kvp
mechanism should allow handling a lot of this ad-hoc stuff later,
with less of a dent on the C programming interfaces.
--linas.
p.s. Dave, have you seen the kvp-to-url mapping documentation? I went
to look for it, and I can't find it.
p.p.s. Derek, Job well done! One has to start somewhere, I shouldn't be
critical. Take my comments as constructive.
--
pub 1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas@linas.org>
PGP Key fingerprint = 8305 2521 6000 0B5E 8984 3F54 64A9 9A82 0104 5933