Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When you say "data model" are you talking about object persistence? I was under the impression android didn't provide built in object persistent.


That's a great question. If you look at the set of classes that enable you to build an observer pattern on top of databases in Android - Cursor, Adapter, and View, you see that you can skip the ORM and POJOS in most cases where you are simply displaying data, with some minor processing that can happen in the Adapter.

This works well in Android where each process's maximum heap is something between 16 and 48MB, and keeping your data model in a database is a way of continuously persisting it.

There are exceptions. You probably would not want to build a CAD program this way. Instead you would take the performance hit to rebuild your POJOs after the component they are contained in gets reaped.


It occurs to me I answered your question only obliquely: Android doesn't have ORM. It does have a database stack that makes ORM unnecessary in most cases.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: