doco icon indicating copy to clipboard operation
doco copied to clipboard

Integration with Objectify

Open tj-recess opened this issue 11 years ago • 6 comments

I think we should build Doco on top of Objectify. Converting POJO to Document is necessary but converting Document back to POJO is kind of useless because we don't have all the fields in Document. On the other hand, if we integrate Doco with Objectify, we can do following:

  • Convert Ofy Entity (only) to Documents with Entity's Key<?> being the documentId.
  • Retrieve entire Entity back by just accessing the key from document (reconstruction is easier).
  • Converting various other fields to text (Ref, Set, List, etc) which are good to be searched but can't be reconstructed back into POJO. Since we're using Key to retrieve things back, just one-way conversion (from pojo to doc) is enough.
  • Less new annotations to learn if we integrate with Ofy's annotations. (e.g. @Entity(enableFullTextSearch=true), etc).

Since, Ofy is used extensively already, we can hope for much higher adoption (and contribution) which will make doco even better.

Let me know your thoughts on this.

tj-recess avatar Sep 21 '14 01:09 tj-recess

Kindly integrate with objectify

kishaningithub avatar Jul 10 '15 12:07 kishaningithub

I think it's a really great idea! The only fear is to coupling the doco with Objectify.

marcosvidolin avatar Jul 10 '15 13:07 marcosvidolin

Objectify is now on Google’s official documentation (https://cloud.google.com/appengine/docs/java/gettingstarted/usingdatastore#setting_up_objectify) I don’t think there is anything to fear about.

On Jul 10, 2015, at 6:56 AM, Marcos Alexandre Vidolin de Lima [email protected] wrote:

I think it's a really great idea! The only fear is to coupling the doco with Objectify.

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

tj-recess avatar Jul 10 '15 13:07 tj-recess

The only question would be, Doco would only be used in conjunction with Objectify (Datastore)? My project can use another database like MySQL.

marcosvidolin avatar Jul 10 '15 14:07 marcosvidolin

That’s a good point. I’d not overhaul doco completely. However, since objectify is already so popular, creating another project ‘docofy’ (doco + ofy) would attract more audience as compared to doco acting independently.

On Jul 10, 2015, at 7:11 AM, Marcos Alexandre Vidolin de Lima [email protected] wrote:

The only question would be, Doco would only be used in conjunction with Objectify (Datastore)? My project can use another database like MySQL.

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

tj-recess avatar Jul 10 '15 14:07 tj-recess

This seems like a good idea. Doco being the core of Docofy (great name). Perfect!

marcosvidolin avatar Jul 10 '15 14:07 marcosvidolin