pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Markus KARG <markus@headcrashing.eu>
To: 'List' <pgsql-jdbc@postgresql.org>
Subject: Re: Public vs internal APIs
Date: Thu, 23 Jul 2015 18:29:51 +0200
Message-ID: <001801d0c564$cd15bde0$674139a0$@eu> (raw)
In-Reply-To: <CAB=Je-Ha1mDY5Yzk035zEEQGFOTcMN71Gtpdo8CqjYfMAFJKRQ@mail.gmail.com>
References: <CAB=Je-Ha1mDY5Yzk035zEEQGFOTcMN71Gtpdo8CqjYfMAFJKRQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

Actually I would be a friend of instead restructuring the package hierarchy, as this is was it was invented for originally. ;-)

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Vladimir Sitnikov
Sent: Donnerstag, 23. Juli 2015 17:33
To: List
Subject: [JDBC] Public vs internal APIs

Hi,

I'm looking into implementing java.sql.Struct in the jdbc driver, and it turns out I do not like PGObject for various reasons.
E.g. it cannot "append itself to a buffer", it ties decoding with PGObject itself.

I'm going to try another approach, however I would like to avoid leaking that API to the public API of the driver.

Having said that, I wonder what if we add: @ExperimentalAPI, @PublicAPI, @InternalAPI kind of annotations, so we can clearly mark internal classes as, well, internal so our clients would not accidentally depend on the internal classes?

Java does not yet allow to define "published API" (see [1]), so it would be nice to mark some APIs as internal.

For instance it makes sense marking the following classes as @InternalAPI:
   org.postgresql.util.LruCache
   org.postgresql.core.Parser
   etc

[1]: http://martinfowler.com/ieeeSoftware/published.pdf

--
Regards,
Vladimir Sitnikov


-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



-- 
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



view thread (8+ messages)  latest in thread

Message-ID: <001801d0c564$cd15bde0$674139a0$@eu>
Permalink:  ../001801d0c564$cd15bde0$674139a0$@eu/
Also on:    postgresql.org/message-id/001801d0c564$cd15bde0$674139a0$@eu

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: markus@headcrashing.eu
  Subject: Re: Public vs internal APIs
  In-Reply-To: <001801d0c564$cd15bde0$674139a0$@eu>
  References: <CAB=Je-Ha1mDY5Yzk035zEEQGFOTcMN71Gtpdo8CqjYfMAFJKRQ@mail.gmail.com> <001801d0c564$cd15bde0$674139a0$@eu>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox