.NET

Introducing Couchbase.Lite.Mapping: A New Nuget Package

Lectura de 3 minutos

Couchbase Lite 2.0 is a powerful NoSQL embedded data store for iOS, Android and .Net Mobile Platforms. Couchbase Lite provides functionality such as database and document CRUD operations, brings powerful Query API with SQL-like semantics and Full-Text-Search (FTS) capabilities.

Couchbase Lite Extensibility

El Couchbase.Lite y Couchbase.Lite.Enterprise NuGet packages provide a broad array of capabilities for easily creating, configuring, and manipulating the data within Couchbase Lite databases on the platforms that support the Couchbase Lite .NET SDK. While these packages already contain a large amount of functionality out of the box, an enormous benefit of using Nuget packages is the potential for extensibility. The ability to extend existing functionality provides us, as a development community, with an avenue to create and maintain projects that supplement existing Couchbase Lite features.

One example of an opportunity to extend Couchbase Lite is to add the ability to dynamically convert objects to and from DocumentoMutable objects. Currently, as seen below, each model object property name and value must be added manually to DocumentoMutable objects through various type-specific methods.

Subsequently, to convert a DocumentoMutable back into the original object the following must be done.

 

Introducing Couchbase.Lite.Mapping

As you can see, the code for converting an object into a DocumentoMutable and back again is simple, but as every object must be mapped developers can find themselves writing many similar lines of code. So, it’s with much excitement that Couchbase Labs is introducing a new Nuget package to help decrease the amount of code written to map model objects to and from DocumentoMutable objects.

Couchbase.Lite.Mapping can be found on Nuget.org, and is a completely open-source project maintained in Couchbase Labs on Github. It is important to note that the Couchbase.Lite.Mapping library is not officially supported by Couchbase, Inc., but is, instead, a community effort. Please give it a try, and let us know what you think!

Also, as this is an ongoing effort, please feel free to contribute by submitting comments, issues, and/or pull-requests.

 

Compartir este artículo

Autor

Rob Hedgpeth es un Desarrollador Defensor Sénior en Couchbase, especializado en tecnologías móviles e IoT. Rob ha estado desarrollando aplicaciones de todo tipo durante más de una década, pero se ha enfocado principalmente en el espacio móvil desde 2010. Antes de trabajar en Couchbase, Rob trabajó como Arquitecto Móvil en Xamarin y Microsoft.

Una respuesta

  1. Avatar de cvbnmx
    cvbnmx

    Great info. At least for me there seemed to be a dependency on Newtonsoft.Json.

Deja un comentario

¿Listo para comenzar con Couchbase Capella?

Comenzar a construir

Visita nuestro portal para desarrolladores para explorar NoSQL, consultar recursos y comenzar con los tutoriales.

Usa Capella gratis

Empieza a usar Couchbase en tan solo unos clics. Capella DBaaS es la forma más fácil y rápida de comenzar.

Ponte en contacto

¿Quieres saber más sobre las ofertas de Couchbase? Permítenos ayudarte.