Wednesday, February 4, 2015

MyNotes: How to get the data?

Now that I have a new and improved database layer.  Now I have to figure out my primary way to access it.  My choice comes down to two options:

  • ContentProviders
  • Not ContentProviders
If you aren't familiar with ContentProviders, you can read up on them here.  They are a nice way to expose the database for manipulation, but the main use is to expose Data for manipulation by other apps.  

Since I only have a single table, the ContentProvider would map really nicely.  On the other hand, ContentProviders can be a pain to setup and get working correctly.  They can also be hard for new developers to understand.

After weighing my options, my choice came down to the decision to not expose my data beyond my app.  So I went with the non-ContentProvider option.  This doesn't preclude me from adding one in later if I change my mind about exposing the data and it simplifies some of my setup.

With that decision, I have to setup my data access layer...



No comments :

Post a Comment