I'm actually pretty new to Couchbase, but I passed the questions along to another member of our team that has more experience. His thoughts are quoted below in-line.
On Saturday, December 20, 2014 11:58:55 AM UTC-6, Traun Leyden wrote: > > > Hey Brandon, > > I can tell you that having a model layer is on our roadmap, but I don't > know the exact priority. (@Zack want to chime in on this?) > > Creating a model layer that everyone loves is actually kind of tricky. > It's made even trickier by the fact that reflection is very expensive on > Android, and so would have to be used extremely sparingly. > > There is already quite a lot of things that can be done using Jackson to > make the "model <-> docuement" translation fairly seamless, so I think we > really need to be exploiting that to the max in our examples and try to get > an idea of exactly what is missing. We don't want to end up re-inventing > the Jackson wheel here. > > A few design considerations I'll throw out, since I'd love to hear your > feedback: > > * Would you be OK having to extend a CBLModel class, or would this > interfere in your existing class hierarchy? > "Ok extending CBLModel. That fits well with what we do in iOS and we were hoping that was the direction to be taken." From what I've seen our iOS code takes advantage of the CBLModel class and we've actually created a CBLModel of our own on Android to emulate some of the same features (it's not very built out though). > > * Does the annotations approach as used in ORMLite seem to be a good > approach for you? > "Looked at ORMLite....perfect. Reminds me a lot of C#'s XML annotations. Good way to mix properties that are serialized with those that are not. Helps prevent recursion issues as well." I'm not familiar with ORMLite, but this sounds like GSON's annotations which I've always found very helpful for POJO <--> JSON conversion > > * What are the biggest pain points that you want a model layer to solve > for you? > "Biggest pain points: CBLModel reduces maintenance when models are modified. And during runtime, it ensures that updates to couchbase (new doc revisions) is done smoothly and efficiently when the model is modified." Pretty much just that as far as I can tell as well. I think we'll have to take another look into Jackson to see how much that can help and hopefully will be able to provide more feedback when we do. > > > > > > > > On Fri, Dec 19, 2014 at 9:28 AM, Brandon Rosenbaum <[email protected] > <javascript:>> wrote: > >> Is there any sort of summary timeline available for the Java/Android API? >> Mostly I'm curious to see if any model layer work is in the pipeline for >> parity with iOS and their CBLModel functionality. >> >> Apologies in advance for asking "do we have it yet?", but I can't seem to >> find anything recent regarding the roadmap. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Couchbase Mobile" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/mobile-couchbase/a79e5836-929c-4d4c-afde-45826f0145f3%40googlegroups.com >> >> <https://groups.google.com/d/msgid/mobile-couchbase/a79e5836-929c-4d4c-afde-45826f0145f3%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/6f324536-97a0-4ba4-ac1e-99871b7f550a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
