kclay / rethink-scala

Scala Driver for RethinkDB
Other
100 stars 24 forks source link

Clean-up, esp. in documentation #27

Open a1russell opened 9 years ago

a1russell commented 9 years ago

Hi,

I've been considering trying out RethinkDB. Since Scala is my favorite language, I'd naturally use the Scala driver. However, upon finding this project, I have some reservations about actually using it.

I know it sounds shallow, but I am sure that if I have these reservations, other people will, too. I hope that my honesty does not offend you. Basically, there is a lot of stylistic sloppiness, even in the README file. For example, looking at the "to get started" section, there are a couple of lines commented out. What do they mean, and why are they commented out? Can we just delete them?

There is also a lot of whitespace usage inconsistency that makes the code simply difficult to read.

Looking through the code, I see that these minor issues are not isolated to the README.

Would you be opposed to me (or anyone, really) cleaning some of these things up?

kclay commented 9 years ago

Have at it. Never thought anyone would use this library. And no it doesn't sound shallow, I actually wanted to clean it up a bit but was never of importance for me.

a1russell commented 9 years ago

Great; thanks!

ajrnz commented 9 years ago

I like scala as well and RethinkDB interests me. I think it's quite likely that this library would be used however at the moment there is quite a barrier to entry. I've spent a couple of hours playing with it but can't get it to work either with the dependency 0.4.6 or compiling it myself. I'm sure it's just a question of imports or the examples being out of date but these thinks matter when you are trying to get started. The lack of contact information makes it very difficult to request help.

I'd appreciate the examples being a full scala file (with imports!) which just does some simple things like reading and writing data. If it was part of the project it would always compile.

Happy to help out if I can.

kclay commented 9 years ago

@ajrnz completely understand. I have some time today so I'll be creating a wiki so far I have it broken down to these topics:

  1. Getting Started (sbt repo, imports, connection modes (blocking/async)
  2. Type Safety ( some pitfalls/unsupported and converting between types)
  3. Serialization (How it works and how to add custom parsers)
  4. Sequences/Streams (map/contactMap, how to add more support if needed)
  5. Querying (read/write, what the Document class is for, working with responses, lazy evaluations, future improvements)
  6. Differences in api calls from rethinkdb.com/api (how to work with indexes, term options)

anything else I'm over looking?

ajrnz commented 9 years ago

No, that sounds good. I'll give you some more feedback when I've had a look. Thanks.

polymorfiq commented 9 years ago

I would like to request an example project or a little more thorough documentation of the methods and how to use them. I might be missing something obvious, but I can't quite figure out how to take a case class, insert it into a table and then get(key) to get it back.

EDIT: Figured it out. These are the main things I was doing wrong if anyone else is confused.

In 0.4.6:

In 0.4.7-SNAPSHOT:

Thanks for making this library by the way. I really wanted to use RethinkDB in my Scala cluster as it seems like it is well-designed and has the right priorities. I'm looking forward to watching this library grow.

kclay commented 9 years ago

@fingerco https://github.com/kclay/rethink-scala/blob/master/core/src/test/scala/example/blocking/Tutorial.scala

Also I'll make an issuse for the "db" bug. also its r.db("myDB").table[MyClass]

polymorfiq commented 9 years ago

Thank you very much! This is very helpful.

On Apr 25, 2015, at 8:45 AM, Keyston notifications@github.com wrote:

@fingerco https://github.com/kclay/rethink-scala/blob/master/core/src/test/scala/example/blocking/Tutorial.scala

Also I'll make an issuse for the "db" bug. also its r.db("myDB").table[MyClass]

— Reply to this email directly or view it on GitHub.