BIND 10 #1061: introduce DatabaseClient (or DatabaseDataSourceClient)
BIND 10 Development
do-not-reply at isc.org
Mon Aug 8 19:17:07 UTC 2011
#1061: introduce DatabaseClient (or DatabaseDataSourceClient)
-------------------------------------+-------------------------------------
Reporter: | Owner: UnAssigned
jinmei | Status: reviewing
Type: task | Milestone:
Priority: major | Sprint-20110816
Component: data | Resolution:
source | Sensitive: 0
Keywords: | Sub-Project: DNS
Defect Severity: N/A | Estimated Difficulty: 5.0
Feature Depending on Ticket: | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by jinmei):
Replying to [comment:11 vorner]:
> > > For another, the current getZone is the lowest possible manipulation
with the DB, like select id from zones when name =. It can't be done in
DB-independent way. Maybe the name could be different?
> > I think a different name would be better. A database connection has a
special meaning; using the term for a class in BIND 10 runs the risk of
confusion with the underlying database connections.
>
> OK, I renamed it to DatabaseAbstraction, it is hopefully better. But the
two current follow-up tickets will need updates :-(.
>
> Assigning to unassigned, as Stephen is away.
Okay, so I'll steal it:-). I'm focusing on the class naming issue.
I think I understand what Stephen wanted to point out, and I see some
point in it, but I'm not sure if the name was so confusing. The
intent of the getZone() method is to "get zone via the connection to
the database", and it doesn't seem to look so awkward.
I don't mind changing the class name if we come up with something
clearly better, but I have some concern with "DatabaseAbstraction".
First, it sounds like a database system itself while it's actually
indeed a "connection", so for example it would look a bit awkward when
we have multiple instances of (a derived class of) DatabaseAbstraction
connecting to the same database. "DataSourceClient" was named a
"client" to address the same concern, and the same sense applied to
"DatabaseConnection".
Second, "abstraction" can be ambiguous. Since this is an abstract
base class, "abstraction" may simply sound indicating that fact (but
that would make it look a bit inconsistent because other base classes
that are used with the "DatabaseSomething" class are not named with
"abstract").
After thinking about it more, I came up with another possible name
"DatabaseAccessor". It may share the same concern as that for the
original "DatabaseConnection", but would this one perhaps sound
better (while addressing my own concerns)?
Or is there anything that can better address both concerns?
--
Ticket URL: <http://bind10.isc.org/ticket/1061#comment:12>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list