Not sure what CP's have to do with REST...

My recommendation still stands - implement your own data access classes that directly deal with a SQliteDatabase. Make them as simple or as complex as you wish - from calling SQLiteDatabase directly to an abstract object/database mapper.

Then layer a CP on top of this database - if you need one.

If you're not going to expose your data to other apps with a CP, then the only reason to use a CP, as far I'm concerned, is to leverage Android's built-in URI-based data change notification mechanism to more easily sync the UI, and first of all, list views, with data updates.

It's still a good reason -- but it's much easier to implement a small CP with query() just for the URIs you need in the UI, than to bottleneck all your internal entity-changing logic through CP/CR interfaces.

-- Kostya

04.11.2011 23:38, Flávio Faria пишет:
Thanks Kostya,

Actually, I don't need to expose my data. I'm using a ContentProvider
because I'm trying to implement the REST architecture suggested by
Virgil Dobjanschi on Google I/O:

http://www.google.com/events/io/2010/sessions/developing-RESTful-android-apps.html

Though, I have complex entities in a normalized database, so I need
transactions in order to insert parts of a single entity on their
respective tables and do some data validation (say queries) between
these insert operations. Is there a better solution for that?

--
Kostya Vasilyev

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to