Re: TDBC documentation, examples, syntax?
- From: "tom.rmadilo" <tom.rmadilo@xxxxxxxxx>
- Date: Sat, 21 Feb 2009 20:55:58 -0800 (PST)
On Feb 20, 9:59 pm, Kevin Kenny <kenn...@xxxxxxx> wrote:
is needlessly inflammatory, and seriously tempts me to do the
opposite of anything you suggest, merely out of spite.
Yes, you are right. Needlessly inflammatory is a pretty valid
description of most of my comments.
So let me back up and start over.
First, working code is always superior to theory, nobody can argue
against something which works.
OTHO, there is a lot of working code based upon standards or
conventions, and in particular ISO/IEC 9075. This standard is long,
thousands of pages. But this fact contrasts with the "call to arms"
statement in TIP 308:
"If we look at other database connectivity layers such as ODBC/DAO,
JDBC, Perl's DBD/DBI, we find that there really isn't very much, if
anything, inside them. Rather than being a body of code, they consist
primarily of specifications of the interfaces to which the author of a
database connectivity module must conform."
It seems obvious to me that an interface would not contain a body of
code, but ISO 9075 contains more than an interface, it defines an SQL
environment. The standard isn't code, but rather a long list of
algorithms. When you produce code which conforms to the algorithms,
you meet the standard.
Database vendors should try to follow this standard. But the standard
is huge, probably no vendor complies exactly with the standard. So
full compliance is really unimportant.
What is important is "reflection". This is different from the OO
reflection, since there is no dynamic component. Rather, reflection
means that a higher (closer to the end user) layer strives to
"reflect" the lower layer...as much as possible.
The simplest type of reflection is "pass through semantics". With pass
through semantics, function names remain the same and argument order
remains the same.
If you just change the function name, while the signature remains the
same, you can use a "mapping".
What I see in the TDBC API is a distinct, un-mapped API. This does not
mean that the API is defective, it just means that programmers who are
familiar with ISO-9075 will struggle to map the TDBC API to the
corresponding ISO-9075 API. If the mapping is not one-to-one, it
should be necessary to ask if the underlying semantics are the same.
If the semantics cannot be proven equivalent, the application can't be
guaranteed to produce the same results.
The real core problem with TDBC really has nothing to do with the "top
layer API", this is what we see as we write Tcl programs. The problem
is the "completely undefined mapping" of this top layer to the
specific API. Whenever TDBC uses special names and conventions, expert
users get screwed.
Is there some mapping from Tcl to "some undefined data manager"?
Anyway, get a clue: any layer code needs two interfaces (one up, one
down). At most I see one semi-explicit upper interface and one non-
explicit lower interface.
Lots of flesh is needed.
.
- Follow-Ups:
- Re: TDBC documentation, examples, syntax?
- From: Kevin Kenny
- Re: TDBC documentation, examples, syntax?
- From: George Peter Staplin
- Re: TDBC documentation, examples, syntax?
- From: Eric
- Re: TDBC documentation, examples, syntax?
- References:
- TDBC documentation, examples, syntax?
- From: stolicow@xxxxxxxxx
- Re: TDBC documentation, examples, syntax?
- From: suchenwi
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- From: George Peter Staplin
- Re: TDBC documentation, examples, syntax?
- From: stevel
- Re: TDBC documentation, examples, syntax?
- From: tom.rmadilo
- Re: TDBC documentation, examples, syntax?
- From: Kevin Kenny
- TDBC documentation, examples, syntax?
- Prev by Date: Re: aolserver tutorial
- Next by Date: Re: SIMPLE web-app framework a la PHP? (Not rivet, methinks)
- Previous by thread: Re: TDBC documentation, examples, syntax?
- Next by thread: Re: TDBC documentation, examples, syntax?
- Index(es):
Relevant Pages
|