Closed bchavez closed 8 years ago
I think the IO thing was a mistake and a dent in consistency and brings up the problem with defining "well-known" acronyms. RethinkDb all the way.
I'd vote for RethinkDb
all the way too (get rid of RethinkDB
class).
By promoting R
from being a static (singleton) property of class RethinkDB
to a static class
we could rewrite our code like this:
using RethinkDb.Driver;
...
// RethinkDB.R.Db("foo").Table("bar")...
R.Db("foo").Table("bar")...
and so we no longer have to deal with RethinkDB
(the class) having another name than RethinkDb
(the namespace) for disambiguation.
I haven't looked into TopLevel
however to see if it is at all possible to convert it to a static class.
Hey there,
It looks like the community is pretty set on RethinkDb
. An informal poll on the .NET slack group confirms this too... so, I think we'll keep everything the way it is for now.
Someone on the .NET slack group mentioned Db
capitalization makes sense when used in context as a general concept (as it's been used in the .NET Framework, ex DBNull
); however, RethinkDB
is an official company name and product. Ultimately, the company name/product should take precedent. After some idle thought on the subject, I kinda feel in agreement that RethinkDB
should take precedent and be used as the official namespace per SS 3.4 Names of Namespaces
in Framework Design Guidelines <Company>.<Product|Technology>/RethinkDB.Driver
.
If the C# driver ever makes it to official status, the company name should probably be used as the official namespace. So, we'll defer this discussion, if-when RethinkDB
officially joins the .NET party :balloon:. It would be a breaking change, but a clean break from community to official status.
R
I have some reservations about promoting R
to a static
class. My first concern would be, it would be a break from Java. At the moment we rely on and benefit heavily from Java's API documentation, samples, and Unit Tests. It would add additional maintenance for me internally when porting upstream changes from Java. Currently, it is a delicate balance maintaining a high quality driver with minimal maintenance effort.
Secondly, and probably more importantly, promoting R
to static
class away from static
instance would remove the ability to use C# Extension Methods at TopLevel
which could be useful in some cases to tee off custom AST queries. Users can extend the entire C# AST API, including TopLevel
, without having to recompile from source. I think that's a cool win.
IE: R.Table<Foo>()
Thanks everyone for your inputs and feedback. I really appreciate it.
:v: :okhand:[**"We can, we can, we can, we can work it out... Even if we try and it all burns down..."**_](https://www.youtube.com/watch?v=AyA8EQxVGwY)
@epsitec proposed the following change: I'm slowly getting up to speed with RethinkDb.Driver and one tiny little detail just does not feel right: the naming convention used. Is "DB" a two-letter acronym which should be written "DB" or should ""DB" in the context of the "RethinkDB" product name be treated differently?
See for instance
RethinkDb.Driver.RethinkDB.R
where once it is written withDb
(namespace) and once withDB
(class name). Is this an accident or was this a design decision?I would be more comfortable with the
RethinkDB
casing everywhere. But can you afford to make such a breaking change for naming aesthetics only?@bchavez response: It was kinda both. I checked the .NET framework design guidelines and the actual implementation in .NET. What I found was, there are actual namespaces with
System.Data.OleDb
and types namedOleDbFactory
/IDbConnection
/SqlDbType
/DbCommand
. To make matters worse, there are types inSystem.Data
likeDBNull
. LoL. Now, the guidelines are pretty explicit about 2 letter acronyms and things that are commonly well known like input-output be named likeSystem.IO
both caps... If MS carried out the same forSystem.Data
i thinkIDbCommand
would be namedIDBCommand
andSystem.Data.OleDb
would beSystem.Data.OleDB
. Who knows. I really don't know. There are also guidelines for namespaces, specificallySS3.4 Names of Namespaces
in Framework Design Guidelines whereRethinkDB
is company and product name that states<Company>.<Product|Technology>
. But then there's that grey area where I am not officially associated with RethinkDB the company even though I use their logo on NuGet and we have a cool thinker banner in our GitHub repo. Overall, though, to me personally, I could go with either naming convention. Six of one, half-dozen the other. You can submit a GitHub issue and put it up for a community vote. The people on the repository watch list are among the most passionate devs concerned with the direction of the driver. So, whatever naming convention wins out; I'm fine with. And the intentional bit was thatRethinkDB
was intentionally different fromRethinkDb
the namespace so that if you were doing some crazy .NET/CLR reflection type loading you could just match onRethinkDB
find the fully qualified name to the rootRethinkDB
object in theRethinkDb
namespace. (Also,RethinkDB
is the same type name as the Java Driver'sRethinkDB
).So, let's put it up for a community vote to change the root
RethinkDb
namespace ....:+1: for
RethinkDB.Driver
:-1: forRethinkDb.Driver
and leave as is.This would be a breaking change, but easy enough to resolve.
Also, some additional community packages based on the
RethinkDb.Driver
are now starting to pop up on NuGet usingRethinkDB
capitalization likeNancy.Session.RethinkDB
. https://www.nuget.org/packages?q=rethinkdb Just food for thought.