Re: OOP/OOD Philosophy
- From: "Phlip" <phlip_cpp@xxxxxxxxx>
- Date: Fri, 15 Jul 2005 17:13:11 GMT
frebe wrote:
> > How long does it take to write an ODBC driver?
>
> I don't know about ODBC, but for JDBC it is very simple. It's a number
> of interfaces that you have to implement. Using Eclipse, it is done in
> less than an hour. Once you have done a JDBC that wrapps the real
> driver, you can easily inject your exception throwing code. The key
> things is that you only have to implement your driver once (if you
> don't find anyone who did it before), not for every application.
>
> Making wrapping JDBC drivers is also an excellt way to overcome
> differences between database vendors.
I think many of your discussions target publishable library code.
When we write application-specific code, it should have the narrowest
interface possible. So I would not inherit JDBC [or the equivalent] and pass
thru all of its methods. I would wrap JDBC in something with only the fewest
methods that our application needs. Then I'd mock that.
Yes, sometimes mocking the published library is easy, and sometimes the
published library should also publish its wide interfaces that hide
differences between database vendors. But without the requirement to publish
a complete library, application-specific techniques get very lean.
--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand
.
- References:
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Robert C . Martin
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Phlip
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Robert C . Martin
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Robert C . Martin
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- From: Robert C . Martin
- Re: OOP/OOD Philosophy
- From: frebe
- Re: OOP/OOD Philosophy
- Prev by Date: Re: OO Design induces an existential crisis
- Next by Date: Re: Is there an end to grammar rules?
- Previous by thread: Re: OOP/OOD Philosophy
- Next by thread: Re: OOP/OOD Philosophy
- Index(es):
Relevant Pages
|