New GitHub and NuGet package: Division42.Data-PCL

Ever since Xamarin 3 came out, several of us have been looking at ways to streamline the somewhat-painful task of writing apps for multiple platforms. Sure, Xamarin makes it so you can write C# code and deploy to Win8, WP8, iOS, Android, etc – but the “devil is in the details”. What about a database? How do you manage settings? How do you sync things perhaps to the user’s cloud storage? How do you do that across different devices!?

Well, in exploring that, I came up with some useful code which I intend to build on. What it is right now though, is an ORM (read: Entity Framework-like) Repository pattern on top of SQLite. If you are not aware, SQLite is one of the few database formats which works on ALL of the Xamarin platforms.

There is some MVVM-friendly functionality too. The best part is this is a Portable Class Library (PCL), meaning that it is framework-agnostic. This “database layer” code works for all Visual Studio/Xamarin platforms including iOS and Android, in addition to all the Microsoft platforms too.

It’s ONE solution for an app database for: WIndows Store, Windows Phone, iPad, iPhone, and Android.

The intent here is to make it so you can just add this NuGet package to your project and you’d instantly have SQLite repositories, with MVVM/XAML-friendly ViewModels with just a few lines of code.

GitHub:
This project is open-source and is available here (with GPLv3 license):

https://github.com/Division42LLC/Division42.Data

As of this writing, this has 90.9% unit test code coverage, and is pretty fully documented with XML code comments. Actual example code and more developer documentation is forthcoming.

NuGet:
This project is also published in NuGet and is available here:

https://www.nuget.org/packages/Division42.Data-PCL/

Or of course you can install from the Package Manager Console in Visual Studio:

mx36637

or by right-clicking on a project and choosing Manage NuGet Packages:

image

Next Steps…
Some of the next things to be considered are ways to sync data to various cloud providers. For example, imagine you add a record in your app on your local phone. Wouldn’t it be ideal to sync that change to the persons DropBox, GoogleDrive, OneDrive, Copy, etc so that if you then picked up your iPad or launched your Windows Store app, you’d see that change too.

If you have any questions, comments, or issues – please let me know.

Posted in Apple Stuff, Computers and Internet, Development Tools, Entity Framework, Mobile, Mono, Professional Development, Uncategorized, Unit Testing, Visual Studio, WindowsPhone, WPF and MVVM
One comment on “New GitHub and NuGet package: Division42.Data-PCL
  1. […] are the projects?Well, the first part I released a while ago, but I recently made a breaking change. Division42.Data is a Portable Class Library which simply […]

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives
Categories

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 2 other followers

%d bloggers like this: