How best to implement a cohesive Model layer for Android MVC apps?
I'm pretty new to Android and Java, though I've really been excited about what I've learned so far. I'm a little uncertain though on how to implement the Model layer.
I come from a background in PHP web applications with Zend Framework and the like. I'm used to having an ORM component, through which the Model maps开发者_JS百科 to a database. I haven't really seen anything like this yet for Android, although it's possible I've just not looked hard enough.
Are there any good tutorials, articles, 3rd party libraries, etc. that specifically address setting up your Model layer for Android apps?
Thanks!
Another option for Android ORM is ORMLite. It uses native Android OS calls to support SQLite on Android and also has JDBC support for other database types.
http://ormlite.com/
Take a look at ActiveAndroid. It's an active record style Android ORM. Here's a sample project: https://www.activeandroid.com/help/sample-project/
There is a lightweight SQLite wrapper 'android-active-record' designed with persistent Models in mind. It allows transparent persisting of Java objects similar to what ActiveRecord do in Ruby or CakePHP. Give it a try http://code.google.com/p/android-active-record/
精彩评论